Creating User-Defined Function

  • Updated

User-Defined Function Libraries

User-Defined Functions are organized into libraries in irAuthor. Click on the Add Library button to insert the library. As with other rule application elements, the library may be named by the user.

User-Defined Functions (UDFs)

Right-click on a User-Defined Function Library to add a User-Defined Function (UDF).

UDF Settings Tab

The following properties are available to the user in the UDF Settings Tab:

  • Name - The user-configured name of the UDF. Along with the library name, this will be the name used to refer to the function from rules in the rule application.
  • Return Type - The data type of the value returned when the function is invoked from a rule.
  • Entity - The applicable entity context of the data structure for the function. Indicates the accessibility of fields, calculations, and other entities/collections in the function.
  • Parameters - The zero or more arguments that are passed into the function when it is invoked.
  • IrScript - The set of statements that define the function using a dynamic, JavaScript-like language called irScript. A more complete definition of irScript can be found in the irScript User Guide that is included as part of the InRule installation. Select Start->All Programs -> InRule to launch the irScript User Guide

Note - Autocompletion menus are available for user guidance when creating UDFs. Press Ctrl+SPACE to open the autocompletion menus.


Modify State Refresh Options Hyperlink

State Refresh Options specify how state is maintained for any bound assembly schema accessed from the UDF. By default a full state refresh for all assembly bound entity arguments is enabled. Users can author these options similar to bound assembly methods and function library methods.

Was this article helpful?

0 out of 0 found this helpful



Please sign in to leave a comment.