Creating functions

You write a function using the ILOG® Rule Language (IRL).

About this task

A function is a procedural item in a ruleset. You write functions in the ILOG Rule Language (IRL), using the Function Editor in Rule Designer.

Procedure

To write a function:

  1. To open the Function Editor, right-click an item in the Rule Explorer and then on the New menu select Function.
  2. In the New Function dialog box, specify the following details:
    • Function Name: Specify a name for the new function.

    • Optional: Complete the Source Folder field.

    • Optional: Complete the Package Name field.

    Decision Server creates the function file and opens the Text view of the new function. The Rule Explorer tree displays the new function name.

  3. Click Finish.
  4. Click the Edit Signature link to open and edit the function signature.

    For example, you can add parameters and change the function type.

  5. Click the Text tab to return to the function text view.
  6. Enter the function code in the Content area.