Providing a custom node translator

If you add a node to the abstract syntax of a language, you must provide a translator associated with the new node.

About this task

Deprecated feature:

Deprecation icon Support for custom business rule languages is deprecated in V8.8.1. This feature will be removed in a future release of the product. See Deprecated features for migration details.

To add a custom node translator, you must create an implementation of IlrNodeTranslator.

Procedure

To provide a new node translator:

  1. Create an implementation of IlrNodeTranslator and define its process method.

    The implementation of the process method must at least forward the processing to the subnodes by calling IlrTranslationContext.processNode(node). As a general rule, you must always make sure that the whole abstract syntax tree is explored.

    If you introduce a new statement, such as a new kind of condition or action, the process method must create and return this statement.

  2. Register the node translator to the abstract syntax node in the concrete syntax properties, using the translatorClass property and the fully qualified name of the node translator class.