# How can I read the current label of a Task or SequenceFlow?

**URL:** <https://forum.bpmn.io/t/how-can-i-read-the-current-label-of-a-task-or-sequenceflow/9264>\
**Category:** Modeler\
**Created:** [May 24, 2023, 6:47pm UTC](https://forum.bpmn.io/t/how-can-i-read-the-current-label-of-a-task-or-sequenceflow/9264 "2023-05-24T18:47:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vesper8](https://forum.bpmn.io/user_avatar/forum.bpmn.io/vesper8/32/4607_2.png) [@vesper8](https://forum.bpmn.io/u/vesper8)\
**Post date:** [May 24, 2023, 6:47pm UTC](https://forum.bpmn.io/t/how-can-i-read-the-current-label-of-a-task-or-sequenceflow/9264/1 "2023-05-24T18:47:28Z")

</div>

So I’m using bpmn-js-cli a lot for creating and modifying workflows programatically. I can add elements, connect them, read their properties, move them, set their labels, read their x/y coordinates. What I can’t seem to be able to do is read the labels on elements I’ve already added a label to. Is there any way to do that, either with the bpmn-js-cli or with the modeler ? I searched for this topic but can’t seem to find it.

My use case involves programatically checking each label to see if it contains certain elements and then modifying them if they do not.

Many thanks!

---

<div class="post-metadata">

**Author:** ![philippfromme](https://forum.bpmn.io/user_avatar/forum.bpmn.io/philippfromme/32/2803_2.png) [@philippfromme](https://forum.bpmn.io/u/philippfromme)\
**Post date:** [May 30, 2023, 8:07am UTC](https://forum.bpmn.io/t/how-can-i-read-the-current-label-of-a-task-or-sequenceflow/9264/2 "2023-05-30T08:07:43Z")

</div>

Through the [ElementRegistry](https://github.com/bpmn-io/diagram-js/blob/develop/lib/core/ElementRegistry.js) you can get all elements of the diagram and inspect their properties.

---

<div class="post-metadata">

**Author:** ![barmac](https://forum.bpmn.io/user_avatar/forum.bpmn.io/barmac/32/974_2.png) [@barmac](https://forum.bpmn.io/u/barmac)\
**Post date:** [July 9, 2025, 10:12am UTC](https://forum.bpmn.io/t/how-can-i-read-the-current-label-of-a-task-or-sequenceflow/9264/4 "2025-07-09T10:12:15Z")

</div>

Closed on July 9, 2025, 10:12am UTC

Closing old topics.
