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

Reconnecting data object to text annotation breaks modeler #1008

Closed
barmac opened this issue Apr 30, 2019 · 3 comments · Fixed by #1071
Closed

Reconnecting data object to text annotation breaks modeler #1008

barmac opened this issue Apr 30, 2019 · 3 comments · Fixed by #1071
Assignees
Labels
bug Something isn't working modeling
Milestone

Comments

@barmac
Copy link
Member

barmac commented Apr 30, 2019

Describe the Bug

Diagram breaks when trying to reconnect data association to text annotation.

data-output-1

See the attached logs for the error.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Create a task.
  2. Add text annotation.
  3. Create a data object.
  4. Connect data object to the task.
  5. Try to reconnect data association to text annotation.

After that, the shapes will never be rerendered after movement.

Expected Behavior

Connection should be disallowed and the diagram should be still editable.

Environment

Please complete the following information:

  • Browser: Chrome 73 (for demo.bpmn.io)
  • OS: MacOS
  • Library version: bpmn-js@3.4.0 and Camunda Modeler 3.0.1

Logs

Click to open log
[2019-04-30T11:52:02.659Z] client:error [diagram_4.bpmn] Cannot read property 'push' of undefined
    at push (webpack:///node_modules/bpmn-js/lib/features/modeling/BpmnUpdater.js:603:0)
    at updateSemanticParent (webpack:///node_modules/bpmn-js/lib/features/modeling/BpmnUpdater.js:679:0)
    at updateConnection (webpack:///node_modules/bpmn-js/lib/features/modeling/BpmnUpdater.js:171:0)
    at file:///Applications/Camunda%20Modeler%203.0.1.app/Contents/Resources/app.asar/public/6.6.js:1:481809
    at file:///Applications/Camunda%20Modeler%203.0.1.app/Contents/Resources/app.asar/public/0.0.js:1:214623
    at listener (webpack:///node_modules/diagram-js/lib/core/EventBus.js:362:0)
    at _invokeListener (webpack:///node_modules/diagram-js/lib/core/EventBus.js:348:0)
    at _invokeListeners (webpack:///node_modules/diagram-js/lib/core/EventBus.js:310:0)
    at fire (webpack:///node_modules/diagram-js/lib/command/CommandStack.js:346:0)
    at file:///Applications/Camunda%20Modeler%203.0.1.app/Contents/Resources/app.asar/public/0.0.js:1:318674
[2019-04-30T11:52:02.994Z] client:error [diagram_4.bpmn] Cannot read property 'push' of undefined
    at push (webpack:///node_modules/bpmn-js/lib/features/modeling/BpmnUpdater.js:603:0)
    at updateSemanticParent (webpack:///node_modules/bpmn-js/lib/features/modeling/BpmnUpdater.js:679:0)
    at updateConnection (webpack:///node_modules/bpmn-js/lib/features/modeling/BpmnUpdater.js:171:0)
    at file:///Applications/Camunda%20Modeler%203.0.1.app/Contents/Resources/app.asar/public/6.6.js:1:481809
    at file:///Applications/Camunda%20Modeler%203.0.1.app/Contents/Resources/app.asar/public/0.0.js:1:214623
    at listener (webpack:///node_modules/diagram-js/lib/core/EventBus.js:362:0)
    at _invokeListener (webpack:///node_modules/diagram-js/lib/core/EventBus.js:348:0)
    at _invokeListeners (webpack:///node_modules/diagram-js/lib/core/EventBus.js:310:0)
    at fire (webpack:///node_modules/diagram-js/lib/command/CommandStack.js:346:0)
    at file:///Applications/Camunda%20Modeler%203.0.1.app/Contents/Resources/app.asar/public/0.0.js:1:318674
[2019-04-30T11:52:04.438Z] client:error [diagram_4.bpmn] Cannot read property 'push' of undefined
    at push (webpack:///node_modules/bpmn-js/lib/features/modeling/BpmnUpdater.js:603:0)
    at updateSemanticParent (webpack:///node_modules/bpmn-js/lib/features/modeling/BpmnUpdater.js:679:0)
    at updateConnection (webpack:///node_modules/bpmn-js/lib/features/modeling/BpmnUpdater.js:171:0)
    at file:///Applications/Camunda%20Modeler%203.0.1.app/Contents/Resources/app.asar/public/6.6.js:1:481809
    at file:///Applications/Camunda%20Modeler%203.0.1.app/Contents/Resources/app.asar/public/0.0.js:1:214623
    at listener (webpack:///node_modules/diagram-js/lib/core/EventBus.js:362:0)
    at _invokeListener (webpack:///node_modules/diagram-js/lib/core/EventBus.js:348:0)
    at _invokeListeners (webpack:///node_modules/diagram-js/lib/core/EventBus.js:310:0)
    at fire (webpack:///node_modules/diagram-js/lib/command/CommandStack.js:346:0)
    at file:///Applications/Camunda%20Modeler%203.0.1.app/Contents/Resources/app.asar/public/0.0.js:1:318674
[2019-04-30T11:52:04.759Z] client:error [diagram_4.bpmn] Cannot read property 'push' of undefined
    at push (webpack:///node_modules/bpmn-js/lib/features/modeling/BpmnUpdater.js:603:0)
    at updateSemanticParent (webpack:///node_modules/bpmn-js/lib/features/modeling/BpmnUpdater.js:679:0)
    at updateConnection (webpack:///node_modules/bpmn-js/lib/features/modeling/BpmnUpdater.js:171:0)
    at file:///Applications/Camunda%20Modeler%203.0.1.app/Contents/Resources/app.asar/public/6.6.js:1:481809
    at file:///Applications/Camunda%20Modeler%203.0.1.app/Contents/Resources/app.asar/public/0.0.js:1:214623
    at listener (webpack:///node_modules/diagram-js/lib/core/EventBus.js:362:0)
    at _invokeListener (webpack:///node_modules/diagram-js/lib/core/EventBus.js:348:0)
    at _invokeListeners (webpack:///node_modules/diagram-js/lib/core/EventBus.js:310:0)
    at fire (webpack:///node_modules/diagram-js/lib/command/CommandStack.js:346:0)
    at file:///Applications/Camunda%20Modeler%203.0.1.app/Contents/Resources/app.asar/public/0.0.js:1:318674
[2019-04-30T11:52:05.114Z] client:error [diagram_4.bpmn] Cannot read property 'push' of undefined
    at push (webpack:///node_modules/bpmn-js/lib/features/modeling/BpmnUpdater.js:603:0)
    at updateSemanticParent (webpack:///node_modules/bpmn-js/lib/features/modeling/BpmnUpdater.js:679:0)
    at updateConnection (webpack:///node_modules/bpmn-js/lib/features/modeling/BpmnUpdater.js:171:0)
    at file:///Applications/Camunda%20Modeler%203.0.1.app/Contents/Resources/app.asar/public/6.6.js:1:481809
    at file:///Applications/Camunda%20Modeler%203.0.1.app/Contents/Resources/app.asar/public/0.0.js:1:214623
    at listener (webpack:///node_modules/diagram-js/lib/core/EventBus.js:362:0)
    at _invokeListener (webpack:///node_modules/diagram-js/lib/core/EventBus.js:348:0)
    at _invokeListeners (webpack:///node_modules/diagram-js/lib/core/EventBus.js:310:0)
    at fire (webpack:///node_modules/diagram-js/lib/command/CommandStack.js:346:0)
    at file:///Applications/Camunda%20Modeler%203.0.1.app/Contents/Resources/app.asar/public/0.0.js:1:318674
[2019-04-30T11:52:05.430Z] client:error [diagram_4.bpmn] Cannot read property 'push' of undefined
    at push (webpack:///node_modules/bpmn-js/lib/features/modeling/BpmnUpdater.js:603:0)
    at updateSemanticParent (webpack:///node_modules/bpmn-js/lib/features/modeling/BpmnUpdater.js:679:0)
    at updateConnection (webpack:///node_modules/bpmn-js/lib/features/modeling/BpmnUpdater.js:171:0)
    at file:///Applications/Camunda%20Modeler%203.0.1.app/Contents/Resources/app.asar/public/6.6.js:1:481809
    at file:///Applications/Camunda%20Modeler%203.0.1.app/Contents/Resources/app.asar/public/0.0.js:1:214623
    at listener (webpack:///node_modules/diagram-js/lib/core/EventBus.js:362:0)
    at _invokeListener (webpack:///node_modules/diagram-js/lib/core/EventBus.js:348:0)
    at _invokeListeners (webpack:///node_modules/diagram-js/lib/core/EventBus.js:310:0)
    at fire (webpack:///node_modules/diagram-js/lib/command/CommandStack.js:346:0)
    at file:///Applications/Camunda%20Modeler%203.0.1.app/Contents/Resources/app.asar/public/0.0.js:1:318674
[2019-04-30T11:52:06.938Z] app:workspace saving
[2019-04-30T11:52:06.938Z] app:config set workspace
[2019-04-30T11:52:06.939Z] app:config saved
@barmac barmac added the bug Something isn't working label Apr 30, 2019
@pinussilvestrus
Copy link
Contributor

I can reproduce this. It is correct, that this shouldn't be allowed. Cf. the BPMN 2.0 reference, Data Objects should only be attachable to FlowElements:

image

We should consider adding a Rule which disallow adding data associations to Artifacts (which are not FlowElements).

@pinussilvestrus pinussilvestrus added backlog Queued in backlog modeling labels May 2, 2019
@nikku nikku added ready Ready to be worked on and removed backlog Queued in backlog labels May 17, 2019
@nikku nikku added this to the M29 milestone Jun 4, 2019
@nikku nikku self-assigned this Jun 4, 2019
@barmac
Copy link
Member Author

barmac commented Jun 6, 2019

Fixed via #1067

I'll add a test case to prevent it from reocurring.

@bpmn-io-tasks bpmn-io-tasks bot added in progress Currently worked on and removed ready Ready to be worked on labels Jun 6, 2019
@bpmn-io-tasks bpmn-io-tasks bot added needs review Review pending and removed in progress Currently worked on labels Jun 6, 2019
@nikku
Copy link
Member

nikku commented Jun 6, 2019

Closed via #1071.

@nikku nikku closed this as completed Jun 6, 2019
@bpmn-io-tasks bpmn-io-tasks bot removed the needs review Review pending label Jun 6, 2019
Ichigo85 pushed a commit to sharedchains/bpmn-js that referenced this issue Aug 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working modeling
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants