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.
Was this topic helpful?
Document Information
Modified date:
15 June 2018
UID
swg21423725