Function invocation

You invoke functions to call models within a decision service.

Function invocation can be used to:

  • Call decision models, predictive models, and generative AI models from decision models.
  • Call decision models, predictive models, and task models in business rules within task models.
  • Call functions defined in external libraries.

Syntax

The syntax for calling functions is:

<function name> computed from
<parameter 1> being <argument 1>
...
<parameter k> being <argument k>

Parameters can be specified in any order. They can also be omitted. If a parameter is omitted, the default value of its corresponding data type is used, for example 0 for numeric types or false for Boolean types.

Example

for each Item , in items
if the discount model computed from
   Article being this Item ,
   now being now is at most 10
then
add the price of the Item * 1.05 to decision ;