How to Model with Imixs-BPMN?

Imixs-Workflow is based on the BPMN 2.0 modeling standard. BPMN enables you to describe your business process from different perspectives. You can describe the organizational aspects just to give people an understanding of your process. And you can as well model the technical details to execute your process within the Imixs-Workflow engine.

You create an Imixs-Workflow model with the Eclipse based modeling tool Imixs-BPMN. To install Imixs-BPMN see the installation guide.

Let's take look at a simple example:

The blue boxes symbolize a Task, while the yellow symbols describe an Event that changes the state within the process. This example contains two tasks: ‘New Ticket’ and ‘Open’ and the event ‘Submit’.

A process instance is always assigned to exactly one Task within your model. An event is typically triggered by a process participant within your process. This type of modeling is also known as event-driven modeling.

Event Gateways

If a Workflow Task has more than one Workflow Event, the BPMN element “Event Gateway” can be used to model alternative process flows:

A BPMN “Event Gateway” is an exclusive gateway and should always have the gateway direction ‘Diverging’. This means that the Gateway has only one incoming sequence flow but can have one or many outgoing sequence flows. The gateway direction can be changed in Eclipse-BPMN after the feature ‘Show Advanced Property Tabs’ is activated in the general workspace preferences.

Loop Events

In some cases a Workflow Event is used to update a process instance without changing the process state. For example if a user just updates a process instance:

In this case the Workflow Event can have an outgoing sequence flow pointing to the current workflow task. This is called a Loop Event. A Loop event can also be modeled using an Event Gateway:

In this example the Loop Event has one incoming and one outgoing sequence flow.

Follow-Up Events

A Workflow Event can also point to another Workflow Event. This is called a Follow-Up Event'*.

In this example the event ‘Submit’ triggers the follow-up event ‘Send E-Mail’ which finally completes the transition into the new process state ‘Open’.

Follow-Up Events are typically used in more complex scenarios where additional business rules need to be evaluated:

In this example a business rule is applied after the new order was accepted. In case the amount is below 100,- EUR the order is processed by the sales team. In case the amount is greater than 100,- EUR the order will be forwarded to the management by the follow-up event ‘forward’. The follow-up event can be used to change the properties of the workitem like ACL settings or additional notifications. A follow-up event is typically not visible. See the section Event Properties for further details.

Async Events

An Async Event is executed asynchronous after a processing life-cycle. In difference to Follow-Up Events the process instance will be persisted in a new status before a async event is executed.

Async Events are modeled as a BPMN Boundary Event with an outgoing sequence flow to an Imixs-Event element:

The event element connected to the boundary event will be executed by the Imixs-Workflow engine after a process instances reaches the corresponding task. See the section Async Events for more details.

Conditional Events

A conditional event is used to evaluate the output of an event during the processing life-cycle. A conditional-event can be placed before a ExclusiveGateway, an InclusiveGateway or an EventBasedGateway. Each output of the event must define a boolean rule expression.

In this example two conditions are added to the ExclusiveGateway output evaluating the attribute “_budget” to continue with either ‘Task 2’ or ‘Task 3’. A boolean expression can look like the following example, which is evaluating the attribute ‘_budget’:

(workitem.getItemValueDouble('_budget')>100)

Note: To add conditional sequence flows the full BPMN profile must be activated in the Imixs-BPMN Modeler.

A conditional event can define conditions for either a Task element or an Event element. See the next example:

The second condition defines a Follow-Up Event in case the ‘_budget’ is <= 100:

(workitem.getItemValueDouble('_budget')<=100) 

The script language for the boolean expression is ‘JavaScript’. See the RulePlugin for further details about business rules in Imixs-Workflow.

Note: In BPMN one so called “Default Flow” can be defined for an exclusive gateway.

The default flow is evaluated only if none of the other conditions matches.

Split Events

A split-event is used to create a new version of the current process instance. A split-event is always followed by a Parallel Gateway. This is also called a parallel-workflow.

Imixs workflow evaluates the outcome of the ParallelGateway. The Gateway must be followed by exactly one Task element and at least one Event element. For each Event element that follows the Gateway, a new version of the current process instance is created and processed directly by the Event.

Outcome Type Description
Task Main WorkItem describes the outcome for the current process instance.
Event Version triggers the creation of a new version.

As a Split Event is creating a new independent version of the current process instance, a join is typically not modeled. This means that the current process instance will not wait for all incoming flows of parallel versions. This is the default behavior in Imixs-Workflow. Split-Events are typically used to create sub-workflow, archive the current status or finalize a certain state of processing.

Link Events

In a complex process model, it can be helpful to avoid too many overlapping sequence flows. Therefore the BPMN Link Events can be used. The link event describes a connection between two elements.

In a Imixs-Workflow model a Link Event can be modeled using one intermediate “Throw Event” and one intermediate “Catch Event” from the event type ‘Link’. Both link events should have the same name to indicate the connection between them.

What's Next…

Continue reading more about: