Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sub process doesn't render dotted lines despite that they exist in the XML file. #1619

Closed
3ronco opened this issue Mar 16, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@3ronco
Copy link

3ronco commented Mar 16, 2022

Although rather uncommon we use a subprocess node with the ability to give 'documents' or 'parameters' to them via a DataObjectReference node. Earlier versions showed these flows as a dotted line among a document and a subprocess.
The recent version doesn't render these arrows anymore although they can be found as shape nodes in the XML file. It's not happening with earlier versions eg. V8.7.1

Reproduce

  1. Goto https://demo.bpmn.io/new
  2. Append task to start event (optionally give it some name)
  3. Switch task to type Sub Process (collapsed).
  4. Drag a new DataObjectReference above the sub process.
  5. Wire DataObjectReference with (dotted arrow) flow to sub process.
  6. Drag a new DataObjectReference below the sub process.
  7. Wire the sub process with a outgoing flow to the DataObjectReference below.
  8. Click "Download as BPMN 2.0 file" ...
  9. Create a new tab ... https://demo.bpmn.io/new
  10. Click "Open BPMN diagram file from local file system" and select the previously downloaded file.
  11. The file loads but without dotted arrows among DataObjectReference nodes and sub processes (and only among these types!)

Expected Behavior
The recently opened diagram file renders exactly the same way as it was when modeled.

Environment

  • Browser: Firefox 97.0.2
  • OS: Windows 10
  • Library version: most recent
@3ronco 3ronco added the bug Something isn't working label Mar 16, 2022
@marstamm
Copy link
Contributor

Hi @3ronco ,

thank you for reporting this bug. I was able to reproduce and verify the bug.

Root Cause

The dataInput and dataOutput associations are children of the Activity, where sequence flows are part of the Process.

related BPMN Spec:
image

With bpmn-js@9, we move all children of subprocesses into the subprocess plane.

if (is(parent, 'bpmn:SubProcess') && parent !== plane.bpmnElement) {
// don't change the array while we iterate over it
elementsToMove.push({ diElement: diElement, parent: parent });
}

We did not account for this edge-case, where the element is a child of the subprocess but displayed on root.

Fix

Add a check for edge-cases to the code above to ensure we don't move the data associations into the wrong plane

@marstamm marstamm self-assigned this Mar 16, 2022
@marstamm marstamm added the ready Ready to be worked on label Mar 16, 2022
marstamm added a commit that referenced this issue Mar 16, 2022
@bpmn-io-tasks bpmn-io-tasks bot added in progress Currently worked on needs review Review pending and removed ready Ready to be worked on in progress Currently worked on labels Mar 16, 2022
@bpmn-io-tasks bpmn-io-tasks bot removed the needs review Review pending label Mar 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants