Transitions as Triggers Workflow Example

Transitions not only move an artifact from State to State, but can also trigger actions. In the above example, a linear Workflow, there are four States and three connecting Transitions.

  • (A) This is the basic Transition we've seen in previous examples.
  • (B) The second Transition also includes a Triggers element that indicates the Transition also triggers one or more actions. In this case, there is a single Trigger child element that defines the triggered action.
    The action is to send an email notification to a specific person. This could also be multiple addresses, or a group of users.
  • (C) There are validity rules when defining XML. The Triggers element must precede the FromState and ToState elements.
    You can learn more about order in the Workflow XML Reference article.
  • The third Transition triggers three different actions, hence the three Trigger child elements. In this example, this is a Process artifact that is being transitioned to an Approved state
  • (D) The first action in the third Transition is to generate user stories for a Process artifact.
  • (E) The next action is to generate test cases for the Process.
  • (F) The third action is to send a message to an external application via a Webhook.