Rule and Action Templates
Templates allow a section of a Rule or Action to be extracted, stored, and reused. Templates are separated by type; Rules and Actions, and can be used in Templates of the same type.
Note: Templates cannot reference themselves as this would cause a circular reference, making the rule loop infinitely.
If a modification is made, the change is picked up by all items referencing the template.
Note: You cannot delete a template when it is referenced.
Referencing one template inside another template allows trees of Rule templates that can be created with a Rule or Action at the root.
Note: If a template tree is too deep, you may experience performance issues.
All Templates can start with a Value or a Predicate, while only Action Templates can start with an Operation.
Example: A template can be used to define the relationship between road elements that make up a roundabout. The parameters are the objects that define the roundabout, and the output is a geometry value. This template can then be used in all Rules that need to access roundabout geometries.
Creating Templates
Create a Template using the New icon or via the context menu in the Navigation pane in either the Rules or Actions tabs. The object is defined in an
Read and Commit parameter to the template. A template can have zero to many parameters.
Note: Action Templates can only be inserted into other Actions.

Parameters can be added, removed, and changed even when the template is referenced.
Warning: If the first node of a Template has its type changed (eg. Predicate to Value) then any Rules/Actions using the template will lose functionality until the correct component type is used.
Using a Template
Templates can be used within Rules, Actions, or other Templates.

Templates automatically inherit the Class and Attribute parameters from the Root node at the point in time they are added. This can be manually changed if needed.