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]
# 1
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

ArjunBanker at 2007-10-8 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 2
How can I determine these states in Beta 2?
BastiaanMolsbeck at 2007-10-8 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 3

PossibleStateTransitions property of StateMachineWorkflowInstance class

Serge Luca

SergeLuca at 2007-10-8 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 4

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" ?

BastiaanMolsbeck at 2007-10-8 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 5
In a state machine ? What do you mean, Bastiaan ?
SergeLuca at 2007-10-8 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 6

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.

BastiaanMolsbeck at 2007-10-8 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 7

you cannot do that, I'm afraid .

But why do you need that ?

Serge

SergeLuca at 2007-10-8 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 8
I need to display a list of all possible states the workflow can change into. I just wanted the list to be nicely ordered. Too bad it isn't possible...
BastiaanMolsbeck at 2007-10-8 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 9

I have an additional question on same lines.

How can we get the list of possible state transition for a given user?

Thanks,

Navneet

Navneet at 2007-10-8 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...

Software Development for Windows Vista

Site Classified