Hide task labels in the frontend, but keep them in the xml file

Currently the labels of my bpmn-tasks consists of a “header” and a dictionary; for instance they might look like this “exec_OPCUA_Home = {“Direct_Home_Flag”: “aa”, “Velocity”: “ss”, “Interpolation_Type”: “dd”, “Robot_point_current_position”: “ff”}”.

In this case exec_OPCUA_Home is the header and the rest is a dictionary.

I would like to show in the GUI/Frontend just the header (the dictionary should be hidden), but when downloading the bpmn file, the dictionary should appear as part of the task label. How can i do that?

Currently looks like this:

But it should look like this:

However, the dictionary should be kept, since it is important for the bpmn.file (download?

While it is possible to only show parts of the name using a custom renderer my question would be: Why would you want to store additional information in the name instead of using dedicated properties? Is this something you have explored?

Thank you for the answer :slight_smile:

What do you mean with “dedicated properties”? :sweat_smile:
For me its just impotant to keep the dictionary in the .bpmn file, but I dont want to show it in the GUI/Frontend since its not user friendly.

I have the following scenario:

  1. The user in the GUI choose a task (e.g. exec_OPCUA_Home)
  2. The user can set keys and values (dictionary) to that task
  3. The .bpmn file will be processed later, but it is important to keep the whole label (header + dictionary… in this case: “exec_OPCUA_Home = {“Direct_Home_Flag”: “aa”, “Velocity”: “ss”, “Interpolation_Type”: “dd”, “Robot_point_current_position”: “ff”}”)

You need to hack it that way as you have technical info in the BPMN element name, not stored in a structured manner inside an extension.

An alternative is to serialize technical details to an extension property:

<bpmn:task name="exec_OPCUA_Home">
    {“Direct_Home_Flag”: “aa”, “Velocity”: “ss”, “Interpolation_Type”: “dd”, “Robot_point_current_position”: “ff”}

This way you enforce a clear separation, and do not need to patch bpmn-js.