How it works...

The change we have made was to simply tie the events on the workflow task to a state of the state machine. This means that the event handler methods we normally write should not update the status, but they can perform actions that should happen when the event happens.

The state machine is called by the workflow engine, just before the events are called. This is why we had to remove the validation on the comment--the state is changed before the completed event was called, which means that the comment was empty. There isn't much we can do in this case but to allow the workflow to continue. We could use the workflow designer to check for this event and resubmit the task to the user.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.21.166