Workflows¶
Introduction¶
With the use of workflows we can simplify the development of applications where steps should follow a specific flow depending of the outcome.
Our workflow engine implements the basics described in BPMN 2.0 by the object management group (http://www.bpmn.org/).
One of the most important concepts in our implementation is that steps can execute the same type of services as we use for our other service calls and the outcome is merged into the stream of data which travels with the case that is handled. This makes it easy to reuse existing services that the user can already interact with.
The following block diagram contains a simplified process, which add one to x and leaves the unused variable y
in it’s original state after execution.
Supported building blocks¶
Workflows can use different steps in which data is processed or evaluated, the ones supported in our framework are described below per type of service.
Event types¶
Event types define triggers that could occur during the workflow, either triggered externally or by the workflow itself.
Type |
Description |
|---|---|
startEvent |
start of a workflow, accepts parameters to start the workflow with. |
endEvent |
end of a workflow, can have more then one per workflow, flow is finished if (one of) the end(s) is finished |
intermediatecatchEvent |
service event to check if a specific event has occurred. |
Gateways¶
Gateways help to coordinate the flow of the workflow.
Gateways |
Description |
|---|---|
exclusivegateway |
follow one of the outgoing flows, depending on the flow condition. |
inclusivegateway |
merge flows together |
parallelgateway |
follow more flows at once |
Tasks¶
The task items represent work to be done, either triggered by the workflow system or somewhere else and monitored using the workflow.
Tasks |
Description |
|---|---|
task |
The base of all task types, accepts a service and (mapped) input fields |
usertask |
Standard task with additional check if any of the outgoing conditions is met. Keep task pending as long as outgoing condition is unmet. |
scripttask |
same as task |
sendtask |
same as task |
servicetask |
same as task |
subprocess |
Spawn new workflow instances for the sub workflows defined within |
Relevant classes¶
Our workflow engine is tightly integrated with sqlalchemy and consists of standard models which can be deployed using the regular tools.
The logic needed to control the workflow is part of the model implementation.
Import the models in valuea_framework.workflow into your project model package and you should be able to
use the workflow engine.
A more detailed description of how to use the system can be found in 11. Using (bpmn 2.0) workflows
