Sunday, July 22, 2012 10:30 PM
I have a state machine 4.5 WF (WCf WF Service Application) that has several states. It has few operation contracts exposed as receive activities. If these operation contracts gets called in a proper flow, WF behaves as expected. For example, CreateOrder, ModifyOrder,Check, Confirm, Complete.
However, if client calls CreateOrder and then straight away Confirm (missing states Modify,Check) state machine WF hangs.
What could be the issue?
Thanking you in anticipation.
- Changed Type LeoTangModerator Tuesday, July 31, 2012 2:24 AM
Tuesday, July 24, 2012 1:14 AMModerator
I think I can help dispel confusion. First imagine that
1) State Machine workflow can only be in one state at a given time.
2) suppose that state has only certain outgoing transitions, A, B, and C.
The state machine will always appear to be 'hanging' until one of those transition's events happens. If event D happens (where D is a transition from some other state that we are not in right now), the state machine will have no way of understanding or reacting to that event, so it will continue to wait for events A, B, or C.
In case you want event D to result in an error when called out of order, you could do it by explicitly modelling an error state in your workflow, and having unexpected events route to that state.
Thursday, July 26, 2012 1:30 PM
Thank you for your response. It cleared the confusion rather confirmed my understanding of state machines.<o:p></o:p>
Regarding your last point, is a general practise to raise errors for incorrect transitions? Do you have any example of “Error State” and routing mechanism.<o:p></o:p>
Thanking you in anticipation.<o:p></o:p>
Thursday, July 26, 2012 2:16 PM
Just a general query, if I am correlating all receive activities, why can't my WF understand its current state and next state/states and raise an error if called out of order. This was my understanding.
Sunday, July 29, 2012 12:44 AMModerator
Thanks for posting! This issue has been logged, product team is currently investigating further. If you want to track this issue, you can sumbit a post at connect site.