This shows you the differences between two versions of the page.
docs:bpwiki-tutorial [2017/09/19 14:31] |
docs:bpwiki-tutorial [2022/03/23 16:59] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== 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: | ||
+ | |||
+ | **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 [[docs: | ||
+ | |||
+ | |||
+ | ===== Structure of SimpleBPMN ===== | ||
+ | |||
+ | The SimpleBPMN notation is case-sensitive. The whole code on the Wiki page should be between ''< | ||
+ | |||
+ | 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/ | ||
+ | * names of objects/ | ||
+ | * 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: " | ||
+ | events:{ | ||
+ | ... | ||
+ | }, | ||
+ | activities: | ||
+ | ... | ||
+ | }, | ||
+ | gates:{ | ||
+ | ... | ||
+ | }, | ||
+ | flow:{ | ||
+ | ... | ||
+ | } | ||
+ | } //closing braces | ||
+ | |||
+ | </ | ||
+ | |||
+ | **Additional tag options** | ||
+ | |||
+ | To ''< | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | ===== Events ===== | ||
+ | |||
+ | Defining events - there are tree sections corresponding to tree event types: | ||
+ | |||
+ | < | ||
+ | { | ||
+ | events:{ | ||
+ | start:{ | ||
+ | }, | ||
+ | end:{ | ||
+ | }, | ||
+ | intermediate: | ||
+ | } | ||
+ | } | ||
+ | ... | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | **Event schema** | ||
+ | |||
+ | Event can have specified parameters: | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | 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: " | ||
+ | type: message, | ||
+ | nonInterrupting: | ||
+ | throwing: | ||
+ | }, | ||
+ | event_id2: " | ||
+ | ... | ||
+ | } | ||
+ | }, | ||
+ | ... | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | __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 | '' | ||
+ | | Timer | Timeout, interval or point in time Yes timer | '' | ||
+ | | Escalation | Delegation to the higher level of responsibility Yes escalation | '' | ||
+ | | Conditional | Dealing with changes in conditions, integrating business rules | '' | ||
+ | | Link | Forming a sequence flow through two corresponding Events | '' | ||
+ | | Error | Raising and catching errors Yes error | '' | ||
+ | | Cancel | Canceling the transaction or reacting to it Yes cancel | '' | ||
+ | | Compensation | Handling or triggering compensation Yes compensation | '' | ||
+ | | Signal | Emitting and receiving signals between Processes. Thrown signal can be caught many times | '' | ||
+ | | Multiple | Throwing all defined Events and reacting to anyof them | '' | ||
+ | | Parallel Multiple | Catching all defined parallel Events Yes parallel | '' | ||
+ | | Terminate | Terminating the Process Yes terminate | '' | ||
+ | |||
+ | [[.: | ||
+ | |||
+ | ===== Activities ===== | ||
+ | |||
+ | As mentioned before, activities can have one of four types ('' | ||
+ | |||
+ | Parameters of activity: | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | [[.: | ||
+ | |||
+ | Activity defined as default type - '' | ||
+ | < | ||
+ | { | ||
+ | ... | ||
+ | activities: | ||
+ | activity_id1: | ||
+ | name: " | ||
+ | type: user, | ||
+ | activityType: | ||
+ | markers: [loop], | ||
+ | boundary: | ||
+ | instantiate: | ||
+ | } | ||
+ | }, | ||
+ | ... | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | __Defining Sub-Process__ | ||
+ | |||
+ | Activity defined as '' | ||
+ | < | ||
+ | { | ||
+ | ... | ||
+ | activities: | ||
+ | activity_id2: | ||
+ | name: " | ||
+ | type: manual, | ||
+ | markers: [parallel], | ||
+ | boundary: | ||
+ | events:{ | ||
+ | }, | ||
+ | activities: | ||
+ | }, | ||
+ | gateways: | ||
+ | }, | ||
+ | flow:{ | ||
+ | } | ||
+ | } | ||
+ | }, | ||
+ | ... | ||
+ | } | ||
+ | </ | ||
+ | [[.: | ||
+ | < | ||
+ | { | ||
+ | ... | ||
+ | activities: | ||
+ | [[bpmn> | ||
+ | |||
+ | }, | ||
+ | ... | ||
+ | }</ | ||
+ | |||
+ | </ | ||
+ | In case subprocess isn't yet defined there will be empty link generated, so subprocess can be easily created. | ||
+ | |||
+ | [[.: | ||
+ | |||
+ | [[.: | ||
+ | |||
+ | Activity without additional parameters can be shortened only to identifier and name: | ||
+ | < | ||
+ | { | ||
+ | ... | ||
+ | activities: | ||
+ | activity_id3: | ||
+ | ... | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | __Table 2 - Acitivities: | ||
+ | ^Task Type ^Task Description ^ type ^ | ||
+ | | Abstract | General task | | | ||
+ | | Service | Indicates the use of some kind of service, like Web service or automated application| '' | ||
+ | | Send | Sending a message to another Participant | '' | ||
+ | | Receive | Receiving a message from another Participant | '' | ||
+ | | User | Task performed by a human with the assistance of software application | '' | ||
+ | | Manual | Task performed by a human that does not require any software aid | '' | ||
+ | | Business Rule | Mechanism for Process to provide input to the Business Rule Engine and receive answers | '' | ||
+ | | Script | Executing a specified script | '' | ||
+ | |||
+ | __Table 3 - Acitivities: | ||
+ | ^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. | '' | ||
+ | | 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. | '' | ||
+ | | Call Activity | Indicates a call tho globally defined Task or Sub-Process. | '' | ||
+ | |||
+ | __Table 4 - Acitivities: | ||
+ | ^Marker Type ^Marker Description ^marker ^ | ||
+ | | Sub-Process | Indicates that Activity is a Sub-Process. Marked Activity may be in collapsed or extended state. | '' | ||
+ | | Loop | Defines looping behavior based on a boolean condition | '' | ||
+ | | Parallel | Allows for creation of a desired number of parallel Activity instances | '' | ||
+ | | Sequential | Allows for creation of a desired number of sequential Activity instances | '' | ||
+ | | 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 | '' | ||
+ | | Compensation | Indicates a compensation handler. It performs the steps necessary to reverse the effects of an Activity | '' | ||
+ | |||
+ | ===== Gateways ===== | ||
+ | |||
+ | Possible parameters for gateway: | ||
+ | |||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | < | ||
+ | { | ||
+ | gateways:{ | ||
+ | gateway_id: | ||
+ | name: " | ||
+ | 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 | '' | ||
+ | | Parallel | It activates all outgoing branches at the same time or waits for all incoming ones before outgoing flow is activated | '' | ||
+ | | Inclusive | It activates one or more outgoing branches at the same time or waits for all incoming ones before outgoing flow is activated | '' | ||
+ | | Complex | Complex behavior that is not covered by other gateways | '' | ||
+ | |||
+ | ===== 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 " | ||
+ | * default connection. | ||
+ | |||
+ | To define it see schema. | ||
+ | |||
+ | < | ||
+ | { | ||
+ | ... | ||
+ | flow:{ | ||
+ | flow_normal: | ||
+ | object_from_id, | ||
+ | object_to_id | ||
+ | ], | ||
+ | flow_conditional: | ||
+ | object_from_id, | ||
+ | object_to_id, | ||
+ | " | ||
+ | ], | ||
+ | flow_default: | ||
+ | object_from_id, | ||
+ | object_to_id, | ||
+ | true | ||
+ | ] | ||
+ | } | ||
+ | ... | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | [[bpwiki: | ||
+ | |||
+ | ===== Description of the files in SimpleBPMN Plugin ===== | ||
+ | |||
+ | [[.: |