BizTalk Server Orchestration - Invoke Orchestration thru code

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server Orchestration > November 2005 > Invoke Orchestration thru code





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Invoke Orchestration thru code
Manash

2005-11-22, 5:54 pm

Hi I am trying to refer to the biztalk assembly deployed in the GAC for my
Biztalk project & create an object so that I can invoke the orchestration
using the code.
Its something like what we do to refer to a dot net assembly and then create
an object of the class in that assembly. Then using the object call the
public methods to do something.
When I am trying to do the same thing with my Biztalk project assembly I
cannot invoke the orchestration.

I can publish it as a web service and invoke it but I would not want to do
that.
Can someone please help me with this.

At least a pointer to the right direction would be a lot of help to me.

Thanks in advance.
manash
Tomas Restrepo \(MVP\)

2005-11-22, 8:51 pm

Manash,
> Hi I am trying to refer to the biztalk assembly deployed in the GAC for my
> Biztalk project & create an object so that I can invoke the orchestration
> using the code.
> Its something like what we do to refer to a dot net assembly and then
> create
> an object of the class in that assembly. Then using the object call the
> public methods to do something.
> When I am trying to do the same thing with my Biztalk project assembly I
> cannot invoke the orchestration.
>
> I can publish it as a web service and invoke it but I would not want to do
> that.
> Can someone please help me with this.
>
> At least a pointer to the right direction would be a lot of help to me.


You can't do that, at least not in a supported way. Orchestrations are meant
to run inside the robust and inside the context provided by the BizTalk
application hosts infrastructure, not inside arbitrary processes provided by
you.

So, in other words, the only supported way of starting an orchestration from
outside of biztalk is by sending a message to biztalk and having it start
the orchestration as a result of that. The WS is a way to do that, another
might be the "submit direct" adapter sample that is included in the BizTalk
SDK.


--
Tomas Restrepo
tomasr@mvps.org
http://www.winterdom.com/


Younes Amar

2005-11-23, 8:49 pm

if you just want to start an orchestration, you could create a schema
message like this (you can probably make it more generic)

<TriggerMessage>
<TargetOrchestration>MyCalledOrch_V01</TargetOrchestration> <----
This would be a promoted field
<OptionalInputParams><Param1>...</Param1><ParamN>...</ParamN></OptionalInputParams>
<CallingOrchestration>CallingOrchGUID</CallingOrchestration>
</TriggerMessage>

And send such a message through a direct port. Set the value of
TargetOrchestration through code, a rule policy, .NET code, whatever. Set
the CallingOrchestration to the InstanceID of the calling orchestration so
that you could wait for a correlated response from the called orch (another
message with this ID in it).

Now you can make as many orchestrations as needed that have an activating
receive on a trigger message (direct bound) with a filter saying "Where
TargetOrchestration == MyCalledOrch_V01", that would be activated whenever
you send the message. There will be no design-time dependencies between
caller and called.

Hope that explains it a bit better. It's just an idea, I haven't implemented
it yet.

Younes

"Tomas Restrepo (MVP)" <tomasr@mvps.org> wrote in message
news:OHWTLL87FHA.4076@tk2msftngp13.phx.gbl...
> Manash,
>
> You can't do that, at least not in a supported way. Orchestrations are
> meant to run inside the robust and inside the context provided by the
> BizTalk application hosts infrastructure, not inside arbitrary processes
> provided by you.
>
> So, in other words, the only supported way of starting an orchestration
> from outside of biztalk is by sending a message to biztalk and having it
> start the orchestration as a result of that. The WS is a way to do that,
> another might be the "submit direct" adapter sample that is included in
> the BizTalk SDK.
>
>
> --
> Tomas Restrepo
> tomasr@mvps.org
> http://www.winterdom.com/
>



Paul Somers

2005-11-25, 7:48 am

I can confirm, the send direct sample is fantastic, and you can use this, or
you can expose an orchestration as a web service and call it this way.


"Tomas Restrepo (MVP)" <tomasr@mvps.org> wrote in message
news:OHWTLL87FHA.4076@tk2msftngp13.phx.gbl...
> Manash,
>
> You can't do that, at least not in a supported way. Orchestrations are
> meant to run inside the robust and inside the context provided by the
> BizTalk application hosts infrastructure, not inside arbitrary processes
> provided by you.
>
> So, in other words, the only supported way of starting an orchestration
> from outside of biztalk is by sending a message to biztalk and having it
> start the orchestration as a result of that. The WS is a way to do that,
> another might be the "submit direct" adapter sample that is included in
> the BizTalk SDK.
>
>
> --
> Tomas Restrepo
> tomasr@mvps.org
> http://www.winterdom.com/
>



Younes Amar

2005-11-26, 5:49 pm

hi,
Jesús Rodríguez has published a great article on a technique for invoking
orchestrations from custom code using the same approach adopted by the Start
Orchestration shape
http://weblogs.asp.net/gsusx/archiv.../08/349177.aspx
HTH
Younes

"Tomas Restrepo (MVP)" <tomasr@mvps.org> wrote in message
news:OHWTLL87FHA.4076@tk2msftngp13.phx.gbl...
> Manash,
>
> You can't do that, at least not in a supported way. Orchestrations are
> meant to run inside the robust and inside the context provided by the
> BizTalk application hosts infrastructure, not inside arbitrary processes
> provided by you.
>
> So, in other words, the only supported way of starting an orchestration
> from outside of biztalk is by sending a message to biztalk and having it
> start the orchestration as a result of that. The WS is a way to do that,
> another might be the "submit direct" adapter sample that is included in
> the BizTalk SDK.
>
>
> --
> Tomas Restrepo
> tomasr@mvps.org
> http://www.winterdom.com/
>



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com