Add (long) label to connections

Hi everyone,

Requirement
We have the requirement to add descriptive text to connections. This text can potentially be rather long for a label (200+ characters).

Attempts
ideally we would like to add annotations, but as documented here that is not possible at the moment.
Our next attempt was to allow resizing of text labels, but that seems to be going nowhere.

Looking for:
Since neither of our attempts came to fruition (so far), I wanted to take a step back and see what options we have to model this. What we are looking for:

  • Adding descriptive text into the diagram (not just a hidden documentation property)
  • Text is connected to a sequence flow
  • Text width and height can be adapted.

If anyone has any idea, I’d be glad to hear them.

Text annotations would be the way to go. One of the main reasons this feature hasn’t been added to bpmn-js yet is the issue of how the text annotations would connect to a sequence flow or message flow. There is no precedent for connections connected to connections, yet. What would be the behavior you’d expect?

I would like TextAnnotations to connect to the midpoint of a connection by default, but to be able to move it afterwards to connect to any point on the line. This would be similar to how it behaves with normal objects.

Can you estimate just how much work would be required to implement this feature and how much one would need to know about bpmn-js / diagram-js? I’m thinking of giving it a shot myself, but I have no idea just how much would need to be done to accomplish this.

At the core you’d need to be able to connect connections (sequence flows) to connections (associations). We do not have that capability yet. Because of that it is hard to give an actual estimate.

It likely won’t be as easy as changing two lines of code only.