adding transitions while running

Jul 12, 2011 at 10:22 AM

I'm diving into the statemachine and it's all wonderfull, but for my situation i must allow a state to go back to a previous state.

The problem is that we don't want to force our end customers to add a transition back to a previous state.

Step 1
Step 1a
Step 2
Step 3
Step 4
Step 5
Step 6

When the state is Step 6 it needs to be able to go back to Step 1a whenever Step 1a was hit before.

I think about several solutions

1) override the state activity (and transition activity)
To add custom code in it, but i'm not sure in how much flexibility i've.
Whenever a transition-action is executed it adds a new transition to the destionation state to go back to him (or even go back further to a previous state)

2) only allow a previous state destination
Each state can go to his previous state, a two way transition. This then can be looped until the correct GoTo Previous state is hit.

Jul 12, 2011 at 4:53 PM

Or will it be smarter to create own activity's and ignore the whole statemachine activity's.. hmm

Some activity's like in "ASP.NET MVC2 Wizard Activity Sample"