Home > Workflow

Workflow Definition


Defining a process

A process is defined through three steps, within the branch Workflow - definitions.

The image below shows this definition:

Steps declaration

A step is attached to a process, and defined within the process by a unique identifier.

The step can be specialized by specific properties of its type (one associated object by type). A step is associated to only one type.

Script tasks

Two script task types are available:

Library script tasks

Library script tasks are classes extending ScriptTaskBean .

The method executeScript() is called when the process reaches the matching step as in the following example . This method must not start any Thread because the process goes forward when this method is over. So, each operation must be synchronous in this method.

It is possible to dynamically set variables of the bean if the bean follows the Java Bean Specification. Variables must be declared as parameters of the bean in module.xml. Data context is not accessible in Java Bean.

EBX.Platform provides built-in script tasks:

Specific script tasks

Specific script tasks are classes extending ScriptTask .

The method executeScript() is called when the process reaches the matching step as in the following example . This method must not start any Thread because the process goes forward when this method is over. So, each operation must be synchronous in this method.

It is not possible to dynamically set variables of the bean for specific script tasks. But the data context is accessible in Java Bean.

Conditions

Two condition types are available:

Library conditions

Library conditions are classes extending ConditionBean as shown in the following example .

It is possible to dynamically set variables of the bean if the bean follows the Java Bean Specification. Variables must be declared as parameters of the bean in module.xml. Data context is not accessible in Java Bean.

EBX.Platform provides built-in conditions:

Specific conditions

Specific conditions are classes extending Condition as shown in the following example .

It is not possible to set variables of the bean dynamically for specific conditions. But the data context is accessible in the Java Bean.

User Tasks

User tasks are classes extending UserTask .

The method handleCreate is called to initiate the user transaction. This method will create and allocate as many work items as necessary: if this method has not been overridden, its default behavior is to use the list of selected profiles. In concrete terms, for each selected profile, a work item is created.

At runtime, by default, the user task is considered as completed when all its work items are accepted. It is possible to change this behavior by selecting an other completion strategy:

If no error threshold is defined for the user task, the workflow stops if a work item is rejected at runtime: this field defines the number of rejects that is allowed at runtime. An exception is made for strategies which handle reject ('Terminate the user task as soon as all its work items are completed' and 'Terminate the user task as soon as all its work items are accepted or as soon as one work item is rejected'). For these strategies, rejects are always allowed.

The method handleCreate can be overridden as shown in the following example .

A User Task matches a Manager Component .

Built-in services

The following built-in services are provided:

Specific UI services

In addition to built-in services, the user can define a specific UI Service, on adaptation or on branch or on version.

UI service declaration

Specific UI services must be declared in module.xml in order to be available in user task definition, as in the following example .

For more information, see also InteractionHelper .

Service extensions

It is possible to extend services in module.xml. Extension is available for all service types (built-in, module, adaptation). Thanks to extension, the user can create a new service from an existing service with its own description, label and additional properties. In this way, the user can add specific parameters to built-in services (only input parameters for built-in services).

Except for built-in services, the service extension and the extended service must be declared in the same module.xml file.

Service extensions cannot be extended. Overwriting properties is not allowed.

For more information, see too InteractionHelper .

Input variables

Variable names represent the input variables of the service to be invoked. They are automatically displayed when the user selects a service in a drop-down list (the display is based on service declaration in module.xml).

The value can be either a variable from the Data Context as ${variable} or a constant.

Output variables

Output values describe the mapping to do into the DataContext. For instance, the output parameter could be named xpath , and be set into the Data Context as code

Output variables are automatically displayed when the user selects a service in the drop-down list (the display is based on the service declaration in module.xml).

Optional reject

By default, reject is disabled. In this mode, during work item execution, only the 'Accept' button is displayed.

It is possible to enable reject for a user task, in user task definition.

Temporal tasks

Workflow provides two functionalities for verifying that user tasks are completed on time.

Mail reminder

It is possible to specify a periodicity (in days) for the mail reminder. When this time period is elapsed, notifications are sent again for non completed tasks. Mail reminders are sent as long as the task is not completed (one mail by day at most).

Deadline

A user task can have a deadline. When this date is passed and the associated task is not completed, a specific mail is sent to the concerned users. This mail will then be re-sent once a day until task completion.

The periodicity of checks can be specified: for more information, see the workflow configuration.

There are two deadline types:

Link between steps

Two steps may be linked together. A relation can be qualified in three different ways:

Home > Workflow