About Decorators¶
Decorators are used to modify the behavior of the node.
They are written after the @ symbol and you can have multiple decorators for one node, like f.e. @forceSuccess @if:condition @if:anotherCondition.
All decorators would be checked in order they are written in the name. Decorator would decide whether it would continue checking further decorators (or node) or it would stop and return the status as was decided by the decorator.
For example if (aka conditional) decorator would stop checking further decorators if the condition is not met and would return 'failure' status.
- Conditional decorator is used to check some condition before the node (or further decorator) is checked.
- Force Success decorator is used to force the node to return 'success' status, no matter what the actual status is.
- Force Failure decorator is used to force the node to return 'failure' status, no matter what the actual status is.