I have the following state machine called Task:
Start -> A -> B -> Complete
The transition between B and complete is a one-way receive activity called CompleteTask. It seems that when the workflow instance is in state A, any call to CompleteTask will be queued. The call will then be carried out right away when the state transits to B. If CompleteTask is a two way call, it will have the same behavior except that the client will hang and wait for a response. It will often lead to time out since the work flow is in the wrong state.
It is a bit of unexpected behavior for me. I was hoping the workflow engine will just throw me an exception when user make "out of state" calls.
In terms of correlation, I use a global CorrelationHandle called taskInstanceID. I have a feeling that local correlationHandle might be the key to solve this.
Any thoughts on this? Any way to make "out of state" calls illegal in workflow foundation?
thanks!