BPMN event in Blazor Diagram Component

8 Jun 202310 minutes to read

An Event is a common BPMN process model element that represents something that happens during a business process and is notated with a circle. The type of events are as follows:

  • Start - Indicates the beginning of the process and every business process start with an event.
  • Intermediate - Indicates the middle of the process.
  • End - Indicates the beginning of the process and every business process end with an event.

The EventType property of the node allows you to define the type of the event. The default value of the event is Start. The following code example explains how to create a BPMN event.

@using Syncfusion.Blazor.Diagram

@* Initialize Diagram *@
<SfDiagramComponent Height="600px" Nodes="@nodes" />

@code
{
    // Initialize node collection with Node.
    DiagramObjectCollection<Node> nodes;

    protected override void OnInitialized()
    {
        nodes = new DiagramObjectCollection<Node>();
        Node node = new Node()
        {
            // Position of the node.
            OffsetX = 100,
            OffsetY = 100,
            // Size of the node.
            Width = 100,
            Height = 100,
            // Unique Id of the node.
            ID = "node1",
            //Sets shape as BpmnEvent.
            Shape = new BpmnEvent()
            {
                // Set the event type as End.
                EventType = BpmnEventType.End,
            }
        };
        nodes.Add(node);
    }
}

You can download a complete working sample from GitHub

None Trigger End event event BPMNShape

BPMN event trigger

Event triggers are notated as icons inside the circle and they represent the specific details of the process. The Trigger property of the node allows you to set the type of trigger and by default, it is set to None. The following code example explains how to create a BPMN trigger.

@using Syncfusion.Blazor.Diagram

@* Initialize Diagram *@
<SfDiagramComponent Height="600px" Nodes="@nodes" />

@code
{
    // Initialize node collection with Node.
    DiagramObjectCollection<Node> nodes;

    protected override void OnInitialized()
    {
        nodes = new DiagramObjectCollection<Node>();
        Node node = new Node()
        {
            // Position of the node.
            OffsetX = 100,
            OffsetY = 100,
            // Size of the node.
            Width = 100,
            Height = 100,
            // Unique Id of the node.
            ID = "node1",
            //Sets type as Bpmn and shape as Event
            Shape = new BpmnEvent()
            {
                // Set the event type to NonInterruptingIntermediate and set the trigger as message.
                EventType = BpmnEventType.Start,
                Trigger = BpmnEventTrigger.Message
            }
        };
        nodes.Add(node);
    }
}

You can download a complete working sample from GitHub

Message Trigger Start Event BPMN Shape

The following table illustrates the type of event triggers.

Triggers Start Non-Interrupting Start Intermediate Non-Interrupting Intermediate Throwing Intermediate End
None None Trigger Start event BPMN Shape None Trigger Interupting event BPMN Shape None Trigger Intermediate event BPMN Shape None Trigger NonInteruptingIntermediate BPMNShape Message Trigger ThrowingIntermediate Event BPMNShape None Trigger End event event BPMNShape
Message Message Trigger Start Event BPMN Shape Message Trigger NonInterupting Event BPMN Shape Message Trigger Intermediate Event BPMN Shape Message Trigger NonInteruptingIntermediate Event BPMN Shape Message Trigger ThrowingIntermediate Event BPMNShape Message Trigger End Event BPMN EndShape
Timer Timer Trigger Start Event BPMNShape Timer Trigger NonInterupting Event BPMN Shape Timer Trigger Intermediate Event BPMN Shape Timer Trigger NonInteruptingIntermediate  Event BPMN Shape Timer Trigger ThrowingIntermidiate Event BpmnShape Timer Trigger End Event BpmnShape
Conditional Conditional Trigger Start BPMN Shape Conditional Trigger NonInterupting BPMN Shape Conditional Trigger Intermediate BPMN Shape Conditional Trigger NonInteruptingIntermediateBPMNShape Conditional Trigger ThrowingIntermidiate Event BpmnShape Conditional Trigger End Event BpmnShape
Link Link Trigger Start BPMN Shape Link Trigger NonInterupting BPMN Shape Link Trigger Intermediate Event BPMNShape Link Trigger NonInteruptingIntermediateBPMNShape Link Trigger ThrowingIntermediate  Event BPMN Shape Link Trigger End Event BpmnShape
Signal Signal Trigger Start Event BPMN Shape Signal Trigger NonInterrupting Event BPMN Shape Signal Trigger Intermediate Event BPMN Shape Signal Trigger NonInterrupting Event BPMN Shape Signal Throwing Trigger Intermediate  Event BPMN Shape Signal Trigger End Event BPMN Shape
Error Error Trigger Start Event BPMN Shape Error Trigger NonInterrupting Event BPMN Shape Error Trigger Intermediate Event BPMN Shape Error Trigger NonInterrupting Event BPMN Shape Error Throwing Trigger Intermediate  Event BPMN Shape Error Trigger End Event BPMN Shape
Escalation Escalation Trigger Start Event BPMN Shape Escalation Trigger  Non-Interrupting Event BPMN Shape Escalation Trigger Intermediate Event BPMN Shape Escalation Trigger Non-Interrupting Event BPMN Shape Escalation Trigger Throwing Intermediate Event BPMN Shape Escalation Trigger End Event BPMN Shape
Termination Termination Trigger Start Event BPMN Shape Termination Trigger  Non-Interrupting  Event BPMN Shape Termination Trigger Intermediate Event BPMN Shape Termination Trigger Non-Interrupting Event BPMN Shape Termination Trigger Throwing Intermediate Event BPMN Shape Termination Trigger End Event BPMN Shape
Compensation Compensation Trigger Start Event BPMN Shape Compensation Trigger  Non-Interrupting Event BPMN Shape Compensation Trigger Intermediate  Event BPMN Shape Compensation Trigger Non-Interrupting Event BPMN Shape Compensation Trigger Throwing Intermediate Event BPMN Shape Compensation Trigger End BPMN Event Shape
Cancel Cancel Trigger Start Event  BPMN Shape Cancel Trigger Non-Interrupting Event BPMN Shape Cancel Trigger Intermediate Event BPMN Shape Cancel Trigger Non-Interrupting Event BPMN Shape Cancel Trigger Throwing Intermediate Event BPMN Shape Cancel Trigger End Event BPMN Shape
Multiple Multiple Trigger Start Event BPMN Shape Multiple Trigger Non-Interrupting  Event BPMN Shape Multiple Trigger Intermediate BPMN Shape Multiple Trigger Non-Interrupting Event BPMN Shape Multiple Trigger Throwing Intermediate Event BPMN Shape Multiple Trigger End Event BPMN Shape
Parallel Parallel Trigger Start Event BPMN Shape Parallel Trigger Non-Interrupting Event BPMN Shape Parallel Trigger Intermediate Event BPMN Shape Parallel Trigger Non-Interrupting Event BPMN Shape Parallel Trigger Throwing Intermediate Event BPMN Shape Parallel Trigger End Event BPMN Shape