BPMN Event in Vue Diagram component
Event
An event is notated with a circle and it represents an event in a business process. The type of events are as follows:
* Start
* Intermediate
* NonInterruptingStart
* NonInterruptingIntermediate
* ThrowingIntermediate
* End
The event 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 illustrates how to create a BPMN event.
<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: 150,
offsetY: 150,
// Size of the node
width: 100,
height: 100,
//Sets type as Bpmn and shape as event
shape: {
type: 'Bpmn',
shape: 'Event',
// Sets event as Start and trigger as None
event: {
event: 'Start',
trigger: 'None',
},
},
},
{
// Position of the node
offsetX: 350,
offsetY: 150,
// Size of the node
width: 100,
height: 100,
//Sets type as Bpmn and shape as event
shape: {
type: 'Bpmn',
shape: 'Event',
// Sets event as Intermediate and trigger as None
event: {
event: 'Intermediate',
trigger: 'None',
},
},
},
{
// Position of the node
offsetX: 550,
offsetY: 150,
// Size of the node
width: 100,
height: 100,
//Sets type as Bpmn and shape as event
shape: {
type: 'Bpmn',
shape: 'Event',
// Sets event as End and trigger as None
event: {
event: 'End',
trigger: 'None',
},
},
},
{
// Position of the node
offsetX: 150,
offsetY: 350,
// Size of the node
width: 100,
height: 100,
//Sets type as Bpmn and shape as event
shape: {
type: 'Bpmn',
shape: 'Event',
// Sets event as NonInterruptingStart and trigger as Timer
event: {
event: 'NonInterruptingStart',
trigger: 'Timer',
},
},
},
{
// Position of the node
offsetX: 350,
offsetY: 350,
// Size of the node
width: 100,
height: 100,
//Sets type as Bpmn and shape as event
shape: {
type: 'Bpmn',
shape: 'Event',
// Sets event as NonInterruptingIntermediate and trigger as Escalation
event: {
event: 'NonInterruptingIntermediate',
trigger: 'Escalation',
},
},
},
{
// Position of the node
offsetX: 550,
offsetY: 350,
// Size of the node
width: 100,
height: 100,
//Sets type as Bpmn and shape as event
shape: {
type: 'Bpmn',
shape: 'Event',
// Sets event as ThrowingIntermediate and trigger as Compensation
event: {
event: 'ThrowingIntermediate',
trigger: 'Compensation',
},
},
}]
const width = "100%";
const height = "600px";
provide('diagram', [BpmnDiagrams]);
</script>
<style>
@import "../node_modules/@syncfusion/ej2-vue-diagrams/styles/tailwind3.css";
@import "../node_modules/@syncfusion/ej2-base/styles/tailwind3.css";
@import "../node_modules/@syncfusion/ej2-popups/styles/tailwind3.css";
@import "../node_modules/@syncfusion/ej2-splitbuttons/styles/tailwind3.css";
@import "../node_modules/@syncfusion/ej2-navigations/styles/tailwind3.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: 150,
offsetY: 150,
// Size of the node
width: 100,
height: 100,
//Sets type as Bpmn and shape as event
shape: {
type: 'Bpmn',
shape: 'Event',
// Sets event as Start and trigger as None
event: {
event: 'Start',
trigger: 'None',
},
},
},
{
// Position of the node
offsetX: 350,
offsetY: 150,
// Size of the node
width: 100,
height: 100,
//Sets type as Bpmn and shape as event
shape: {
type: 'Bpmn',
shape: 'Event',
// Sets event as Intermediate and trigger as None
event: {
event: 'Intermediate',
trigger: 'None',
},
},
},
{
// Position of the node
offsetX: 550,
offsetY: 150,
// Size of the node
width: 100,
height: 100,
//Sets type as Bpmn and shape as event
shape: {
type: 'Bpmn',
shape: 'Event',
// Sets event as End and trigger as None
event: {
event: 'End',
trigger: 'None',
},
},
},
{
// Position of the node
offsetX: 150,
offsetY: 350,
// Size of the node
width: 100,
height: 100,
//Sets type as Bpmn and shape as event
shape: {
type: 'Bpmn',
shape: 'Event',
// Sets event as NonInterruptingStart and trigger as Timer
event: {
event: 'NonInterruptingStart',
trigger: 'Timer',
},
},
},
{
// Position of the node
offsetX: 350,
offsetY: 350,
// Size of the node
width: 100,
height: 100,
//Sets type as Bpmn and shape as event
shape: {
type: 'Bpmn',
shape: 'Event',
// Sets event as NonInterruptingIntermediate and trigger as Escalation
event: {
event: 'NonInterruptingIntermediate',
trigger: 'Escalation',
},
},
},
{
// Position of the node
offsetX: 550,
offsetY: 350,
// Size of the node
width: 100,
height: 100,
//Sets type as Bpmn and shape as event
shape: {
type: 'Bpmn',
shape: 'Event',
// Sets event as ThrowingIntermediate and trigger as Compensation
event: {
event: 'ThrowingIntermediate',
trigger: 'Compensation',
},
},
}]
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/tailwind3.css";
@import "../node_modules/@syncfusion/ej2-base/styles/tailwind3.css";
@import "../node_modules/@syncfusion/ej2-popups/styles/tailwind3.css";
@import "../node_modules/@syncfusion/ej2-splitbuttons/styles/tailwind3.css";
@import "../node_modules/@syncfusion/ej2-navigations/styles/tailwind3.css";
</style>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 as none. The following table illustrates the type of event triggers.
| Triggers | Start | Non-Interrupting Start | Intermediate | Non-Interrupting Intermediate | Throwing Intermediate | End |
|---|---|---|---|---|---|---|
| None | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| Message | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| Timer | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| Conditional | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| Link | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| Signal | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| Error | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| Escalation | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| Termination | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| Compensation | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| Cancel | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| Multiple | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| Parallel | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |












































































