Skip to content

Commit

Permalink
added documentation
Browse files Browse the repository at this point in the history
issue #302
  • Loading branch information
rsoika committed Sep 15, 2017
1 parent 179fe73 commit cbfd12c
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 16 deletions.
8 changes: 4 additions & 4 deletions imixs-workflow-core/src/test/resources/bpmn/split_event1.bpmn
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@
<bpmn2:sequenceFlow id="SequenceFlow_4" sourceRef="Task_3" targetRef="IntermediateCatchEvent_3"/>
<bpmn2:sequenceFlow id="SequenceFlow_11" sourceRef="Task_4" targetRef="EndEvent_1"/>
<bpmn2:sequenceFlow id="SequenceFlow_12" sourceRef="Task_5" targetRef="EndEvent_1"/>
<bpmn2:parallelGateway id="ParallelGateway_1" name="Parallel Gateway 1" gatewayDirection="Diverging">
<bpmn2:parallelGateway id="ParallelGateway_1" name="split" gatewayDirection="Diverging">
<bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
<bpmn2:outgoing>SequenceFlow_6</bpmn2:outgoing>
</bpmn2:parallelGateway>
<bpmn2:sequenceFlow id="SequenceFlow_2" sourceRef="IntermediateCatchEvent_3" targetRef="ParallelGateway_1"/>
<bpmn2:sequenceFlow id="SequenceFlow_3" name="Default (true)" sourceRef="ParallelGateway_1" targetRef="Task_4">
<bpmn2:sequenceFlow id="SequenceFlow_3" name="Master (true)" sourceRef="ParallelGateway_1" targetRef="Task_4">
<bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" id="FormalExpression_6">true</bpmn2:conditionExpression>
</bpmn2:sequenceFlow>
<bpmn2:sequenceFlow id="SequenceFlow_6" name="Version (false)" sourceRef="ParallelGateway_1" targetRef="Task_5">
Expand Down Expand Up @@ -103,7 +103,7 @@
<bpmndi:BPMNShape id="BPMNShape_ParallelGateway_1" bpmnElement="ParallelGateway_1" isMarkerVisible="true">
<dc:Bounds height="50.0" width="50.0" x="360.0" y="51.0"/>
<bpmndi:BPMNLabel id="BPMNLabel_3">
<dc:Bounds height="28.0" width="57.0" x="357.0" y="101.0"/>
<dc:Bounds height="14.0" width="23.0" x="373.0" y="101.0"/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="BPMNShape_1" targetElement="BPMNShape_Task_3">
Expand Down Expand Up @@ -141,7 +141,7 @@
<di:waypoint xsi:type="dc:Point" x="480.0" y="76.0"/>
<di:waypoint xsi:type="dc:Point" x="550.0" y="76.0"/>
<bpmndi:BPMNLabel id="BPMNLabel_6">
<dc:Bounds height="14.0" width="71.0" x="445.0" y="77.0"/>
<dc:Bounds height="14.0" width="69.0" x="446.0" y="77.0"/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="SequenceFlow_6" sourceElement="BPMNShape_ParallelGateway_1" targetElement="BPMNShape_Task_5">
Expand Down
12 changes: 6 additions & 6 deletions imixs-workflow-core/src/test/resources/bpmn/split_event2.bpmn
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,16 @@
<bpmn2:sequenceFlow id="SequenceFlow_4" sourceRef="Task_3" targetRef="IntermediateCatchEvent_3"/>
<bpmn2:sequenceFlow id="SequenceFlow_11" sourceRef="Task_4" targetRef="EndEvent_1"/>
<bpmn2:sequenceFlow id="SequenceFlow_12" sourceRef="Task_5" targetRef="EndEvent_1"/>
<bpmn2:parallelGateway id="ParallelGateway_1" name="Parallel Gateway 1" gatewayDirection="Diverging">
<bpmn2:parallelGateway id="ParallelGateway_1" name="split" gatewayDirection="Diverging">
<bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
<bpmn2:outgoing>SequenceFlow_5</bpmn2:outgoing>
</bpmn2:parallelGateway>
<bpmn2:sequenceFlow id="SequenceFlow_2" sourceRef="IntermediateCatchEvent_3" targetRef="ParallelGateway_1"/>
<bpmn2:sequenceFlow id="SequenceFlow_3" name="Default (true)" sourceRef="ParallelGateway_1" targetRef="Task_4">
<bpmn2:sequenceFlow id="SequenceFlow_3" name="Master (true)" sourceRef="ParallelGateway_1" targetRef="Task_4">
<bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression" id="FormalExpression_6">true</bpmn2:conditionExpression>
</bpmn2:sequenceFlow>
<bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_1" imixs:activityid="20" name="save">
<bpmn2:intermediateCatchEvent id="IntermediateCatchEvent_1" imixs:activityid="20" name="update">
<bpmn2:incoming>SequenceFlow_5</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_7</bpmn2:outgoing>
</bpmn2:intermediateCatchEvent>
Expand Down Expand Up @@ -108,13 +108,13 @@
<bpmndi:BPMNShape id="BPMNShape_ParallelGateway_1" bpmnElement="ParallelGateway_1" isMarkerVisible="true">
<dc:Bounds height="50.0" width="50.0" x="360.0" y="51.0"/>
<bpmndi:BPMNLabel id="BPMNLabel_3">
<dc:Bounds height="28.0" width="57.0" x="357.0" y="101.0"/>
<dc:Bounds height="14.0" width="23.0" x="373.0" y="101.0"/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="BPMNShape_IntermediateCatchEvent_1" bpmnElement="IntermediateCatchEvent_1">
<dc:Bounds height="36.0" width="36.0" x="481.0" y="152.0"/>
<bpmndi:BPMNLabel id="BPMNLabel_10">
<dc:Bounds height="14.0" width="26.0" x="486.0" y="188.0"/>
<dc:Bounds height="14.0" width="38.0" x="480.0" y="188.0"/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="BPMNShape_1" targetElement="BPMNShape_Task_3">
Expand Down Expand Up @@ -152,7 +152,7 @@
<di:waypoint xsi:type="dc:Point" x="480.0" y="76.0"/>
<di:waypoint xsi:type="dc:Point" x="550.0" y="76.0"/>
<bpmndi:BPMNLabel id="BPMNLabel_6">
<dc:Bounds height="14.0" width="71.0" x="445.0" y="77.0"/>
<dc:Bounds height="14.0" width="69.0" x="446.0" y="77.0"/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="SequenceFlow_5" sourceElement="BPMNShape_ParallelGateway_1" targetElement="BPMNShape_IntermediateCatchEvent_1">
Expand Down
20 changes: 14 additions & 6 deletions src/site/markdown/modelling/howto.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,25 @@ The script language for the boolean expression is 'JavaScript'. See the [RulePlu

## Split Events

In Imixs-Workflow an event followed by a _Parallel Gateway_ is used to create new versions of the current process instance.
The _Parallel Gateway_ creates a new version for each outcome path without checking any conditions.
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 because versioning is mainly used to archive a certain state of processing.

### Master Version
Conditions are typically not evaluated by a parallel gateway. However, in Imixs-Workflow, conditions can be used to determine which path is to be tracked by the current process instance. This process instance is called the 'Master Version'.
In Imixs-Workflow an event followed by a _Parallel Gateway_ is used to create new versions of the current process instance. This is also called a _split_ or _fork_ event.

The _Parallel Gateway_ in Imixs-Workflow creates a new version for each outcome path with a condition evaluating to 'true' or 'false'.

<img src="../images/modelling/example_10.png"/>

Conditions are typically not evaluated by a parallel gateway in BPMN 2.0. However, Imixs-Workflow evaluates these conditions to determine which path is followed by the current process instance during a split event.

The conditions of the gateway outcomes can evaluate to 'true' for the current process instance (master version), or _false_ for a new instance of the current workitem (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 because versioning is mainly used to archive a certain state of processing.

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

<img src="../images/modelling/example_11.png"/>

The second condition forks the current process instance and calls the Event 'update' with the outcome in Task 3.

The script language for the boolean expression is 'JavaScript'. See the [RulePlugin](../engine/plugins/ruleplugin.html) for further details about business rules in Imixs-Workflow.


## Link Events
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit cbfd12c

Please sign in to comment.