BPMN gateway in Blazor Diagram Component

16 Feb 20233 minutes to read

A Gateway is used to control the flow of a process and it is represented in diamond shape. The GatewayType property of the BpmnGateway can be set with any of the appropriate gateways. By default, the value of GatewayType is None. The following code example explains how to create a BPMN Gateway.

@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",
            Shape = new BpmnGateway()
            {
                //Sets gateway type to None.
                GatewayType = BpmnGatewayType.None 
            }
        };
        nodes.Add(node);
    }
}

You can download a complete working sample from GitHub

GateWay BPMN Shape

NOTE

By default, the GatewayType will be set to None.

There are several types of gateways as follows:

Shape Image Description
None GateWay BPMN Shape It is represented in diamond shape. None of the symbol shows inside this shape.
Exclusive Exclusive GateWay BPMN Shape It is a state of the business process and based on the condition, breaks the flow into one or more mutually exclusive paths.
Parallel Parallel GateWay BPMN Shape The parallel gateways are used to represent two concurrent tasks in a business flow.
Inclusive Inclusive GateWay BPMN Shape Breaks the process flow into one or more flows.
Complex Complex GateWay BPMN Shape These gateways are only used for the most complex flows in a business process.
EventBased EventBased GateWay BPMNShape The event-based gateway allows you to make a decision based on events.
ExclusiveEventBased Exclusive EventBased GateWay BPMN Shape Starts a new process instance with each occurrence of a subsequent event.
ParallelEventBased Parallel EventBased GateWay BPMN Shape This gateway is similar to a parallel gateway. It allows for multiple processes to happen at the same time but unlike the parallel gateway, the processes are event-dependent.