How to set text and hyperlink in a BPMN Task Node in React Diagram?
This article explains how to set text and hyperlinks in a BPMN Task Node in React Diagram. In Syncfusion® React Diagram, BPMN (Business Process Model and Notation) Task nodes are commonly used to represent operational steps in a business process. These nodes can be enriched with textual information and hyperlinks for additional context.
//Initializes the nodes for the diagram
let nodes =[ {
offsetX: 250,
offsetY: 250,
width: 100,
height: 100,
shape: {
type: 'Bpmn', shape: 'Activity', activity: {
activity: 'Task', task: {
type: 'Send'
}
},
},
annotations: [{
hyperlink: {
link: 'https://ej2.syncfusion.com/react/documentation/diagram/bpmn-shapes#tasks',
content: 'This is BPMN Task',
}
}]
}
]
<diagramcomponent id="diagram" ref="{diagram" ==""> (diagramInstance = diagram)} width={"100%"} height={"645px"} nodes={nodes} >
<inject services="{[BpmnDiagrams]}/">
</inject></diagramcomponent>
In the above code snippet, we create a BPMN Task node with the text “This is BPMN Task” and set a hyperlink to ‘https://ej2.syncfusion.com/react/documentation/diagram/bpmn-shapes#tasks’. The annotations property inside the node configuration allows you to define textual content and hyperlinks for the BPMN Task.
Refer to the working sample for additional details and implementation: Sample
Conclusion
We hope you enjoyed learning about how to set text and hyperlink in a BPMN Task Node in React Diagram.
You can refer to our React Diagram feature tour page to learn about its other groundbreaking feature representations and documentation. You can also explore our React Diagram example to understand how to present and manipulate data.
For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion®, you can try our 30-day free trial to check out our other components.
If you have any queries or require clarifications, please let us know in comments below. You can also contact us through our support forums, BoldDesk Support, or feedback portal. We are always happy to assist you!