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
161 stars 33 forks source link

MissingKotlinParameterException #349

Open ambition-consulting opened 1 year ago

ambition-consulting commented 1 year ago

Describe the bug when opening an activity diagram, I get a

com.fasterxml.jackson.module.kotlin.MissingKotlinParameterException: Instantiation of [simple type, class com.valb3r.bpmn.intellij.plugin.camunda.parser.nodes.diagram.Plane] value failed for JSON property id due to missing (therefore NULL) value for creator parameter id which is a non-nullable type
 at [Source: (StringReader); line: 263, column: 5] (through reference chain: com.valb3r.bpmn.intellij.plugin.camunda.parser.nodes.BpmnFile["BPMNDiagram"]->java.util.ArrayList[0]->com.valb3r.bpmn.intellij.plugin.camunda.parser.nodes.DiagramNode["BPMNPlane"]->com.valb3r.bpmn.intellij.plugin.camunda.parser.nodes.diagram.Plane["id"])
    at com.fasterxml.jackson.module.kotlin.KotlinValueInstantiator.createFromObjectWith(KotlinValueInstantiator.kt:116)
    at com.fasterxml.jackson.databind.deser.impl.PropertyBasedCreator.build(PropertyBasedCreator.java:202)
    at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeUsingPropertyBased(BeanDeserializer.java:518)
    at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault(BeanDeserializerBase.java:1405)
    at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:351)
    at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:184)
    at com.fasterxml.jackson.dataformat.xml.deser.WrapperHandlingDeserializer.deserialize(WrapperHandlingDeserializer.java:122)
    at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:542)
    at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeWithErrorWrapping(BeanDeserializer.java:563)
    at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeUsingPropertyBased(BeanDeserializer.java:438)
    at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault(BeanDeserializerBase.java:1405)
    at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:351)
    at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:184)
    at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer._deserializeFromArray(CollectionDeserializer.java:355)
    at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:244)
    at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:28)
    at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:542)
    at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeWithErrorWrapping(BeanDeserializer.java:563)
    at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeUsingPropertyBased(BeanDeserializer.java:438)
    at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault(BeanDeserializerBase.java:1405)
    at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:351)
    at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:184)
    at com.fasterxml.jackson.dataformat.xml.deser.WrapperHandlingDeserializer.deserialize(WrapperHandlingDeserializer.java:122)
    at com.fasterxml.jackson.dataformat.xml.deser.XmlDeserializationContext.readRootValue(XmlDeserializationContext.java:91)
    at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4675)
    at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3630)
    at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3613)
    at com.valb3r.bpmn.intellij.plugin.camunda.parser.CamundaParser.parse(CamundaParser.kt:221)
    at com.valb3r.bpmn.intellij.plugin.core.CanvasBuilder.build(CanvasBuilder.kt:63)
    at com.valb3r.bpmn.intellij.plugin.core.BpmnPluginToolWindow.openFileAndRender(BpmnPluginToolWindow.kt:120)
    at com.valb3r.bpmn.intellij.plugin.camunda.actions.ViewCamundaBpmnDiagramAction.generateContent(ViewCamundaBpmnDiagramAction.kt:23)
    at com.valb3r.bpmn.intellij.plugin.core.actions.BaseViewBpmnDiagramAction$actionPerformed$1$task$1.run(BaseViewBpmnDiagramAction.kt:34)
    at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:429)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:114)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsynchronously$6(CoreProgressManager.java:480)
    at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:252)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:186)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:173)
    at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:252)
    at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
    at java.base/java.lang.Thread.run(Thread.java:833)

Newest version of intellij and plugin, updated today.

valb3r commented 1 year ago

@ambition-consulting Thanks for feedback, it looks like the issue is that Plane element is missing ID. Can you provide example BPMN file to reproduce?

mxh82 commented 11 months ago

I get the same error when attempting to open .bpmn file created by Kogito. We are using Quarkus, & Maven. I added bpmn to Supported extensions. The submitDeal.bpmn file below is very similar to the bpmn files I am using.
`<?xml version="1.0" encoding="UTF-8"?>

_BCF778A5-0959-49DA-B8FF-DB61025A7DD0 _A186F5CE-4300-4506-A89D-50DEDC8F24CF _BCF778A5-0959-49DA-B8FF-DB61025A7DD0 _E3E55042-CEC7-4574-8315-068794ACBD69 _A186F5CE-4300-4506-A89D-50DEDC8F24CF _C3082C6F-963E-40A2-B31B-1E8F336AA4C6_dealInputX _C3082C6F-963E-40A2-B31B-1E8F336AA4C6_travellerInputX _C3082C6F-963E-40A2-B31B-1E8F336AA4C6_reviewOutputX name _C3082C6F-963E-40A2-B31B-1E8F336AA4C6_dealInputX traveller _C3082C6F-963E-40A2-B31B-1E8F336AA4C6_travellerInputX _C3082C6F-963E-40A2-B31B-1E8F336AA4C6_reviewOutputX review _E3E55042-CEC7-4574-8315-068794ACBD69 _29WqoEk8EeqlMa7ut9bglw _29WqoEk8EeqlMa7ut9bglw ` Thanks.
valb3r commented 10 months ago

@mxh82 Thanks for feedback, In case of your issue - you are using unsupported BPMN system. Kogito is actually evolution of jBPMN that is not supported yet (https://github.com/valb3r/flowable-bpmn-intellij-plugin/issues/308). BPMN files are engine dialect-specific. So that, while BPMN file created by Kogito and Camunda may look same structurally, they are very different in terms of implementation details. To be able to more-or-less properly render the BPMN file one should support the underlying BPMN engine dialect

mxh82 commented 10 months ago

@valb3r Thanks for your quick response and thorough explanation. As a workaround, i am using VScode with the Kogito plugin.