Notifying a XU on Java EE of a ruleset update
In a Java™ EE application, you can notify the execution unit (XU) that a ruleset is no longer valid because it has been updated.
About this task
To notify the XU of a ruleset update on Java EE, use a rule session factory and the invalidate method. When a ruleset is invalidated, that ruleset is parsed at the next request. Therefore, this action can significantly affect performance.
The invalidate method takes a canonical ruleset path. To retrieve the canonical ruleset path, use the solveRulesetPath method.
Procedure
Example
Here is the entire code sample.
IlrSessionFactory sessionFactory = new IlrPOJOSessionFactory();
IlrManagementSession managementSession=sessionFactory.createManagementSession();
IlrPath rulesetPath = IlrPath.parsePath("/RuleApp/1.0/RuleSet/1.0");
managementSession.invalidate(rulesetPath);