BPMN Data Object in Vue Diagram component
28 Mar 202510 minutes to read
Data Object
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 data object, set the shape as DataObject and the type property defines whether data is an input or an output. You can create multiple instances of data object with the collection property of data.
<template>
<div id="app">
<ejs-diagram id="diagram" :width='width' :height='height' :nodes='nodes'></ejs-diagram>
</div>
</template>
<script setup>
import { provide } from "vue";
import { DiagramComponent as EjsDiagram, BpmnDiagrams } from '@syncfusion/ej2-vue-diagrams';
const nodes = [{
// Position of the node
offsetX: 250,
offsetY: 250,
// Size of the node
width: 100,
height: 100,
//Sets type as Bpmn and shape as DataObject
shape: {
type: 'Bpmn',
shape: 'DataObject',
//Sets collection as true and type as Input
dataObject: {
collection: true,
type: 'Input'
}
},
},
{
// Position of the node
offsetX: 450,
offsetY: 250,
// Size of the node
width: 100,
height: 100,
//Sets type as Bpmn and shape as DataObject
shape: {
type: 'Bpmn',
shape: 'DataObject',
//Sets collection as true and type as Input
dataObject: {
collection: false,
type: 'Output'
}
}
},
{
// Position of the node
offsetX: 650,
offsetY: 250,
// Size of the node
width: 100,
height: 100,
//Sets type as Bpmn and shape as DataObject
shape: {
type: 'Bpmn',
shape: 'DataObject',
//Sets collection as true and type as Input
dataObject: {
collection: false,
type: 'None'
}
}
}]
const width = "100%";
const height = "350px";
provide('diagram', [BpmnDiagrams]);
</script>
<style>
@import "../node_modules/@syncfusion/ej2-vue-diagrams/styles/material.css";
</style><template>
<div id="app">
<ejs-diagram id="diagram" :width='width' :height='height' :nodes='nodes'></ejs-diagram>
</div>
</template>
<script>
import { DiagramComponent, BpmnDiagrams } from '@syncfusion/ej2-vue-diagrams';
let nodes = [{
// Position of the node
offsetX: 250,
offsetY: 250,
// Size of the node
width: 100,
height: 100,
//Sets type as Bpmn and shape as DataObject
shape: {
type: 'Bpmn',
shape: 'DataObject',
//Sets collection as true and type as Input
dataObject: {
collection: true,
type: 'Input'
}
},
},
{
// Position of the node
offsetX: 450,
offsetY: 250,
// Size of the node
width: 100,
height: 100,
//Sets type as Bpmn and shape as DataObject
shape: {
type: 'Bpmn',
shape: 'DataObject',
//Sets collection as true and type as Input
dataObject: {
collection: false,
type: 'Output'
}
}
},
{
// Position of the node
offsetX: 650,
offsetY: 250,
// Size of the node
width: 100,
height: 100,
//Sets type as Bpmn and shape as DataObject
shape: {
type: 'Bpmn',
shape: 'DataObject',
//Sets collection as true and type as Input
dataObject: {
collection: false,
type: 'None'
}
}
}]
export default {
name: "App",
components: {
"ejs-diagram": DiagramComponent
},
data() {
return {
width: "100%",
height: "600px",
nodes: nodes,
}
},
provide: {
diagram: [BpmnDiagrams]
}
}
</script>
<style>
@import "../node_modules/@syncfusion/ej2-vue-diagrams/styles/material.css";
</style>The following table contains various representation of BPMN data object.
| Boundary | Image |
|---|---|
| Collection Data Object | ![]() |
| Data Input | ![]() |
| Data Output | ![]() |


