[jboss-jira] [JBoss JIRA] (DROOLS-3431) [DMN Designer] Error after reopening
Michael Anstis (Jira)
issues at jboss.org
Thu Dec 13 08:11:00 EST 2018
[ https://issues.jboss.org/browse/DROOLS-3431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13674295#comment-13674295 ]
Michael Anstis edited comment on DROOLS-3431 at 12/13/18 8:10 AM:
------------------------------------------------------------------
Hi [~karreiro], can I have your opinion on this please :-)
The issue appears to be that when you first run the workbench and create a file the "Decision Navigator" dock is setup and the (Application Scoped) {{DecisionNavigatorObserver}} instantiated *after* the diagram has been opened and the session created (as it is not first referenced until after Stunner completes loading the diagram and creating the session).
When you then close the editor and re-open the file, the (Stunner) mechanism that opens the diagram and creates the session fires {{CanvasElementAddedEvent}} events that are received by {{DecisionNavigatorObserver}} *before* the Dock has its content set to the "open" session. This leads to the NPE in {{DecisionNavigatorBaseItemFactory.diagramUUID()}} reported by [~jomarko].
Now... I [changed|https://github.com/kiegroup/kie-wb-common/commit/89b09561595a063a6373c4018df9701019d6f9f2#diff-4b3431586dacd36f5dd28cb8bde0d732] {{DecisionNavigatorBaseItemFactory}} to use the "diagram UUID" as the parent of all base nodes instead of their parent when I added the Decision Service node (as this addition meant a Node's parent was not always the diagram).
Do you think it best I find a different approach for getting a "root UUID" for base items in the Decision Navigator. I assume *any* string will do and I don't really need to lookup a UUID for the diagram or any node for that matter.
was (Author: manstis):
Hi [~karreiro], can I have your opinion on this please :-)
The issue appears to be that when you first run the workbench and create a file the "Decision Navigator" dock is setup and the (Application Scoped) {{DecisionNavigatorObserver}} instantiated *after* the diagram has been opened and the session created. When you then close the editor and re-open the file, the (Stunner) mechanism that opens the diagram and creates the session fires {{CanvasElementAddedEvent}} events that are received by {{DecisionNavigatorObserver}} before the Dock has its content set to the "open" session. This leads to the NPE in {{DecisionNavigatorBaseItemFactory.diagramUUID()}} reported by [~jomarko].
Now... I [changed|https://github.com/kiegroup/kie-wb-common/commit/89b09561595a063a6373c4018df9701019d6f9f2#diff-4b3431586dacd36f5dd28cb8bde0d732] {{DecisionNavigatorBaseItemFactory}} to use the "diagram UUID" as the parent of all base nodes instead of their parent when I added the Decision Service node (as this addition meant a Node's parent was not always the diagram).
Do you think it best I find a different approach for getting a "root UUID" for base items in the Decision Navigator. I assume *any* string will do and I don't really need to lookup a UUID for the diagram or any node for that matter.
> [DMN Designer] Error after reopening
> ------------------------------------
>
> Key: DROOLS-3431
> URL: https://issues.jboss.org/browse/DROOLS-3431
> Project: Drools
> Issue Type: Bug
> Components: DMN Editor
> Affects Versions: 7.16.0.Final
> Reporter: Jozef Marko
> Assignee: Michael Anstis
> Priority: Critical
> Labels: drools-tools
> Attachments: Screenshot from 2018-12-13 08-09-38.png, reopen.error.log
>
>
> There appears an unexpected error dialog when user reopen stored dmn diagram. Secodn reopening works fine. See the steps to reproduce and attached error.
> This was spotted during [DROOL-3286 PR Review|https://github.com/kiegroup/kie-wb-common/pull/2344] however not sure if it is related.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
More information about the jboss-jira
mailing list