Blog Stats
  • Posts - 15
  • Articles - 0
  • Comments - 2
  • Trackbacks - 6

 

Calling orchestrations programmatically

Sometimes we need to decide runtime which orchestrations to call or just want to avoid using that extra shape of call orchestration

We can use xlang in expression shape e.g.

To call Distribution.WorkFlow_Orchestration xlang is

call Distribution.WorkFlow_Orchestration (DistributionContext, out DistributionContext);

To start Distribution.WorkFlow_Orchestration xlang is

exec Distribution.WorkFlow_Orchestration (DistributionContext, out DistributionContext);

where DistributionContext is name of input message and out DistributionContext is out message; in this case they are same

 

Vishy


Feedback

# re: Calling orchestrations programmatically

Gravatar Can you please create a sample for it, since i m not able to apply that in expression shape, it's giving an error for DistributionContext 11/6/2005 8:58 AM | Awais Bin Khalid

# re: Calling orchestrations programmatically

Gravatar Hi Vishy,
This example requires that you know the type (orchestration) that you are calling at compile time. I have tried to specify the type dynamically at run time by assigning the type to a System.Type variable as you do to dynamically call a transform but have had no luck as of yet. Can you please provide an example of calling it dynamically i.e. get the type from a variable instead of specifying it at compile time

Something like this....

sOrchName = "NSpace.Orch, NSpace, Ver', Cul', PKT'";
tOrchType = System.Type.GetType(sOrchName);
exec tOrchType(Msg, CallBackPort);

7/4/2006 9:33 PM | Guy Derriman

Post a comment





 

 

 

Copyright © Vishal H