Define guards
Guards are used to check for certain conditions for state transitions. A state change is triggered only when the condition is met.
Guards for activities and other elements
The following guards are available for activities, artifacts and project elements:
Check for delay
You can use this condition for activities as well as for other elements. When you set the condition for activities, the system checks whether the end or start date of the activity is still in the plan or whether it has been exceeded.
For example: The activity must have a delay ‘<‘ ‘2‘ ‘days‘ .
Operation Choose an operator
0 Enter a number.
DelayUnit Choose a unit, days or %.
The condition is only available for artefacts and project objects from version 6.4. If you want to use the condition for other elements, e.g. for requirements or artifacts, you need a user-defined property of the type Date or DateTime. Create the property on the stereotype for which the condition is to apply.
Example: Element ‘requirement‘ ‘due date‘ must have a delay ‘=‘ ‘1‘ ‘calendar day(s)‘.
ContextEntity If the state machine applies to several stereotypes, select an element from the list. Otherwise the element for which the state machine is created will be selected.
Property Select a property of type Date or DateTime.
Operation Select a comparison operator.
0 Enter a number.
DayUnit Select a unit. You are offered Calendar day(s) and Working day(s).
Check final state
The element is only allowed to change state if elements related to it are in an end state.
For example: There must be ‘all‘ elements in ‘Requirement‘ ‘Contained requirements (contains relationships).Contained requirement‘ in a final state.
ElementCount Choose whether the evaluation should take place for all assigned elements or whether at least one element must fulfill the condition.
ContextEntity Select the source element that is linked with the other elements through a relationship.
NavigationPath Choose the relationship.
Check for project user
This checks whether the person who triggered the state change is assigned to the activity or the element as an editor. This ensures that only assigned staff execute state changes.
For example: ‘Activity resources.Project user‘ is current project user.
NavigationPath Choose the relationship to a project member.
Check project group membership of project user
This checks whether the person who triggered the state change belongs to a specific project group. This allows restricting the ability to execute state changes to employees of a particular group.
For example: The current user ‘must‘ be assigned to project group ‘Project Manager‘.
Membership Choose whether the user must belong to the project group or not.
ProjectGroup Choose a project group. The project groups displayed here can be determined in the view Manage project staff.
Check property (From Version 5.1)
The selected property is evaluated for fulfillment.
For example: Element ‘Requirement‘ ‘Name‘ ‘starts with‘ ‘BUG‘ is valid.
ContextEntity Choose the element type for which the conditions are to apply. What is displayed here depends on what is assigned in the state machine in the Stereotypes tab.
Property Choose a property to be evaluated. Depending which element type you’ve selected, different properties will be offered here.
Operation When a property has been selected, an operator will be set corresponding to the data type. It can be changed by clicking.
Enter a value Input a value.
Check state
The element can only transition to the state when all elements, or at least one of those elements that have a relationship to the element, are in a defined state.
For example: There must be ‘all‘ elements in ‘Requirement‘ ‘Contained requirements (contains relationships).Contained requirement‘ ‘in‘ the state ‘realized‘
ElementCount Choose whether the evaluation should take place for all assigned elements or whether at least one element must fulfill the condition.
ContextEntity Select the source element that is linked with the other elements through a relationship.
NavigationPath Choose the relationship.
Operation Here you can select whether the following state must be fulfilled or not.
State Choose one or more states. The states that are modeled in the corresponding state machine are displayed here.
Guards for activities
The following guards for activities are available:
Check input state
The activity can only transition to the state when all assigned inputs or at least one of them is in the selected state.
For example: ‘all‘ input ‘must be‘ in state ‘accepted‘
ElementCount Choose whether the evaluation should take place for all assigned inputs or whether at least one element must fulfill the condition.
Operation Here you can choose whether the inputs must be in the following state or not.
State Choose a state. Choose a state. The states that are modeled in the corresponding state machine … for activity input/output are displayed.
Check output state
The activity can only transition to the state when all assigned outputs or at least one of them is in the selected state.
For example: ‘all‘ output ‘must be‘ in state ‘accepted‘
ElementCount Choose whether the evaluation should take place for all assigned outputs of the activity or whether at least one element must fulfill the condition.
Operation Here you can choose whether the outputs must be in the following state.
State Choose a state. The states that are modeled in the corresponding state machine … for activity input/output are displayed.
Guards for requirements and use cases
The following guards for requirements and test cases are available:
Check if requirement|use case is assigned to a backlog
Upon state change it is checked whether the requirement|use case or a reference to it exists in a backlog or not.
For example: The requirement or a reference ‘is‘ assigned to a backlog.
‘…‘ Choose whether the element must be in a backlog or not.
Check is requirement|use case is assigned to an activity
Upon state change it is checked whether the requirement is in a backlog or not.
For example: The requirement ‘is not‘ assigned to an activity.
‘…‘ Choose whether the requirement must be assigned to an activity or not.