About functions

A Library contains a list of Functions that can be executed to customize the behavior of InterPlay. It is identified by a name.

A Function is implemented using java code called exits or rules. Functions are defined by:

  • A name
  • A description
  • A list of arguments. Each argument is defined by a name, a description, a data type and a flag that indicates if the argument is optional or mandatory.
  • A type that defines where this function can be used (see table).
  • An implementation, Java or Rules, that depends on the selected Type.
    If the implementation is:
    • “Java”, the identifier of the registered implementation class must be specified.
    • “Rules”, the packet of rules to execute is defined using the library and packet properties.

The following table displays the possible implementations for each type of function.

Function Type

Possible
implementation

Description
ChangeField Java, Rules Modifies the field graphical properties of a given object.
Control Java, Rules Checks the properties of a given object and returns a list of errors.
ControlImport Java, Rules Checks the properties of the imported object and returns a list of errors.
ExecuteAction Java, Rules Executes an action
ExecuteFunction Java Defines a function that can be called inside a rule definition.
GetValues Java Returns a list of values
Modify Java, Rules Modifies and controls the properties of a given object and possibly returns a list of errors.
TransformImport Java, Rules Transforms imported data into Objects and Elements.

Function calls

InterPlay calls the functions at different extension points that can be configured in the Designer by attaching function calls to configuration objects: Collection Type, Object Type, Editor, Field, Custom Action or Importer (see table). The same function can be used in several extension points.

A function call is defined by:

  • An extension point that specifies the action to customize.
  • A “When” parameter that indicates if the function must be executed before or after the associated operation.
  • A Library and Function that identify the function to call. The Function type must be compatible with the function call type.

Collection Type

Extension point When Compatible Function type Description
CreateCollection Before Control, Modify Initializes properties of newly created Collections.
ImportCollection Before Control, Modify

Initializes Collection properties after imported values are set but before importing the Collection content.

  After Control

Controls Collection properties after values are set and after the import of the collection content is performed.

SaveCollection Before Control

Returns a list of errors.

Called on the modified collection when the user saves it.

  After Control

Returns a list of errors that are displayed in the error panel.

Called once the modifications are saved into the database.

ControlImport Before ControlImport Used to control and modify the imported collection. Called before objects are imported.
  After ControlImport

Used to control the imported collection.

Called after objects are imported. Modifications at that stage are not taken into account.

TransformImport   TransformImport Used to transform the input data into Object or Element.

Object Type

Extension point When Compatible Function type Description
CopyObject Before Control, Modify Modifies values in a copied object.
After Control

Returns a list of errors

CreateObject Before Control, Modify Initializes properties of newly created Business Objects.
After Control, Modify Excel import only

Modifies values after they have been imported from a .CSV file.

DuplicateObject Before Control, Modify

Modifies values in a duplicated object.

After Control Returns a list of errors.
ImportObject After Control, Modify Modifies object properties after they are read from file and before they are stored in the database.
MoveObject Before Control, Modify Modifies values in a moved object.
After Control Returns a list of errors.
SaveObject Before Control

Returns a list of errors.

Called on each modified Business Object when the user saves it.

After Control

Returns a list of errors displayed in the error panel.

Called once the modifications are saved in the database.

Business Object Editor

Extension point When Compatible Function type Description
CheckMassUpdate Before Control

Returns an error list.

Called when the user executes a mass update. The function verifies the properties to modify during the mass update.

After Control

Generates errors after the mass update.

Field

Extension point When Compatible Function type Description
ChangeProperty   Control, Modify Modifies property values when a field value is modified.
ChangeField   ChangeField Modifies the field graphical properties when a field value is modified.
CheckValue   Control Called when the user validates an input value. The function returns an error list.
GetContextualValues   GetValues Returns a list of possible values for a Field. It is called each time the user opens the combo box of the Field.
GetInitialValues   GetValues Returns a list of possible values for a Field. It is called when the object is loaded into the editor.

Custom Actions (Global UI settings)

Extension point When Compatible Function type Description
ExecuteAction   ExecuteAction Executes a custom action and is called when the user clicks a button or selects a menu item.

For more information, refer to Specify custom actions.

Importers (Global settings)

Extension point When Compatible Function type Description
ControlImport Before ControlImport Controls and modifies the imported Collection. Called before nested elements are imported.
  After ControlImport Controls the imported collection. Called after nested elements are imported. Modifications at that stage will not be taken into account.
TransformImport   TransformImport Transforms the input data into Object or Element.

Path to objects

The path from the objects to customize to the executed code, rules or exits is illustrated below.

  1. The object to customize can be an Importer, a Field, a Collection Type, an Object Type, an Action, an Editor.
  2. A function call for a specific extension point is added to the object. The function call can take as parameters static values or variables that will be evaluated at execution time.
  3. The function call references a function that defines an interface to an implementation. The function can be implemented in Java or using rules. The rule-based functions trigger one or several packets of rules sequentially. The packet name list can be given as a parameter in the function call.
  4. Rules are organized in packets. Rules execute actions when conditions are met.

Related Links