Updating label without using "updateProperties()" for sequenceFlow

while updating the name of the sequenceFlow, by updating the businessObject(e.g., element.businessObject.name = ‘xyz’), the object gets updated but the same is not reflected in the canvas.

and when using updateProperties, we are facing challenges doing undo & redo.

Please suggest any other way to update the name of the sequence flow

What are the challenges you’re facing by using updateProperties?

There is a scenario where we have a custom property panel and the label of sequenceFlow.

when I update the property in custom property panel, the updated property should be shown as label for sequence flow, as well as the generated xml should be updated with the custom property.

There are two steps involved

  1. update the property panel which should be updating the xml.
  2. update the sequence flow label.

Both steps use ‘updateProperties’ api to get the xml with updated property and for label updation in sequence flow.

But from user perspective it is only custom property panel change. When he changes property , sequence flow name should be updated as per user entry.

eg: customPropValue = “expression - 1”; (updating a value in custom property panel)
Expectation: it should be reflected in xml as well as label for sequence flow.
Current: it is reflected in xml but not label of sequence flow.

When do an undo operation for one time, it should revert both the xml change as well as label of sequence flow

How do you expect the custom property to show up as the label of the connection? Is it supposed to be the actual label?

Yes. The requirement is to show the user entered property as name/label of the sequence flow, similar to the below diagram/example (“book is loan” & “book is available” label/name of sequence flow)


Why do you need a custom property then?

Because, the label should be the data entered by user. which means, the label is not static and hence its dynamic.
And user can changes it using the custom property.
And the action can be done n-number of times.