process-analytics / bpmn-visualization-js

A TypeScript library for visualizing process execution data on BPMN diagrams
https://process-analytics.github.io/bpmn-visualization-js/
Apache License 2.0
216 stars 29 forks source link

[FEAT] Add support for BPMN data objects #2916

Open StefanAmEnde opened 11 months ago

StefanAmEnde commented 11 months ago

Describe the bug When modelling the data-flow perspective in BPMN you use data objects. Although they are correctly shown in the Camunda Modeler, bpmn-visualization will show warnings in the console like e.g.

bpmn-visualization.esm.js:3023 [bv-parser] Edge json deserialization: unable to find bpmn element with id DataOutputAssociation_0yl0bbm

and doesn't display the data objects nor their associations.

To Reproduce Steps to reproduce the behavior:

  1. Create a bpmn process model containing at least one data-object. Example: image
  2. integrate the process model in a web application like so:
    const xml = "[the bpmn model xml]"
    const bpmnVisualization = new BpmnVisualization({container: 'bpmnContainer', navigation: {enabled: true}})
    bpmnVisualization.load(xml)
  3. observe that the data object(s) is not displayed and warnings are printed in the console

Expected behavior I expect that data objects should be displayed.

Screenshots In camunda modeler: image

In bpmn-visualization: image

Console: image

Desktop (please complete the following information):

Additional context I'm using bpmn-visualization in a react application. But the problem should be independent of a specific framework.

tbouffard commented 11 months ago

Hi @StefanAmEnde and thanks for this detailed feedback. In short, this is the expected behavior for now, and here's why 👇🏿

We document the BPMN elements that bpmn-visualization supports in https://process-analytics.github.io/bpmn-visualization-js/#supported-bpmn-elements and the documentation sources for the latest version are available at https://github.com/process-analytics/bpmn-visualization-js/blob/v0.41.0/docs/users/bpmn-support.adoc. As you can read, we don't support data objects at the moment, and there are other types of elements we don't support (some events, all "data" related types, ...). Here's a milestone that refers to some of these elements: https://github.com/process-analytics/bpmn-visualization-js/milestone/7

About the current issue: I've converted it into a feature request and moved it to the milestone mentioned above.

Are all these explanations clear to you?

StefanAmEnde commented 11 months ago

Alright. Thanks for the reply👍

tbouffard commented 11 months ago

To complement my first comment: