bpmn-io / dmn-js

View and edit DMN diagrams in the browser.
https://bpmn.io/toolkit/dmn-js/
Other
292 stars 137 forks source link

DRD overview in DMN decision table view shows empty diagram #572

Open MaxTru opened 4 years ago

MaxTru commented 4 years ago

Describe the Bug

In the constellation of this bug, the DRD overview in the DMN decision table view shows an empty diagram (although a decision exists).

The bug appeared when following the DMN getting started guide in step "DRG": https://docs.camunda.org/get-started/dmn/drg/.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Download the get-started resources from step 3, unpack them
  2. open the file src/main/resources/dinnerDecisions.dmn
  3. DRD overview shows empty diagram

BugMissingOverview

When manipulating the DRD (e.g., by adding another decision), the issue does not occur anymore.

Expected Behavior

DRD overview is shown

Environment

Please complete the following information:

barmac commented 4 years ago

The diagram does not contain DMNDI which so the DrdViewer import in the overlay fails. However, we swallow the error in https://github.com/camunda/camunda-modeler/blob/4728c3cd55cb0f2873040d5c1186c5c9794597a0/client/src/app/tabs/dmn/modeler/DmnModeler.js#L276 as there is no active viewer. The diagram can be opened in dmn-js Modeler only due to DiGenerator module which is not included in the viewer.

barmac commented 4 years ago

What we could do is to include the DiGenerator in either dmn-js viewer or the viewer used in DmnModeler overlay.

barmac commented 4 years ago

And definitely we should add DMNDI to the Getting Started DMN.

MaxTru commented 4 years ago

Thanks for the analysis.

I will update the Getting Started DMN with the DMNDI.

Including the DIGenerator in the dmn-js viewer would certainly make the Modeler more robust. However, this is not a priority item.