Cliff / all,
Cliff: Good morning. I appreciate your time spent on my forum posts. I will try to bring it to close very shortly.
In regards to the "rollback" discussion, respectfully, I believe we are both right; its just a matter of command granularity.
If the StateMachine is used only for "atomic actions" (ICommands whose execution is only [potentially] depend a previous state), then yes, you are correct: we don't (necessarily) need a rollback since we are left in a "safe state".
However, I will be using using a AsyncMacroCommand to execute a series of related AsyncCommands, controlled by a StateMachine where only the successful execution of all ICommands in an AsyncMacroCommand will constitute "success".
With this requirement, if the any ICommands fails during the execution of AsyncMacroCommand, I need to restore the StateMachine to the initial starting state ( "rolling back", executing whatever ICommands are need to restore the state.)
As I mentioned in my first post, this is a transactional model: all ICommands must succeed OR restore to the original state. Under this transactional model, it can't not stop in the middle of a series of actions.
Does this transactional requirement fit within the current implementation of StateMachine, AsyncMacroCommand and AsyncCommand? If no and with the modifications mentioned in my previous post, do you believe that will provide the ability to execute transaction-ed commands?
Regards,
Mike