Adding function libraries

This section describes what programmers have to do to add new function libraries to Aware IM.

Function libraries contain functions that can be used in the Rule Language (see Rule Language). Aware IM includes some standard function libraries, such as the Date Function Library and Maths Function Library, which contain functions that work with date/time as well as some standard mathematical functions. You can find the complete list of functions supported by Aware IM in the function list. These functions should be sufficient for most standard needs. However in certain cases it may be necessary to provide new functions – for example, functions that perform calculations in different mathematical areas, some non-standard processing of strings etc.

Note that unlike processes functions are not supposed to communicate with the rest of the Aware IM system – they are not supposed to change attributes of business objects, update objects in the database etc. Functions are only supposed to perform calculations and return the result.

Functions are organized in libraries. The grouping of functions in a library is up to the designer of the library. The name of the function must be unique across all libraries, so it is generally a good idea to start the name of the function with a prefix uniquely identifying the library that the function belongs to.

To add a new function library to Aware IM follow the steps below:

  1. Write the code for the component that will implement functions of the library (see Implementing function library for details)
  2. Compile the source code of your function library component and package it in a jar file(s). Make sure that the jar file resides in the AwareIM/CustomJars directory (see General Guidelines)
  3. Add a definition of the new function library to the BASServer.props file located in the BIN directory of your Aware IM installation. You have to add a line that provides the fully qualified name of the function library component. The name of the property must start with the FunctionLibrary prefix and the value must be the fully qualified name of the component. For example:FunctionLibraryStatistics=com.mypackage.StatisticsLibrary

If everything has been done correctly the name of the new functions must appear in the list of functions displayed by the Rule Language Context Assistant.

  • Last modified: 2023/04/05 07:50