Call Embedded Rules in Scripting Rules
You can simply run solver of another rules directly from Scripting Rule.
How to call embedded rules
You can run solver of other rules from Scripting Rule.
Solver is available under class DR and method solve().
DR.solve(ruleId, data, version, SolverStrategy)
Everything that you need is the rule ID and solver input data. Optionally, you may specify the version of the called rule and the execution strategy.
Parameters
name
type
mandatory
description
ruleId
string
Id of solving rule. You can also use rule alias.
data
any
Input data for solver
version
number
Version of solving rule
Return type
DR.solve() is returning the response from Solver as Array.
Examples
Basic method
Method with rule version
Method with Solver Strategy
Example of usage
Decision table 1: "0000-0000-0000-0000"
Input Model
Output Model
Table

Decision table 2: "1111-1111-1111-1111"
Input Model
Output Model
Table

Scripting Rule
Script
Input
Output
Was this helpful?

