StateMachine invoke StateMachine  
Author Message
starz





PostPosted: Windows Workflow Foundation, StateMachine invoke StateMachine Top

Hi

I have a question about invoke StateMachine

There are two StateMachine Workflow : parent Workflow and child workflow .

one state of child workflowevent has EventDrivenActivity.

the question is :

how can I Invoke the child workflow and Call EventDrivenActivity in the child workflow

thanks




Software Development for Windows Vista7  
 
 
Steve Danielson





PostPosted: Windows Workflow Foundation, StateMachine invoke StateMachine Top

Hi,

You can invoke the child workflow using an InvokeWorkflowActivity from a state machine.

To call an Event Driven activity in the child workflow you need the InstanceId of the child workflow and use it to create your ExternalDataEventArgs. When you fire the event, the Workflow Runtime will use this InstanceId to route the event to the proper running Workflow. I can provide a sample if you wish and post it on my blog.

Thanks,

Steve Danielson [Microsoft]
This posting is provided "AS IS" with no warranties, and confers no rights.


 
 
starz





PostPosted: Windows Workflow Foundation, StateMachine invoke StateMachine Top

thanks Steve !

I really want the sample !

I Can't find your blog! Can you tell me



 
 
Tom Lake





PostPosted: Windows Workflow Foundation, StateMachine invoke StateMachine Top

Steve posted a sample on his blog here.

 
 
Steve Danielson





PostPosted: Windows Workflow Foundation, StateMachine invoke StateMachine Top

Thanks Tom! I forgot to come back and post the link :)

Steve Danielson [Microsoft]
This posting is provided "AS IS" with no warranties, and confers no rights.


 
 
John Portnov





PostPosted: Windows Workflow Foundation, StateMachine invoke StateMachine Top

Steve,

I need to use InvokeWorkflowActivity to call an XOML only workflow. I know how to do it via CreateWorkflow, but am not sure how to do it with this activity. Below is the code I probably need to substitute for the XOML file, Rules files, and paramsCollection:

this.invokeWorkflowActivity1.Name = "invokeWorkflowActivity1";

this.invokeWorkflowActivity1.TargetWorkflow = typeof(WorkflowConsoleApplication1.SubWorkflow);

Any ideas how to replace TargetWorkflow to specify the xoml only workflow

Thanks in advance,

John Portnov