Accessing decision engine and related artifacts from ARL mapping code
You can access the decision engine and its related artifacts, by writing ARL mapping code in the BOM-to-XOM mapping section of the BOM Editor.
About this task
The engine and other related artifacts can be accessed directly from the Advanced Rule Language (ARL) mapping code.
Note: You cannot use extender mapping to access the engine,
ruleset variables, parameters, and rules.
When you write
the ARL mapping code in the Body field, you
associate it with a number of classes:
- The current object, if you write the body for a non-static member.
- The RunningEngineWithWorkingMemory, which represents the engine that is running.
- The RuleInstance, which is null if the body is not called within a rule action.
- The TaskInstance, which is null if the body is not called within a task execution.
- The $EngineData class, which is a generated class that extends the EngineData interface, and contains the ruleset parameters and variables.
As in Java, when there is no ambiguity, you can directly
refer to a member by its name. However, when there is ambiguity, you
can follow the Java dot notation for accessing containing instances:
ContainingClass.this.member
The following frequently used packages are imported so that you can declare them in the
Import field without ambiguity:
- java.lang.*
- com.ibm.rules.engine.runtime.*
- com.ibm.rules.engine.ruledef.runtime.*
- com.ibm.rules.engine.ruleflow.runtime.*
Procedure
Results
You access the engine, ruleset variables, parameters, and rules directly from the BOM Editor, in which you edit the ARL mapping code.