[jboss-jira] [JBoss JIRA] Reopened: (GPD-79) ProcessDefinitionDomAdapter.NODE_TYPES should not be hardcoded

John Ruud (JIRA) jira-events at lists.jboss.org
Fri Mar 21 17:00:51 EDT 2008


     [ http://jira.jboss.com/jira/browse/GPD-79?page=all ]

John Ruud reopened GPD-79:
--------------------------

             
It looks like the problem is back in GPD 3.1.2 (I'm synced up with the branch_jbpm_jpdl_gpd_3_1_x branch of jbpm.3/designer/jpdl/org.jbpm.gd.jpdl). The following exception is written to the Eclipse error log once I drop any of my custom nodes (earlier selected from the palette) onto the diagram.  

java.lang.NullPointerException
at org.jbpm.gd.common.xml.XmlAdapter.isNodeOfType(XmlAdapter.java:225)
at org.jbpm.gd.common.xml.XmlAdapter.getFirstNode(XmlAdapter.java:240)
at org.jbpm.gd.common.xml.XmlAdapter.hasNode(XmlAdapter.java:259)
at org.jbpm.gd.common.xml.XmlAdapter.addElement(XmlAdapter.java:77)
at org.jbpm.gd.common.xml.XmlAdapter.addElement(XmlAdapter.java:383)
at org.jbpm.gd.jpdl.xml.ProcessDefinitionDomAdapter.doPropertyChange(ProcessDefinitionDomAdapter.java:120)
at org.jbpm.gd.common.xml.XmlAdapter.propertyChange(XmlAdapter.java:481)
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339)
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276)
at org.jbpm.gd.common.model.AbstractSemanticElement.firePropertyChange(AbstractSemanticElement.java:20)
at org.jbpm.gd.jpdl.model.ProcessDefinition.addNodeElement(ProcessDefinition.java:81)
at org.jbpm.gd.jpdl.command.NodeCreateCommand.addAbstractNode(NodeCreateCommand.java:42)
at org.jbpm.gd.jpdl.command.NodeCreateCommand.execute(NodeCreateCommand.java:35)
at org.eclipse.gef.commands.CommandStack.execute(CommandStack.java:149)
at org.eclipse.gef.tools.AbstractTool.executeCommand(AbstractTool.java:388)
at org.eclipse.gef.tools.AbstractTool.executeCurrentCommand(AbstractTool.java:400)
at org.eclipse.gef.tools.CreationTool.performCreation(CreationTool.java:254)
at org.eclipse.gef.tools.CreationTool.handleButtonUp(CreationTool.java:178)
at org.eclipse.gef.tools.AbstractTool.mouseUp(AbstractTool.java:1053)
at org.eclipse.gef.EditDomain.mouseUp(EditDomain.java:259)
at org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMouseReleased(DomainEventDispatcher.java:374)
at org.eclipse.draw2d.LightweightSystem$EventHandler.mouseUp(LightweightSystem.java:538)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:206)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
at org.eclipse.equinox.launcher.Main.main(Main.java:1148)

Adding the mapping for my custom node (NODE_TYPES.put("decide", "node-element")) to ProcessDefinitionDomAdapter.getNodeTypes() resolved the problem. I can also reproduce the problem by for example removing the hardcoded mapping for 'state', and then attemping to add a new 'state' to the diagram from the palette.

> ProcessDefinitionDomAdapter.NODE_TYPES should not be hardcoded
> --------------------------------------------------------------
>
>                 Key: GPD-79
>                 URL: http://jira.jboss.com/jira/browse/GPD-79
>             Project: JBoss jBPM GPD
>          Issue Type: Bug
>          Components: jpdl
>    Affects Versions: jBPM JPDL Designer 3.1.0.alpha4
>            Reporter: John Ruud
>         Assigned To: Koen Aers
>             Fix For: jBPM JPDL Designer 3.1.0.beta2
>
>
> I had to add my custom node types to ProcessDefinitionDomAdapter.NODE_TYPES in order to be able to add the nodes from the palette. It would be helpful if ProcessDefinitionDomAdapter.NODE_TYPES could get populated from an extension point instead (similar to: org.jbpm.gd.jpdl.notationMappings). This change is probably already planned, just attempting to bump it up on the priority list slightly as it's something I'm currently using

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list