Wiredness
Wiredness

Reputation: 175

Starting a State Machine Workflow in Any State

I am looking into creating a new State Machine Workflow - generally with our other flow chart workflows we have them setup so that we can restart them after an upgrade by starting them in a future "state" - is there an easy way to start a state machine workflow in any given state or would you need to put it together so that the starting state can transition to any of the other states and sort the logic and transitions out programmatically?

Upvotes: 3

Views: 505

Answers (2)

Karesz
Karesz

Reputation: 11

Call the SetState method of the StateMachineWorkflowInstance and passing either a string representation of a state or an instance of a StateActivity class to start with.

Upvotes: 0

Maurice
Maurice

Reputation: 27632

The only way to do this is by explicitly adding the state transition to the workflow and starting it with some additional parameter so the logic is triggered.

Upvotes: 2

Related Questions