← Back to Yappy
Yappy Documentation

BPMN 2.0 Shapes

Create standardized business process diagrams using BPMN 2.0 notation. Model workflows, orchestrations, and process flows with 15 dedicated shapes covering events, gateways, activities, artifacts, and swimlanes.

Available BPMN Shapes (15)

Events

ShapeSymbolDescription
Start EventThin circleEntry point that triggers a process
End EventThick circle (3x stroke)Termination point where a process ends
Intermediate EventDouble concentric circlesEvent occurring between start and end (catching or throwing)

Gateways

ShapeSymbolDescription
Exclusive (XOR)Diamond with XRoutes flow to exactly one outgoing path based on conditions
Parallel (AND)Diamond with +Splits flow into all outgoing paths simultaneously
Inclusive (OR)Diamond with ORoutes flow to one or more outgoing paths based on conditions
Event-basedDiamond with double circle + pentagonRoutes based on which event occurs first (not data conditions)

Activities

ShapeSymbolDescription
TaskRounded rectangleAn atomic unit of work within a process
Sub-ProcessRounded rectangle with [+] markerA compound activity containing a nested process
Call ActivityRounded rectangle (bold border 2.5x)Invokes a globally defined process or task

Artifacts & Swimlanes

ShapeSymbolDescription
Data ObjectDocument with folded cornerRepresents data required or produced by an activity
Data StoreCylinderPersistent data repository (database)
AnnotationOpen bracket with textAdds explanatory notes or comments to the diagram
GroupDashed rounded rectangleVisual grouping of elements for documentation purposes
Pool / LaneHorizontal banded containerOrganizes activities by participant or role (supports up to 6 lanes)

Event Type Icons (11 types)

Events can be further classified by the icon displayed inside the circle. Select an event shape and use the Event Type dropdown in the property panel.

TypeIconDescription
NoneEmptyGeneric event with no specific trigger
MessageEnvelopeTriggered by or sends a message
TimerClockTriggered by a time condition or cycle
ErrorZigzag (lightning bolt)Catches or throws an error
SignalTriangleBroadcasts or receives a signal across processes
ConditionalPage with linesTriggered when a business condition becomes true
EscalationUpward chevronEscalation raised or caught within a process
CompensationDouble rewind trianglesCompensation triggered for rollback
LinkRight-pointing pentagonOff-page connector (catch/throw pair)
TerminateFilled circleImmediately terminates the entire process
CancelX markTransaction cancellation
Tip: Catching vs Throwing

Catching events have unfilled icons (waiting for a trigger). Throwing events have filled icons (producing a trigger). Use the Fill Icon toggle to switch between catching and throwing. Start events are always catching; end events are always throwing.

Non-Interrupting Events

Start and Intermediate events support a Non-Interrupting mode (toggle in property panel). When enabled, the event border becomes dashed, indicating the event doesn't stop the enclosing activity.

Common use: boundary events on sub-processes that trigger parallel paths without interrupting the main flow.

Task Type Markers (8 types)

Tasks display a small icon in the upper-left corner to indicate how the work is performed. Select a task and use the Task Type dropdown.

TypeMarkerDescription
NoneNo markerAbstract task with no specific type
UserPersonPerformed by a human with system assistance
ServiceGearsAutomated task executed by a service or application
ScriptScrollExecuted by a business process engine script
ManualHandPerformed by a human without system assistance
SendFilled arrowSends a message to an external participant
ReceiveEnvelopeWaits for a message from an external participant
Business RuleTable/gridEvaluates a business rule (DMN decision table)

Loop/Multi-Instance Markers (5 types)

Activities can display a bottom-center marker to indicate repetition or parallel execution. Select an activity and use the Loop / Multi-Instance dropdown.

TypeMarkerDescription
NoneNo markerActivity executes once
Standard LoopCircular arrowRepeats until a condition is met (like a while loop)
Parallel Multi-InstanceThree vertical barsMultiple instances execute simultaneously
Sequential Multi-InstanceThree horizontal barsMultiple instances execute one after another
CompensationDouble rewind trianglesCompensation handler activity for rollback

Icon Customization

All BPMN markers and icons can be fine-tuned via the property panel:

PropertyTypeDescription
Icon ScaleSlider (0.5 - 2.0)Scale factor for all markers and icons within the shape
Icon ColorColor pickerOverride icon color independently of shape stroke color
Fill IconToggleFill event/gateway icons instead of outline only (catching vs throwing)

Pool Lanes

Pools support up to 6 horizontal lanes via the Lane Count slider in the property panel. Each lane represents a role or department within a participant. The left panel displays the pool label (rotated text).

Sequence Flows

BPMN uses different connection types to represent various relationships between elements. Use arrows and connectors with different styles:

Flow TypeStyleMeaning
Sequence FlowSolid arrowOrder of activities within a process
Message FlowDashed arrow (open circle to open arrowhead)Communication between participants (across pools)
AssociationDotted lineLinks artifacts (data objects, annotations) to elements

Common BPMN Patterns

Simple Sequential Process

(Start) --> [Task A] --> [Task B] --> [Task C] --> (End)

Exclusive Decision

                      --> [Approve] -->
(Start) --> <XOR> --+                    +--> (End)
                      --> [Reject]  -->

Parallel Split and Join

                      --> [Task A] -->
(Start) --> <AND> --+                    +-- <AND> --> (End)
                      --> [Task B] -->

Error Boundary Event

(Start) --> [ Service Task ] --> (End)
                  |
            (Error Event) --> [Handle Error] --> (Error End)

Timer-based Escalation

(Start) --> [ Review Task ] --> (End)
                  |
            (Timer, non-interrupting) --> [Send Reminder]

Best Practices

  • Name activities with verb-noun - "Review Order", "Send Invoice"
  • Label all gateway branches - Indicate the condition for each path
  • Use pools and lanes - Clearly separate responsibilities by role
  • Match gateway pairs - Every split gateway should have a corresponding join
  • Keep processes on one level - Use sub-processes to hide complexity
  • Flow left to right - Maintain consistent direction for readability
  • Use event-based gateways - When routing depends on external events, not data
  • Group related elements - Use the Group shape to visually organize related tasks

Quick Access

O
Circle (Event)
D
Diamond (Gateway)
R
Rectangle (Task/Activity)
A
Arrow (Sequence Flow)

Scripting (API)

Every BPMN shape can be created from the browser console (or a script) via the global window.Yappy object. Use the dedicated createBpmnShape helper (it applies a sensible default size per shape) or the generic createElement.

// Build a tiny process: Start -> Task -> End
const start = Yappy.createBpmnShape('bpmnStartEvent', 100, 200);
const task  = Yappy.createBpmnShape('bpmnTask', 200, 190, 120, 80, { containerText: 'Review Order' });
const end   = Yappy.createBpmnShape('bpmnEndEvent', 380, 200);

// Connect them with sequence-flow arrows
Yappy.createArrow(150, 225, 200, 230);
Yappy.createArrow(320, 230, 380, 225);

Shape type strings: bpmnStartEvent, bpmnEndEvent, bpmnIntermediateEvent, bpmnExclusiveGateway, bpmnParallelGateway, bpmnInclusiveGateway, bpmnEventGateway, bpmnTask, bpmnSubProcess, bpmnCallActivity, bpmnDataObject, bpmnDataStore, bpmnAnnotation, bpmnGroup, bpmnPool.

Setting event / task / loop markers

The property-panel dropdowns map to element attributes you can set with updateElement:

// A timer intermediate event + a user task with a parallel multi-instance marker
const timer = Yappy.createBpmnShape('bpmnIntermediateEvent', 200, 300);
Yappy.updateElement(timer, { bpmnEventType: 'timer' });

const t = Yappy.createBpmnShape('bpmnTask', 300, 290, 120, 80);
Yappy.updateElement(t, { bpmnTaskType: 'user', bpmnLoopType: 'parallel' });
AttributeAccepted values
bpmnEventTypenone, message, timer, error, signal, conditional, escalation, compensation, link, terminate, cancel
bpmnTaskTypenone, user, service, script, manual, send, receive, businessRule
bpmnLoopTypenone, standard, parallel, sequential, compensation