valb3r / flowable-bpmn-intellij-plugin

Flowable, Activiti, Camunda BPMN engines process editor plugin for IntelliJ. Pure Kotlin (and some Java)
https://plugins.jetbrains.com/plugin/14318-flowable-bpmn-visualizer
MIT License
158 stars 31 forks source link

[Collapsed subprocess support] Unable to copy/paste certain types of elements #260

Open valb3r opened 2 years ago

valb3r commented 2 years ago

Describe the bug

java.lang.IllegalArgumentException: Can't store: WithParentId(parent=BpmnElementId(id=popurri), element=BpmnCollapsedSubprocess(id=BpmnElementId(id=sid-46a9d8a5-d49f-49e2-8803-998325edfdcb), name=Collapsed subprocess name, documentation=Collapsed sub process docs, async=true, exclusive=null, triggeredByEvent=null, transactionalSubprocess=false), parentIdForXml=BpmnElementId(id=popurri))
    at com.valb3r.bpmn.intellij.plugin.bpmn.parser.core.BaseBpmnParser.applyBpmnShapeObjectAdded(BaseBpmnParser.kt:332)
    at com.valb3r.bpmn.intellij.plugin.bpmn.parser.core.BaseBpmnParser.doUpdate(BaseBpmnParser.kt:142)
    at com.valb3r.bpmn.intellij.plugin.bpmn.parser.core.BaseBpmnParser.parseAndWrite(BaseBpmnParser.kt:125)
    at com.valb3r.bpmn.intellij.plugin.bpmn.parser.core.BaseBpmnParser.update(BaseBpmnParser.kt:82)
    at com.valb3r.bpmn.intellij.plugin.core.events.IntelliJFileCommitter.executeCommitAndGetHash$lambda-0(ProcessModelUpdateEvents.kt:37)
    at com.intellij.openapi.command.WriteCommandAction.lambda$runWriteCommandAction$4(WriteCommandAction.java:348)
    at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.lambda$doRunWriteCommandAction$1(WriteCommandAction.java:143)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:936)
    at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.lambda$doRunWriteCommandAction$2(WriteCommandAction.java:141)
    at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:216)
    at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:182)
    at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.doRunWriteCommandAction(WriteCommandAction.java:150)
    at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.run(WriteCommandAction.java:117)
    at com.intellij.openapi.command.WriteCommandAction.runWriteCommandAction(WriteCommandAction.java:348)
    at com.intellij.openapi.command.WriteCommandAction.runWriteCommandAction(WriteCommandAction.java:336)
    at com.valb3r.bpmn.intellij.plugin.core.events.IntelliJFileCommitter.executeCommitAndGetHash(ProcessModelUpdateEvents.kt:36)
    at com.valb3r.bpmn.intellij.plugin.core.events.ProcessModelUpdateEvents.commitToFile(ProcessModelUpdateEvents.kt:123)
    at com.valb3r.bpmn.intellij.plugin.core.events.ProcessModelUpdateEvents.addEvents(ProcessModelUpdateEvents.kt:163)
    at com.valb3r.bpmn.intellij.plugin.core.actions.copypaste.CopyPasteActionsKt.pasteFromClipboard(CopyPasteActions.kt:32)
    at com.valb3r.bpmn.intellij.plugin.core.KeyboardEventHandler.handleKeyWithControl(KeyboardEventHandler.kt:66)
    at com.valb3r.bpmn.intellij.plugin.core.KeyboardEventHandler.keyReleased(KeyboardEventHandler.kt:35)
    at java.desktop/java.awt.Component.processKeyEvent(Component.java:6613)
    at java.desktop/javax.swing.JComponent.processKeyEvent(JComponent.java:2852)
    at java.desktop/java.awt.Component.processEvent(Component.java:6429)
    at java.desktop/java.awt.Container.processEvent(Container.java:2263)
    at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5027)
    at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
    at java.desktop/java.awt.Component.dispatchEvent(Component.java:4859)
    at java.desktop/java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1962)
    at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:879)
    at java.desktop/java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1158)
    at java.desktop/java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:1018)
    at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:844)
    at com.intellij.ide.IdeKeyboardFocusManager.dispatchEvent(IdeKeyboardFocusManager.java:42)
    at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4908)
    at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
    at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2784)
    at java.desktop/java.awt.Component.dispatchEvent(Component.java:4859)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:778)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
    at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:751)
    at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:749)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:748)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:885)
    at com.intellij.ide.IdeEventQueue.dispatchKeyEvent(IdeEventQueue.java:801)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:748)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:441)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:825)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:440)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:794)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:492)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

For popurri.xml

valb3r commented 2 years ago

Relates to: #85