syncfusion/blazor-ui-components-skills / skills/syncfusion-blazor-diagram
syncfusion-blazor-diagram
VerifiedBuild and troubleshoot Syncfusion Blazor diagrams using SfDiagramComponent. Trigger for flowcharts, org charts, mind maps, BPMN, UML sequence, swimlanes, symbol palettes, nodes/connectors/ports/annotations, layouts, data binding, serialization (load/save), export/print, and collaborative editing questions. Provide Blazor + Syncfusion setup steps, configuration patterns, and sample snippets.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 28.6 KB |
| references/advanced-features.md | markdown | 10.0 KB |
| references/annotations.md | markdown | 11.9 KB |
| references/bpmn.md | markdown | 6.6 KB |
| references/collaborative-editing.md | markdown | 7.0 KB |
| references/connectors.md | markdown | 6.4 KB |
| references/data-binding.md | markdown | 12.8 KB |
| references/events.md | markdown | 52.7 KB |
| references/export-print.md | markdown | 5.9 KB |
| references/getting-started.md | markdown | 5.4 KB |
| references/interaction.md | markdown | 36.7 KB |
| references/layout.md | markdown | 12.3 KB |
| references/nodes.md | markdown | 8.6 KB |
| references/overview-component.md | markdown | 5.5 KB |
| references/ports.md | markdown | 5.1 KB |
| references/serialization.md | markdown | 3.5 KB |
| references/shapes.md | markdown | 6.2 KB |
| references/styling.md | markdown | 6.1 KB |
| references/swimlane.md | markdown | 6.1 KB |
| references/symbol-palette.md | markdown | 7.7 KB |
| references/uml-class-diagram.md | markdown | 25.5 KB |
| references/uml-sequence.md | markdown | 6.5 KB |
references/bpmn.md
View on GitHub# BPMN Shapes in Blazor Diagram
## Table of Contents
- [Overview](#overview)
- [BPMN Events](#bpmn-events)
- [BPMN Activities (Tasks and Subprocesses)](#bpmn-activities-tasks-and-subprocesses)
- [BPMN Gateways](#bpmn-gateways)
- [BPMN Data Objects and Data Stores](#bpmn-data-objects-and-data-stores)
- [BPMN Connectors](#bpmn-connectors)
- [BPMN Text Annotation](#bpmn-text-annotation)
- [Expanded Sub-Process](#expanded-sub-process)
- [Common Gotchas](#common-gotchas)
---
## Overview
BPMN (Business Process Model and Notation) shapes model business processes visually. Use `BpmnActivity`, `BpmnEvent`, `BpmnGateway`, etc. as a node's `Shape` property.
---
## BPMN Events
Events represent things that happen during a process (start, end, intermediate):
```razor
@using Syncfusion.Blazor.Diagram
<SfDiagramComponent Height="600px" Nodes="@nodes" />
@code {
DiagramObjectCollection<Node> nodes = new();
protected override void OnInitialized()
{
// Start event
nodes.Add(new Node
{
ID = "start", OffsetX = 100, OffsetY = 200, Width = 50, Height = 50,
Shape = new BpmnEvent
{
EventType = BpmnEventType.Start,
Trigger = BpmnEventTrigger.None
}
});
// End event
nodes.Add(new Node
{
ID = "end", OffsetX = 500, OffsetY = 200, Width = 50, Height = 50,
Shape = new BpmnEvent
{
EventType = BpmnEventType.End,
Trigger = BpmnEventTrigger.None
}
});
// Intermediate event with message trigger
nodes.Add(new Node
{
ID = "intermediate", OffsetX = 300, OffsetY = 200, Width = 50, Height = 50,
Shape = new BpmnEvent
{
EventType = BpmnEventType.Intermediate,
Trigger = BpmnEventTrigger.Message
}
});
}
}
```
**`BpmnEventType` values:** `Start`, `End`, `Intermediate`, `NonInterruptingStart`, `NonInterruptingIntermediate`, `ThrowingIntermediate`
**`BpmnEventTrigger` values:** `None`, `Message`, `Timer`, `Escalation`, `Conditional`, `Error`, `Cancel`, `Compensation`, `Signal`, `Multiple`, `Terminate`, `Parallel`
---
## BPMN Activities (Tasks and Subprocesses)
Activities describe work being done in a process:
```razor
// Task
nodes.Add(new Node
{
ID = "task1", OffsetX = 200, OffsetY = 200, Width = 120, Height = 60,
Shape = new BpmnActivity
{
ActivityType = BpmnActivityType.Task,
TaskType = BpmnTaskType.Service // or User, Send, Receive, Script, Manual, etc.
},
Annotations = new() { new ShapeAnnotation { Content = "Process Order" } }
});
// Subprocess (collapsed)
nodes.Add(new Node
{
ID = "sub1", OffsetX = 400, OffsetY = 200, Width = 120, Height = 60,
Shape = new BpmnActivity
{
ActivityType = BpmnActivityType.SubProcess,
Loop = BpmnLoopCharacteristic.None,
IsCompensation = false,
IsAdhoc = false,
IsCall = false
}
});
```
**`BpmnActivityType`:** `Task`, `SubProcess`
**`BpmnTaskType`:** `None`, `User`, `Send`, `Receive`, `Service`, `Script`, `Manual`, `BusinessRule`
---
## BPMN Gateways
Gateways control the flow of a process (branching/merging):
```razor
// Exclusive gateway (XOR)
nodes.Add(new Node
{
ID = "gateway1", OffsetX = 300, OffsetY = 200, Width = 50, Height = 50,
Shape = new BpmnGateway
{
GatewayType = BpmnGatewayType.Exclusive
}
});
// Parallel gateway (AND)
nodes.Add(new Node
{
ID = "gateway2", OffsetX = 450, OffsetY = 200, Width = 50, Height = 50,
Shape = new BpmnGateway { GatewayType = BpmnGatewayType.Parallel }
});
```
**`BpmnGatewayType` values:** `None`, `Exclusive`, `Inclusive`, `Parallel`, `Complex`, `EventBased`, `ParallelEventBased`, `ExclusiveEventBased`
---
## BPMN Data Objects and Data Stores
```razor
// Data Object
nodes.Add(new Node
{
ID = "data1", OffsetX = 200, OffsetY = 350, Width = 50, Height = 60,
Shape = new BpmnDataObject
{
DataObjectType = BpmnDataObjectType.Input // Input, Output, None
}
});
// Data Store
nodes.Add(new Node
{
ID = "store1", OffsetX = 350, OffsetY = 350, Width = 60, Height = 50,
Shape = new BpmnDataStore()
});
```
---
## BPMN Connectors
Use `BpmnConnectorType` on the connector's shape for BPMN-specific flow lines:
```razor
connectors.Add(new Connector
{
ID = "seq1",
SourceID = "start", TargetID = "task1",
Shape = new BpmnFlow
{
Flow = BpmnFlowType.SequenceFlow
}
});
// Message flow
connectors.Add(new Connector
{
ID = "msg1",
SourceID = "task1", TargetID = "task2",
Shape = new BpmnFlow
{
Flow = BpmnFlowType.MessageFlow
}
});
```
**`BpmnFlowType` values:** `SequenceFlow`, `DefaultSequenceFlow`, `ConditionalSequenceFlow`, `AssociationFlow`, `DirectionalAssociationFlow`, `BiDirectionalAssociationFlow`, `MessageFlow`, `InitiatingMessageFlow`, `NonInitiatingMessageFlow`
---
## BPMN Text Annotation
Text annotations attach explanatory notes to BPMN shapes:
```razor
nodes.Add(new Node
{
ID = "annotation1", OffsetX = 300, OffsetY = 100, Width = 100, Height = 50,
Shape = new BpmnTextAnnotation
{
TextAnnotationDirection = TextAnnotationDirection.Auto,
TextAnnotationTarget = "task1" // ID of the target shape
},
Annotations = new() { new ShapeAnnotation { Content = "Must complete in 2hrs" } }
});
```
---
## Expanded Sub-Process
An expanded sub-process is a container for child nodes and connectors:
```razor
// Add child nodes inside
nodes.Add(new Node
{
ID = "child1", OffsetX = 230, OffsetY = 280, Width = 80, Height = 40,
ParentID = "subprocess1",
Shape = new BpmnActivity { ActivityType = BpmnActivityType.Task },
Annotations = new() { new ShapeAnnotation { Content = "Step 1" } }
});
nodes.Add(new Node
{
ID = "subprocess1", OffsetX = 300, OffsetY = 300, Width = 300, Height = 200,
Shape = new BpmnExpandedSubProcess(){
Children = new DiagramObjectCollection<string>() { "child1" }
}
});
```
---
## Common Gotchas
- **Use `BpmnFlow`** (not standard `Connector`) for BPMN-typed connectors — otherwise the line style won't match the BPMN notation
- **Event + Trigger combination** controls appearance — e.g., `Start` + `Message` = envelope icon inside circle
- **`BpmnTextAnnotation.TextAnnotationTarget`** must be the ID of an existing node
- **Expanded sub-process children** use `ParentID` to nest inside the container
- **BPMN shapes are nodes** — they go in the `Nodes` collection like any other node
- **Gateway size is typically 50x50** — gateways look best as squares (equal width/height)
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |