In Chapter 7, Workflow and Business Process, we created a few new workflow transitions. We now need to update these new transitions to make sure they fire the appropriate events:
- Browse to the View Workflows page.
- Click on the Edit link for HR: Termination Workflow.
- Click on any transitions other than Done.
- Update the post function to fire the Issue Updated event rather than the Generic Event.
- Repeat this for all other transitions except the Done transition.
- Publish the draft workflow. You can save a backup copy in case you want to revert.
We are using the Issue Updated event because it reflects the fact that the issue is being updated; also, the event is tied to more appropriate email templates. We can, of course, also create a new custom event and email templates and make the post function fire the custom event instead.