Multiple labels in one element

I have a choreography task and I want the possibility to edit three different labels.
It should be work like participant and lanes where lanes are selectable and it is possible to change lane’s label without modify the label of Participant.

The result should be like the image below


How can I make selectable the three parts of choreography task and give them their own label?

As you already said something similar to how participants and lanes are implemented would be necessary. bpmn-js fires events on a per-element basis. When working with participants and lanes this is not a problem since those are sperate elements. If your choreography task would be one single element it would be hard to figure out what part of the element was clicked. Have a look at how participants and lanes are implemented. Should be possible to build choreography tasks the same way.

Sorry, I misspoke. Each part of choreography task has to be separated from the other. There will be the possibility to select all three parts of the choreography task and then write its own label. The behavior is the same of participants and lanes when there are more than one lanes.

I searched in “BpmnRenderer.js” and in “ElementFactory.js”, but can’t find the useful functions to obtain the desired result.
Where can I find some useful functions?