Skip to content

Commit

Permalink
added junit tests and docu
Browse files Browse the repository at this point in the history
issue #299
  • Loading branch information
rsoika committed Sep 14, 2017
1 parent bd080f0 commit 571b3aa
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ public void testSimple()

// Now we need to evaluate if the Event is marked as an conditional Event with
// the condition list copied from the gateway.
Assert.assertTrue(activity.hasItem("keyConditions"));
Map<String,String> conditions=(Map<String,String>) activity.getItemValue("keyConditions").get(0);
Assert.assertTrue(activity.hasItem("keyExclusiveConditions"));
Map<String,String> conditions=(Map<String,String>) activity.getItemValue("keyExclusiveConditions").get(0);
Assert.assertNotNull(conditions);
Assert.assertEquals("(workitem._budget && workitem._budget[0]>100)", conditions.get("task=1100"));
Assert.assertEquals("(workitem._budget && workitem._budget[0]<=100)", conditions.get("task=1200"));
Expand Down Expand Up @@ -136,8 +136,8 @@ public void testFollowUp()

// Now we need to evaluate if the Event is marked as an conditional Event with
// the condition list copied from the gateway.
Assert.assertTrue(activity.hasItem("keyConditions"));
Map<String,String> conditions=(Map<String, String>) activity.getItemValue("keyConditions").get(0);
Assert.assertTrue(activity.hasItem("keyExclusiveConditions"));
Map<String,String> conditions=(Map<String, String>) activity.getItemValue("keyExclusiveConditions").get(0);
Assert.assertNotNull(conditions);
Assert.assertEquals("(workitem._budget && workitem._budget[0]>100)", conditions.get("task=1100"));
Assert.assertEquals("(workitem._budget && workitem._budget[0]<=100)", conditions.get("event=20"));
Expand Down
18 changes: 18 additions & 0 deletions src/site/markdown/modelling/howto.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ If a Workflow Task have more than one Workflow Event, the BPMN element "Event Ga
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 workflow state. For example if a user added new information to a workitem the status of the process instance did not change:
Expand Down Expand Up @@ -68,6 +69,23 @@ The second condition defines a Follow-Up Event in case the '_budget' is <= 100:

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.



## 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'.







## 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.
Expand Down

0 comments on commit 571b3aa

Please sign in to comment.