API - StaticAttribute
Here all static attributes are listed which can be used in rules. Static attributes are used to show the header of resources, activities and projects. Using the names of static attributes in rules allows to access the values of these attributes in a dynamic way. The following table lists all static attributes and their corresponding attribute name.
| StaticAttribute | Attribute name |
|---|---|
TMS_START | start |
TMS_END | end |
TMS_EARLIEST_START | earliest start |
TMS_LATEST_END | latest end |
TMS_LOCATION | location |
TMS_PROJECT | project |
TMS_NAME | name |
Usage in when part of rules
In following an example how to retrieve the location attribute of an activity in the when part of a rule:
when
$activity: Activity(attributes : getAttributes())
$location: Attribute(name == StaticAttribute.TMS_LOCATION.getValue()) from attributes
then