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.
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.