How to determine possible states in State Machine Workflow
Hello,
I created State Machine Workflow and managed to get current state. My task is to determine all possible states in which state machine can go from its current state.
Any ideas?
Kind regards,
nrasinec
[227 byte] By [
nrasinec] at [2007-12-24]
In Beta1, you can enumerate all the event drivens and state initialization activities in the current state, and aggregate all the set state activities to determine the potential next states. In Beta 2, there will be a set of helper methods that you'll be able to use for these queries.
Arjun
Thank you for the answer!
Now I've got another question:
Is it possible to control the order of the states returned by the methods "StateMachineWorkflowInstance.States" and
"StateMachineWorkflowInstance.PossibleStateTransitions" ?
The class "StateMachineWorkflowInstance" contains among other things the properties: "States" and "PossibleStateTransitions".
The property "States" returns a StateActivity-collection which contains all states of the State Machine. But the order in which these states are sorted is a bit strange: I created a State Machine with 5 states, but the collection returns them as follows: "State1, State3, State5, State4, State2".
I was wondering if it is possible to retrieve those states in the correct order (like "State1, State2, State3, State4, State5").
I hope this explains my question.