The heart of the add-on is a domain language that is designed for Jira. It could be seen as kind of Business Readable DSL according to Martin Fowler.
Condition rule is essentially a boolean expression that is to be evaluated by workflow execution.
The typical use of condition rule is checking if the data matches some criteria such as:
- a number is greater than another number
- a text equals to another text or matches a pattern
- a date is before or after another date
It supports logical operators (AND, OR) so that you can combine multiple simple expressions for complex logic. Parentheses can be used for grouping the parts of complex expressions.
Besides, condition rule also has built-in support for high order predicate which can check if a list of items match a certain condition:
- all of the subtasks match (<condition>)
- any of the subtasks match (<condition>)
- none of the subtasks match (<condition>)
Validator rule is pretty much the same as condition rule as the purpose of validation is to produce a result of true or false too. The only difference is that validator rule allows to specify a string message as the validation result. This is a feature introduced since version 2.2.0 for server.
Action rule is a combination of condition and action. It uses the form of if <condition> then <then-action> else <else-action>. The condition part is exactly the same as the condition rule. When it evaluates to true, the then-action part will be triggered. Otherwise the else-action is selected. This is similar to if-else expression/statement of most programming languages.
The action part represents one or more operations to be performed automatically when it is chosen. The currently supported actions include:
- Add comment to an issue
- Add label/version to an issue
- Add or remove watcher
- Assign an issue to a user
- Update fields of the issue
- Send email notification