Workflow Events
Workflow Events are a new concept introduced in CB-8.0, and allow to associate Workflow Actions with these types of events:
- State Entry
- State Exit
- Field Updates
You can see/configure actions for specific events when customizing State Transitions of a tracker.
State Entry
A State Entry is an event, that fires when a (Work) Item enters a new status.
A State entry event always occurs in conjunction with executing a State Transition.
To configure actions, to execute upon entering a specific status, choose State Entry from the Workflow/State Transitions More... menu:
and then select the State and the Actions:
Alternatively, you can click on the appropriate state in the State Transition Diagram:
and then define the actions to execute On Entry.
If multiple state transitions lead into a (target) status and the same action should be executed upon each transition, then it is recommended to execute that action upon entry into the target status!
But what, if an action should only be executed only upon entering a new status from specific old states ?
- If it's only one specific old status, then associate the action with the transition from old status to new status.
- If there are multiple relevant old states, then define a Condition for the action as: "(Old) Status was [not] ...".
Workflow Actions associated with a State Entry will be executed after the actions associated with the State Transition leading into the status.
A working example is Start a new review.
State Exit
State Exit events are similar to State Entry, but they fire when a (Work) Item leaves it's current status.
Workflow Actions associated with a State Exit will be executed before the actions associated with the State Transition triggering the status change.
Actions to be executed only upon exit to specific target states, can use a Condition like : "(New) Status is [not] ..."
Field Updates
Field updates are changes of item field values and can occur in the context of State Transitions, but also upon editing an item.
Please note, that adding/removing/editing
- Comments/Attachments
- Associations
- Children
- SCM Commits
on (work/config) items are not field updates/workflow events and can therefore not be handled here.
To react on updates of specific fields (in a specific item status), choose Change Handler from the Workflow/State Transitions More... menu:
On this screen, select appropriate values in the State and Actions boxes. Selecting a value in the Changes box is not mandatory.
Via the special State: ***, you can react to changes in any item state.
The Changes to react upon are defined via a change filter, which is an extended Condition, that allows to check:
- Whether a field value has changed:
Field changed
- The old field value before the change:
Field was ...
- The new field value after the change:
Field is ...
A change filter must contain at least one Fieldchanged criterion.
Please note: You can also use was and is within the Condition of Actions associated with any type of workflow event, but changed (although available) will not work there, only in the Changes filter of a Change Handler!
If the Changes drop-down list does not contain an appropriate change filter yet, you can define a new one, by right-clicking on the drop-down list and choosing New... from the context menu.
E.g. New change filter for: The business value (of a requirement) changed to Must have:
Alternatively, you can click on the appropriate state in the State Transition Diagram:
and then define the actions to execute On Update of specific fields in this status.
To define the same action for the same changes in multiple states, define the action in the Change Handler for any (***) status and use an action Condition as: "Status is [not] in ...".