IBM Support

Accessing the RuleApp properties from the rules, functions or B2X

Question & Answer


Question

Is it possible to access the RuleApp properties from a rule, a function or B2X code ?

Answer

The RuleApp properties are not made available to the rule engine during execution of a rule session, so that it is normally not possible to access these properties directly from a rule, a function or B2X code. It is however possible for the application to retrieve the RuleApp properties prior to the rule session execution through the use of a Ruleset Interceptor, see in the JRules product documentation:

WebSphere ILOG JRules V7.0.2 > Rule Studio > Executing rules > Concepts > Rule Execution Server > Execution

By implementing a ruleset interceptor the application can get access to the RuleApp properties by way of an IlrRuleAppInformation instance that is passed to the interceptor. The application can then pass this information along to the rule engine through one of the following options:

  • As incoming ruleset parameters : this assumes that IN parameters were added to the ruleset for the corresponding RuleApp properties. The rules, functions and B2X code can then access this information as it would of regular incoming ruleset parameters.
  • As values stored in the Executable Object Model (XOM) : this assumes the XOM is augmented with attributes to receive such information. The rules, functions and B2X code can then access this information as it would of regular XOM attributes.
To use interceptors with RuleApps on HTDS, you can package the implementation of the interceptor in the WEB-INF/lib of HTDS ear.

[{"Product":{"code":"SS6MTS","label":"WebSphere ILOG JRules"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Modules:Execution Server (BRES \/ RES)","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7.0;6.7;6.6;6.5;7.1","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}},{"Product":{"code":"SSQP76","label":"IBM Operational Decision Manager"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":null,"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7.5","Edition":"Enterprise","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
15 June 2018

UID

swg21423725