I am working a project where i need to create a state machine work flow in 4.0. I have installed .net framework 4 platform updates and i am able to get state machine and states in toolbox to work with. I have created a WCF workflow service application. I have currently 3 states in this.
State1 which executes a extenal process. State2 which updates a database. State3 populates some entity class.
Each state will be having a receiveandsend activity. I need to trigger each states individually from client. Cancreateinstance of each receive activity is made true.
I have to call this from a silverlight application. So i have added the service referance to this workflow in silverlight application.
when i execute the first state, its works fine and external process is executed.
But when i try to execute the next state by calling the next receive activity from client, its showing error as below. "Operation 'ExecuteExternal|{http://tempuri.org/}IService' on service instance with identifier '4732d197-32c0-4591-87bc-fa0adb7ec43a' cannot be performed at this time. Please ensure that the operations are performed in the correct order and that the binding in use provides ordered delivery guarantees."
I think the WF is not waiting after first state is finished. Can anyone help me to solve this?
Working with Correlation handle helped me to solve this issue. Please find the answer in the below post http://social.msdn.microsoft.com/Forums/en-US/wfprerelease/thread/6a7d9069-d5a7-4410-b5dd-16325d0d8dc9