Decision Management (ODM,ADS)

Decision Management (ODM, ADS)

Connect with experts and peers to elevate technical expertise, solve problems and share insights

 View Only
Expand all | Collapse all

How to migrate the IRL code to Decision Engine

  • 1.  How to migrate the IRL code to Decision Engine

    Posted Fri April 30, 2021 04:24 PM

    Our rule projects contains some IRL code (rule flow, functions, etc) in rules using Classic Rule Engine, how do to migrate these code to Decision Engine? I do not find a place to enter ARL code in ruleflow editor. We are using IlrContext method such as ?context.getParameterValue() in IRL code.



    #OperationalDecisionManager(ODM)
    #Support
    #SupportMigration


  • 2.  RE: How to migrate the IRL code to Decision Engine
    Best Answer

    Posted Fri April 30, 2021 04:42 PM

    You cannot directly write ARL (except in B2Xa method implementation), it is more a read-only language, and shows how business rules are interpreted by decision engine.

    https://www.ibm.com/docs/en/odm/8.10?topic=languages-advanced-rule-language-arl

    For places where IRL are used in classic rule engine (technical rules, ruleflows, functions), you still use IRL in Decision Engine, do not need to switch to ARL.

    But as IlrContext is only available in CRE, and the corresponding DE engine methods are only available in ARL. You have to change the IRL code where IlrContext is used to indirectly use the DE engine methods via B2Xa.

    For example, if some initial Action IRL code in your ruleflow is using ?context.getParameterValue(), then you can firstly create a BOM method:

    static object getParamByName(String paramName)

    and implement the method in B2Xa code using ARL:

    return get(paramName);

    Then you can use the above BOM method in your ruleflow IRL code.



    #OperationalDecisionManager(ODM)
    #Support
    #SupportMigration