Decision Management & Intelligence (ODM, DI)

 View Only

 Accessing Ruleset Properties at Runtime

Jump to  Best Answer
Eduardo Izquierdo Lázaro's profile image
Eduardo Izquierdo Lázaro posted Tue August 19, 2025 09:11 AM

For auditability and compliance reasons, I need to get access at runtime to ruleset property “decisionservice.branch.name”. This property is set automatically by Decision Center after generating the snapshot for the deployment.

In ARL code, EngineData interface gives access to ruleset parameters and variables but no to the properties.

Is there equivalent interface to get ruleset properties at runtime?

Is there other way to access ruleset properties in ARL code?

Thanks.

Alain Robert's profile image
Alain Robert  Best Answer

Unfortunately, 

there is no way currently to access ruleset/rulapp properties from within the engine

this is a recurring request https://ideas.ibm.com/ideas/ODMNS-I-180, you can add your vote to it. 

Eduardo Izquierdo Lázaro's profile image
Eduardo Izquierdo Lázaro

Thanks Alain, voted!!

Eduardo Izquierdo Lázaro's profile image
Eduardo Izquierdo Lázaro

Hi again, we voted for the feature and in the meantime, we’re exploring alternative solution using IlrSessionInterceptor.

According to the doc (Ruleset interceptors - IBM Documentation) IlrSessionInterceptor can be used to Augment input parameters, so we’re are trying to add and additional input parameter “snapshot” (declared in the ruleset) with the value of the property  "decisionservice.branch.name".

In the method IlrSessionInterceptor .beforeExecute(IlrInterceptorContext context) is not possible because context.getRuleAppInformation() returns null. The documentation says “Returns RuleApp information. This object is loaded on demand by means of a management session.” Is not very clear what dees it mean, but allways returns null.

However, in the method transformRsPath(IlrPath path, IlrRuleAppInformation rappinfo, Serializable userData, Map<String, Object> parameters, IlrSessionFactory factory) is possible to get the snapshotName. But after adding “snapshot” to the request parameters argument of this method, it is simply ignored (it is not send as input parameter to the execution).

How can be used the IlrSessionInterceptor to augment input parameters?

@Alain Robert do you think we get to the objective following this approach? 

Alain Robert's profile image
Alain Robert

Yes the interceptor would be a way to achieve what you need. 

We have been discouraging the use of the interceptor because it can have a serious impact on performances due to the use of the mbean server to resolve the ruleapps. So be careful with this and evaluate the performance in production like settings.

Only the path is used from the result to the call to transformRsPath. You cannot change the parameters there. It has to be done in the beforeExecute.

When you invoke getRuleAppInformation() if there is not a value already then a management session is created and the ruleapp information is loaded. This should never be null when you are in before or after methods, the session code initializes the value and verifies that it is not null.

In the worth case maybe you can use the transformRSPath to save the information you need from the ruleappinformation in the interceptor and reuse that in the beforeExecute method.