User Tools

Site Tools


Sidebar

Hello!

Start here!

Download

Loki Semantic Wiki

BiFröST Framework

Semantic Business Platform

BPWiki

SBVRwiki

Other Projects



docs:bpwiki-tutorial

BPwiki Tutorial

SimpleBPMN is a plugin for DokuWiki - in order to work with it you have to have it installed. You can download it from downloads page.

SimpleBPMN Notation

SimpleBPMN is a JSON based notation focusing on the Process Diagrams. Since BPMN has more types of sub-models, SimpleBPMN covers only some elements that is offered by BPMN itself.

In this tutorial, you will get to know how to prepare BP models using SimpleBPMN plugin. Let's start!

If you need a quick introduction to Business Process, see this page.

Structure of SimpleBPMN

The SimpleBPMN notation is case-sensitive. The whole code on the Wiki page should be between <bpmn> </bpmn> tags. Inside tags Process is defined between braces {}. The whole Process can have (optionally) name (first specified thing after opening brace); afterwards there are definitions of all the objects in process.

General rules:

  • after identifier of object or after particular attribute of object there is colon (:)
  • after object id with colon there are (usually) braces ({}) inside which are defined attributes of object
  • after each object/attribute at the same level (eg. attributes of the same object) there is comma (,)
  • names of objects/attributes are written in quotes (“”)
  • in case of flow instead of braces there are brackets ([])
  • comments after two slashes
  • each object has to have identifier and can have optional parameters

Rules in practice:

{  //opening braces

	name: "Process 1", //optional name
	events:{
	        ...
	},
	activities:{
		...
	},
	gates:{
		...
	},
	flow:{
		...
	}
} //closing braces

Additional tag options

To <bpmn> tag there can be added additional parameters:

  • subprocess=collapse or subprocess=expand - it's used for sub-processes to specify how it should be displayed
  • diagram=before or diagram=after - used to specify position of diagram to the code block

Events

Defining events - there are tree sections corresponding to tree event types:

{
	events:{
		start:{	
		},
		end:{
		},
		intermediate:{
		}
	}
...
}

Event schema

Event can have specified parameters:

  • name - possible value: string in quotes “”; name of the event
  • type - possible value: see Table 1; specifies what event is connected to the event (eg. message); default type is none (no particular type is specified)
  • throwing - default: false, possible value: true; eg. error throwing vs error catching; default state for intermediate events is catching unless specified throwing:true - it can be done for: Message, Escalation, Compensation, Link, Signal and Multiple Events.
  • nonInterrupting - default: false, possible value: true; specifies whether or not the event interrupts the whole process (and should be dealt with) or not, eg. Interrupting error makes some new branch of the flow on order to do something with the error vs nonInterrupting error only indicates sth and doesn't change the flow; default false, affected events: Message, Timer, Escalation, Conditional, Signal, Multiple and Parallel Multiple.

If there are parameters specified for the event there have to be event id, colon (:) and parameters in braces ({}) - like event_id1. However when there is only name specified for the event shorter version can be used - see event_id2.

{
...
	events:{
		...
		intermediate:{
			event_id1: {
				name: "Intermediate event 1",
				type: message,
				nonInterrupting: true,
				throwing: true
			},
                        event_id2: "Intermediate event 2",
                        ...
		}
	},
...
}

Table 1 - Events: Values for type parameter

Event Type type
None Untyped events – a general start/end point or state change
Message Sending and receiving messages Yes message message
Timer Timeout, interval or point in time Yes timer timer
Escalation Delegation to the higher level of responsibility Yes escalation escalation
Conditional Dealing with changes in conditions, integrating business rules conditional
Link Forming a sequence flow through two corresponding Events link
Error Raising and catching errors Yes error error
Cancel Canceling the transaction or reacting to it Yes cancel cancel
Compensation Handling or triggering compensation Yes compensation compensation
Signal Emitting and receiving signals between Processes. Thrown signal can be caught many times signal
Multiple Throwing all defined Events and reacting to anyof them multiple
Parallel Multiple Catching all defined parallel Events Yes parallel parallel
Terminate Terminating the Process Yes terminate terminate

Types of Events

Activities

As mentioned before, activities can have one of four types (activityType): Task, Transaction, Event Sub-Process and Call Activity. Assuming only basic attributes are defined (see schema Activity 1 below) default type of Activity is Task, other kind of activities can be set by using the type attribute (see the table). Additionally, an Activity can be recognized as Sub-Process when inside the activity definition (after the basic attributes) there are tags events, activities, gateways and flow (see schema Activity 2).

Parameters of activity:

  • name - possible value: string in quotes ””; name of the activity;
  • type - possible value: see Table 2; type is defined according to participant of task (see Task section ); can be defined only for Tasks, they are ignored while defined in Sub-Process;
  • activityType - possible value: see Table 3; decribed above;
  • markers - possible value: see Table 4; list of values (seperated with commas);
  • boundary - possible value: identifier of event; activities can be interrupted by some event, eg. for the task of implementing assignment till the end of semester the event that will interrupt this task is actual end of the semester. Therefore if boundary is defined the task will have additional event “sticked” to it, which means that it can be intruded by this event. Events themselves must be defined in the parent event:intermediate section.
  • instantiate - default: false; possible values: true;

Boundary Activity Example - Example which has a boundary activity - when the time is up for the masters it gets interrupted.

Activity defined as default type - Task.

{
...
	activities:{
		activity_id1: {
			name: "Activity 1",
			type: user,
			activityType: transaction,
			markers: [loop],
			boundary: [event_in_parent_id],
			instantiate: true
		}
	},
...
}

Defining Sub-Process

Activity defined as Sub-Process (thanks to defining events, activities, gateways and flow).

{
...
	activities:{
		activity_id2: {
			name: "Activity 2 - Sub-Process",
			type: manual,
			markers: [parallel],
			boundary: [event_id],
			events:{
			},
			activities:{
			},
			gateways:{
			},
			flow:{
			}
		}
	},
...
}
Example of Sub-Process defined as in schema above
{
...
	activities: {
		[[bpmn>parent_link:subprocess_link]]

	},
...
}</bpmn>
In case subprocess isn't yet defined there will be empty link generated, so subprocess can be easily created.

Example of Sub-Process defined as in schema above

Example of Sub-Process defined by marker subprocess

Activity without additional parameters can be shortened only to identifier and name:

{
...
	activities: ...
		activity_id3: "Activity 3 - Shortened",
...
}

Table 2 - Acitivities: Values for type parameter - Only for Tasks!

Task Type Task Description type
Abstract General task
Service Indicates the use of some kind of service, like Web service or automated application service
Send Sending a message to another Participant send
Receive Receiving a message from another Participant receive
User Task performed by a human with the assistance of software application user
Manual Task performed by a human that does not require any software aid manual
Business Rule Mechanism for Process to provide input to the Business Rule Engine and receive answers business
Script Executing a specified script script

Table 3 - Acitivities: Values for activityType parameter

Activity Type Activity Description activityType
Task Unit of work to be performed. Can be typed to indicate the kind of task. Can be atomic or compound (Sub-Process)
Transaction A group of logically connected activites, that may follow some protocol. transaction
Event Sub-Process Places as a part of Process or Sub-Process. Depending on the starting event can interrupt the main flow or run in parallel. Activates when starting Event is triggered. event
Call Activity Indicates a call tho globally defined Task or Sub-Process. call

Table 4 - Acitivities: Values for markers parameter

Marker Type Marker Description marker
Sub-Process Indicates that Activity is a Sub-Process. Marked Activity may be in collapsed or extended state. subprocess
Loop Defines looping behavior based on a boolean condition loop
Parallel Allows for creation of a desired number of parallel Activity instances parallel
Sequential Allows for creation of a desired number of sequential Activity instances sequential
Ad Hoc Indicates a Process or Sub-Process with flexible or partially flexible ordering in which its Activities are executed. Final execution order is determined at the runtime adhoc
Compensation Indicates a compensation handler. It performs the steps necessary to reverse the effects of an Activity compensation

Gateways

Possible parameters for gateway:

  • name - possible value: string in quotes ””; name of the activity;
  • type - default: exclusive; possible values: see Table 5;

{
	gateways:{
		gateway_id: {
			name: "Gateway 1",
			type: parallel
		}
	},
}

Table 5 - Gateways: Values for type parameter

Gateway Type Gateway Description type
Exclusive It activates exactly one of outgoing branches or waits for exactly one of the incoming ones
Event-based Followed by catching Events or the Receive Tasks, it activates the branch for the Event that was triggered first event
Parallel It activates all outgoing branches at the same time or waits for all incoming ones before outgoing flow is activated parallel
Inclusive It activates one or more outgoing branches at the same time or waits for all incoming ones before outgoing flow is activated inclusive
Complex Complex behavior that is not covered by other gateways complex

Flow

Order of Flow Elements (which are the elements available in SimpleBPMN) is provided by Sequence Flow. Sequence Flow has exactly one source and one target. It can connect all the elements: events, tasks, sub-processes and gateways. When defining flow always connect two elements and use brackets (see schema below).

There are three types of flow connections between elements:

  • normal connection;
  • conditional connection - it will make the “Condition” appear above the arrow;
  • default connection.

To define it see schema.

{
...
	flow:{
		flow_normal: [
			object_from_id,
			object_to_id
		],
		flow_conditional: [
			object_from_id,
			object_to_id,
			"Condition"
		],
		flow_default: [
			object_from_id,
			object_to_id,
			true
		]
	}
...
}

Complicated example from book BPMN 2.0 by Example

Description of the files in SimpleBPMN Plugin



docs/bpwiki-tutorial.txt · Last modified: 2022/03/23 16:59 (external edit)