Data Object in WPF Diagram (SfDiagram)
5 May 20212 minutes to read
A data object represents information flowing through the process, such as data placed into the process, data resulting from the process, data that needs to be collected, or data that must be stored. To define a DataObject
, the Type
property of the BpmnNodeViewModel
should be set to DataObject and the DataObjectType property defines whether the data is an input or output.
You can indicate the collection of data object by setting the IsCollectiveData
property to true
.
<!--Initialize the SfDiagram-->
<syncfusion:SfDiagram x:Name="diagram">
<!--Initialize the Node-->
<syncfusion:SfDiagram.Nodes>
<!--Initialize the Node Collection-->
<syncfusion:NodeCollection>
<!--Initialize the BpmnNodeViewModel-->
<syncfusion:BpmnNodeViewModel UnitHeight="70" UnitWidth="100" OffsetX="100" OffsetY="100" Type="DataObject" DataObjectType="None" IsCollectiveData="True">
</syncfusion:BpmnNodeViewModel>
</syncfusion:NodeCollection>
</syncfusion:SfDiagram.Nodes>
</syncfusion:SfDiagram>
//Initialize the diagram.
SfDiagram diagram = new SfDiagram();
//Initialize the BpmnNodeViewModel.
BpmnNodeViewModel node = new BpmnNodeViewModel()
{
OffsetX = 100,
OffsetY = 100,
UnitHeight = 70,
UnitWidth = 100,
Type = BpmnShapeType.DataObject,
DataObjectType = DataObjectType.None,
IsCollectiveData = true,
};
// Add the node into the Node's collection.
(Diagram.Nodes as NodeCollection).Add(node);
The following table contains various representation of the BPMN data object.
DataObjectType | Symbol | IsCollectiveData | Description |
---|---|---|---|
None | ![]() |
![]() |
None of the business process with the signified information collected within a DataObject |
Data Input | ![]() |
![]() |
Represents the data requirements that the tasks in the business process depend on with the signified information collected within a DataObject |
Data Output | ![]() |
![]() |
Demonstrates information produced as the result of a business process with the signified information collected within a DataObject |