Overview of Calculation Plug-Ins

The Isight Calculation engine supports user-defined functions and operators written in Java and packaged as a plug-in. The Calculation engine provides easy access to custom calculations without having to write a custom component and is often faster than trying to execute the calculations in the Script component.

The Calculation engine is used in the Calculator component and is also used to evaluate conditions for Conditional Workflow and for While and Do/Until Loop components.

The Calculation engine can be used in a custom component to evaluate arbitrary user-entered expressions involving Isight parameters, functions, operators, and constants. Refer to the Java Doc for class com.engineous.sdk.calc.Calculation for information on using the Calculation engine in a custom component. Any user-defined functions in Calculation plug-ins are automatically accessible to a custom component that uses the Calculation engine.

Although the Script and Data Exchanger components can evaluate expressions, they use Java syntax not the Calculation engine. Custom functions created as Calculation plug-ins cannot be used from a Script component or Data Exchanger program.

A Calculation plug-in consists of the following:

  • one or more classes that implement the Function interface to implement the user-defined functions,

  • a class that implements the CalculationPlugin interface that informs the Calculation engine of the functions and operators defined in the plug-in,

  • an XML descriptor that tells Isight the name of the plug-in and the class that defines the functions, and

  • a Jar file that contains all the above.

In Isight, the Isight SDK Generator does not support Calculation plug-in development. You must create the descriptor, package the jar file, and publish manually, as described later in Overview of Creating a New Plug-In Type.

There is a complete example of a Calculation plug-in in the following directory: <Isight_install_directory>\<operating_system>\examples\development\plugins\calculation

The example includes a Windows batch file and a Linux Shell script that will compile the plug-in Java files and build a Jar file that includes the XML descriptor and a manifest.