BPMN Mining
VI EN
Log in Sign up free
Docs / Formulas

Composing nested blocks

Reduce from the inside out, then solve once.

The six formulas before this handle each structure in isolation. This page explains how they are put together to compute a real process, where parallel nests inside exclusive, and exclusive nests inside a loop.

The two-step algorithm

  1. Reduce every parallel block, from the inside out. Each block becomes one synthetic node carrying the max of the times and the ∑ of the costs of its branches. After this step the graph has only exclusive branching and loops.
  2. Solve the Markov chain on the remaining graph with formula (5), which gives the expected number of visits of every step.

The overall formula

E[T]=∑v ∈ Vnv·tv      E[C]=∑v ∈ Vnv·cv
(6)

The beauty of this approach: once you have the vector n, time and cost are just two dot products over the same vector. Every complicated structure has already been swallowed into nv.

Why the reduction has to go from the inside out

A parallel block can contain another parallel block. To know the time of the outer branch, you first have to know the time of the inner block. The tool ranks the blocks by nesting depth and handles the deepest one first.

🧮 Parallel nested inside parallel

The outer block has two branches. The upper branch is itself a nested parallel block of X (30 minutes) and Y (15 minutes), followed by Z (5 minutes). The lower branch is W (12 minutes).

Step 1 — reduce the inner block:

Tinner=max(30,15)=30

Step 2 — the upper branch is now a sequential chain 30 + 5 = 35; apply (2) to the outer block:

Touter=max(35,12)=35 minutes

Cost, on the other hand, adds up all four steps, leaving none out.

A full example: the P2P process

🧮 All four structures put together in one process

The sample process P2P — Purchase to pay has all of them: a sequential chain, an exclusive gateway by authorisation limit, a parallel block waiting for the goods and the invoice, and a document reconciliation rework loop.

ComponentFormulaContribution
Requisition (PR)(1)30,00
Approval: 75%×45 + 25%×180(4)78,75
Create the PO + send to the supplier(1)35,00
max(goods receipt 120, invoice 20)(2)120,00
Reconciliation × 1,2821(5)44,87
Mismatch handling × 0,2821(5)25,38
Payment(1)40,00
E[T]374,00 minutes

Exactly the number the tool displays: 6 hours 14 minutes. You can open this sample process and check it line by line yourself.

⚠
An approximation worth knowing about
In the reduction step, the tool uses max(E[branch]) in place of E[max(branch)]. For branches with a fixed duration, the two values are equal. For branches containing randomness, max(E[·]) ≤ E[max(·)], so the analytical result is a lower bound. That is exactly why there is also a Simulation tab.
Anything unclear or missing?