Hooking up the state machine to a workflow
In this recipe, we will hook up our state machine to the ConWHSVehWFInsp
workflow task.
Getting ready
We need to have a workflow task and have completed the recipes in this chapter.
How to do it...
To hook up the state machine to a workflow task, follow these steps:
- Open the
ConWHSVehWFInsp
workflow task. - Set the
Canceled State Machine
property toInspStateMachine
.
Note
Yes, this is spelled Canceled
, but it is more than compensated by the clever way it has determined the list of valid state machines.
- Set the
Canceled State Machine Target State
property toWaiting
; we won't be allowed to useNotInspected
. Due to this being the state machine's initial state, it will let you set this value, but the state machine will reject the change. - Set the
Started State Machine
property toInspStateMachine
, and theStarted State Machine Target State
property toWaiting.
Note
You will also need to allow the Waiting
state to transition directly to Complete
. Don't forget to click...