# BPMN sub-processes and call activities

Sub-processes and call activities are non-atomic pieces of *work* within a *business process*. They are - besides the *tasks* - a graphical representation of **Activities**.

Sub-processes can occure with different types.

### The sub-provess types, that are defined by BPMN are:

- none
- loop
- muilti-instance
- compensation
- ad hoc
- transaction


A *sub-process* is a non-atomic (compound) **Activity** that is included within a *business process* or a choreography. It is compound in that it can be broken down into a finer level of detail through a set of sub-**Activities**.

A *transaction* is a *sub-process* that is supported by a special protocol that insures that all parties involved have complete agreement that the activity should be completed or cancelled. The attributes of the activity will determine if the activity is a transaction.

| No. | JSON request / definition | JSON request / shape | Graphic display | BPMN definition | BPMN display |
|  --- | --- | --- | --- | --- | --- |
| 1 | "properties": {  "type": "subProcess",  "kind": "OBJ"}*or:*"properties": {  "type": "subProcess",  "kind": "OBJ",  "processMarker": "none"} | "properties": {  "type": "subProcess"} | ![GRAPHIC-subProcess](/assets/graphic-subprocess.f94902b999fb5ea27910245990a5dcaa085d485487c0028304dfaddc40549f48.05e3abfb.png) | <subProcess> ... </subProcess> | ![BPMN-subProcess](/assets/bpmn-subprocess.f54f6d9ea2b1c4bd05581e1f18a241fdd841313f92fa68bbb6c83a4512748911.05e3abfb.png) |
| 2 | "properties": {  "type": "subProcess",  "kind": "OBJ",  "processMarker": "parallelMultiple"} | "properties": {  "type": "subProcess"} | ![GRAPHIC-subProcessWithParallelMultiple](/assets/graphic-subprocesswithparallelmultiple.ea0ac2570282128b431a22240cd00d373eadeedd1033e4e9531a6cd38d880e4c.05e3abfb.png) | <subProcess> ... <multiInstance- LoopCharacteristics/> ... </subProcess> | ![BPMN-subProcessWithParallelMultiple](/assets/bpmn-subprocesswithparallelmultiple.5e64c3ddb37d4232af06a8af5ec90f74adaaa5786694be0f4566cf21b6ce0f10.05e3abfb.png) |
| 3 | "properties": {  "type": "subProcess",  "kind": "OBJ",  "processMarker": "loop"} | "properties": {  "type": "subProcess"} | ![GRAPHIC-subProcessWithLoop](/assets/graphic-subprocesswithloop.f425f6ff48099747add2798d138c450346f8177a9cfbe753e45695f67a2083a2.05e3abfb.png) | <subProcess> ... <standardLoop-Characteristics/> ... </subProcess> | ![BPMN-subProcessWithLoop](/assets/bpmn-subprocesswithloop.7b11c211a02624d53eaa210bd7452f31cf3e3ea5ac74bc2b33f35248af0c4161.05e3abfb.png) |
| 4 | "properties": {  "type": "subProcess",  "kind": "OBJ",  "processMarker": "compensation"} | "properties": {  "type": "subProcess"} | ![GRAPHIC-subProcessWithCompensation](/assets/graphic-subprocesswithcompensation.ba776a556796597312dfa9c2d62542ba944830eaa26245041beeb146bbe0aa90.05e3abfb.png) | <subProcess isFor-Compensation="true"> ... <standardLoop-Characteristics/> ... </subProcess> | ![BPMN-subProcessWithCompensation](/assets/bpmn-subprocesswithcompensation.d3fcc97b2be16a43dd346794e38a6995a8a61ae56e7687ef567cf7a53287343d.05e3abfb.png) |
| 5 | "properties": {  "type": "subProcess",  "kind": "OBJ",  "processMarker": "adHoc"} | "properties": {  "type": "subProcess"} | ![GRAPHIC-subProcessWithAdHoc](/assets/graphic-subprocesswithadhoc.8871d01c4f807d3f991cde0246ee8b097f17048fafe299082097511204dd33df.05e3abfb.png) | <adHocSubProcess> ... </adHocSubProcess> | ![BPMN-subProcessWithAdHoc](/assets/bpmn-subprocesswithadhoc.502a0967a084cb7a390fe10a5614f93b865451ca30f538d7ecc52ce7deba4936.05e3abfb.png) |
| 6 | "properties": {  "type": "transaction",  "kind": "OBJ"}*or:*"properties": {  "type": "transaction",  "kind": "OBJ",  "processMarker": "none"} | "properties": {  "type": "transaction"} | ![GRAPHIC-transaction](/assets/graphic-transaction.d70df50f44916b3559eefd9d8205d31a5390a723e78f81d15a4644adf62f145c.05e3abfb.png) | <transaction> ... </transaction> | ![BPMN-transaction](/assets/bpmn-transaction.c18d0800169d326bf0851c58119f901fb7e0549906bd2ac2cea13c857f92ad30.05e3abfb.png) |


### BPMN call activity

A *call activity* identifies a point in the *business process* where a global (re-used) *sub-process* or a global (re-used) *task* is used. The *call activity* acts as a wrapper for the invocation of a global *sub-process* or a global *task* within the *business process*.

| No. | JSON request / definition | JSON request / shape | Graphic display | BPMN definition | BPMN display |
|  --- | --- | --- | --- | --- | --- |
| 7 | "properties": {  "type": "callActivity",  "kind": "OBJ"}*or:*"properties": {  "type": "callActivity",  "kind": "OBJ",  "processMarker": "none"} | "properties": {  "type": "callActivity"} | ![GRAPHIC-callActivity](/assets/graphic-callactivity.fb632f62c874b4da6ee4bf14e2ebfcc94015bf53e2b839be2a5da67c912680b2.05e3abfb.png) | <callActivity> ... </callActivity> | ![BPMN-callActivity](/assets/bpmn-callactivity.b232b319868824139d4981fbd00d198b78b0c171525901e70d27cdaef17633d3.05e3abfb.png) |