Activiti
  1. Activiti
  2. ACT-1857

Exexcution Listener property save is not being added to the correct model element

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.15
    • Fix Version/s: 5.14
    • Component/s: Designer
    • Labels:
      None
    • Environment:
      Windows 7 Enterprise SP 1, Eclipse Kepler, with Graphiti 0.92 based on Activiti 5.15-SNAPSHOT
    • Number of attachments :
      0

      Description

      I downloaded and built the latest Designer code, but some of the properties dialogs are not triggering a save and the text I enter disappears when I change focus. I noticed that some of the util module code was refactored and moved into the gui module, but I have not debugged the issue yet. I was attempting to extend the designer to support a new properties tab and editor for Data Objects. When I tried with the existing code (without my modifications, it still would not save the General properties for the main Process dialog, or form properties for start events or user tasks. I did not see any errors in the log or console.

        Activity

        Hide
        Lori Small added a comment -

        I retried with a clean build (without my changes) and cannot reproduce it. I must have introduces it somehow - my apologies!

        Show
        Lori Small added a comment - I retried with a clean build (without my changes) and cannot reproduce it. I must have introduces it somehow - my apologies!
        Hide
        Lori Small added a comment -

        I have rebuilt a new level without any changes using Kepler and I can't get the ExecutionListener dialog save to work correctly. If I select the Process diagram and then the Listener tab, I am able to add a listener to the table. However, if I then select the subprocess and try to add one there, it gets added to the process table instead and I see it as a process extension set of 2 listeners within the process. If I try to remove one from the list, I get an array error:

        at java.util.ArrayList.RangeCheck(ArrayList.java:547)
        at java.util.ArrayList.remove(ArrayList.java:387)
        at org.activiti.designer.util.BpmnBOUtil.removeExecutionListener(BpmnBOUtil.java:90)
        at org.activiti.designer.property.ui.AbstractListenerEditor.saveRemovedObject(AbstractListenerEditor.java:263)
        at org.activiti.designer.property.ui.AbstractListenerEditor.removedItem(AbstractListenerEditor.java:123)
        at org.activiti.designer.property.ui.TableFieldEditor.removePressed(TableFieldEditor.java:504)
        at org.activiti.designer.property.ui.TableFieldEditor.access$5(TableFieldEditor.java:499)
        at org.activiti.designer.property.ui.TableFieldEditor$1.widgetSelected(TableFieldEditor.java:267)
        at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
        at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
        at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
        at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
        at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
        at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:138)
        at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:610)
        at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
        at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
        at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
        at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
        at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
        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:636)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
        at org.eclipse.equinox.launcher.Main.main(Main.java:1426)

        If I start with the subprocess, then both listeners are on the subprocess table and xml sectionwith a similar result.

        Show
        Lori Small added a comment - I have rebuilt a new level without any changes using Kepler and I can't get the ExecutionListener dialog save to work correctly. If I select the Process diagram and then the Listener tab, I am able to add a listener to the table. However, if I then select the subprocess and try to add one there, it gets added to the process table instead and I see it as a process extension set of 2 listeners within the process. If I try to remove one from the list, I get an array error: at java.util.ArrayList.RangeCheck(ArrayList.java:547) at java.util.ArrayList.remove(ArrayList.java:387) at org.activiti.designer.util.BpmnBOUtil.removeExecutionListener(BpmnBOUtil.java:90) at org.activiti.designer.property.ui.AbstractListenerEditor.saveRemovedObject(AbstractListenerEditor.java:263) at org.activiti.designer.property.ui.AbstractListenerEditor.removedItem(AbstractListenerEditor.java:123) at org.activiti.designer.property.ui.TableFieldEditor.removePressed(TableFieldEditor.java:504) at org.activiti.designer.property.ui.TableFieldEditor.access$5(TableFieldEditor.java:499) at org.activiti.designer.property.ui.TableFieldEditor$1.widgetSelected(TableFieldEditor.java:267) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:138) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:610) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181) 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:636) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591) at org.eclipse.equinox.launcher.Main.run(Main.java:1450) at org.eclipse.equinox.launcher.Main.main(Main.java:1426) If I start with the subprocess, then both listeners are on the subprocess table and xml sectionwith a similar result.
        Hide
        Lori Small added a comment - - edited

        I tested using my 5.12.0 (Graphiti 0.92) plug-in which I installed directly from the update site (http://activiti.org/designer/update/) and it works fine. I also tested using a new 5.15 SNAPSHOT/Indigo build with similar results.

        Show
        Lori Small added a comment - - edited I tested using my 5.12.0 (Graphiti 0.92) plug-in which I installed directly from the update site ( http://activiti.org/designer/update/ ) and it works fine. I also tested using a new 5.15 SNAPSHOT/Indigo build with similar results.
        Hide
        Lori Small added a comment - - edited

        It looks like the updatableBo value is not getting set properly in the org.activiti.designer.property.ui.AbstractListenerEditor class saveNewObject method:

        private void saveNewObject(final AbstractListenerDialog dialog) {
        if (pictogramElement != null) {
        // Perform the changes on the updatable BO instead of the original
        Object updatableBo = modelUpdater.getProcessModelUpdater().getUpdatableBusinessObject();
        ...

        If I select the Process Listeners property section first, it always comes back as Process. If I select the SubProcess section first, it comes back as SubProcess. The correct ModelUpdater seems to be used (getModelUpdaterFor method in org.activiti.designer.diagram.ActivitiBPMNFeatureProvider), so the initial screen shows the listener added. But if you change focus and navigate back to either section, they will all be listed in the same section depending upon which is selected first. So, the correct createUpdater method in the relevant ModelUpdater class is called, but the wrong performUpdates method is called (in the other class). I am not sure how you set the new and old business object values in the BpmnProcessModelUpdater class which appears to be used to determine the updateable bo.

        Show
        Lori Small added a comment - - edited It looks like the updatableBo value is not getting set properly in the org.activiti.designer.property.ui.AbstractListenerEditor class saveNewObject method: private void saveNewObject(final AbstractListenerDialog dialog) { if (pictogramElement != null) { // Perform the changes on the updatable BO instead of the original Object updatableBo = modelUpdater.getProcessModelUpdater().getUpdatableBusinessObject(); ... If I select the Process Listeners property section first, it always comes back as Process. If I select the SubProcess section first, it comes back as SubProcess. The correct ModelUpdater seems to be used (getModelUpdaterFor method in org.activiti.designer.diagram.ActivitiBPMNFeatureProvider), so the initial screen shows the listener added. But if you change focus and navigate back to either section, they will all be listed in the same section depending upon which is selected first. So, the correct createUpdater method in the relevant ModelUpdater class is called, but the wrong performUpdates method is called (in the other class). I am not sure how you set the new and old business object values in the BpmnProcessModelUpdater class which appears to be used to determine the updateable bo.
        Hide
        Tijs Rademakers added a comment -

        This was work-in-progress, but should work in the current Github version

        Show
        Tijs Rademakers added a comment - This was work-in-progress, but should work in the current Github version
        Hide
        Lori Small added a comment -

        I am trying to build the latest level and get some new Java errors:

        org.activiti.designer.eclipse

        The constructor DefaultUpdateBehavior(DiagramBehavior) is undefined ActivitiEditorUpdateBehavior.java /org.activiti.designer.eclipse/src/main/java/org/activiti/designer/eclipse/editor line 17 Java Problem
        The method getDiagramBehavior() is undefined for the type ActivitiDiagramEditor FileService.java /org.activiti.designer.eclipse/src/main/java/org/activiti/designer/eclipse/util line 242 Java Problem
        The method getDiagramBehavior() is undefined for the type ActivitiDiagramEditor FileService.java /org.activiti.designer.eclipse/src/main/java/org/activiti/designer/eclipse/util line 243 Java Problem
        The method getDiagramBehavior() is undefined for the type IDiagramTypeProvider ActivitiBpmnModelChangeListener.java /org.activiti.designer.eclipse/src/main/java/org/activiti/designer/eclipse/editor line 84 Java Problem
        The method getDiagramBehavior() is undefined for the type ActivitiDiagramEditor FileService.java /org.activiti.designer.eclipse/src/main/java/org/activiti/designer/eclipse/util line 257 Java Problem
        The method getDiagramBehavior() is undefined for the type IDiagramTypeProvider ActivitiBpmnModelChangeListener.java /org.activiti.designer.eclipse/src/main/java/org/activiti/designer/eclipse/editor line 88 Java Problem
        The constructor DiagramEditorContextMenuProvider(EditPartViewer, ActionRegistry, IConfigurationProvider) is undefined ActivitiEditorContextMenuProvider.java /org.activiti.designer.eclipse/src/main/java/org/activiti/designer/eclipse/ui line 14 Java Problem

        org.activiti.designer.gui

        The method getDiagramContainer() is undefined for the type BaseActivitiPropertySection BaseActivitiPropertySection.java /org.activiti.designer.gui/src/main/java/org/activiti/designer/property line 66 Java Problem
        The method getDiagramContainer() is undefined for the type PropertyServiceTaskSection PropertyServiceTaskSection.java /org.activiti.designer.gui/src/main/java/org/activiti/designer/property line 142 Java Problem

        org.activiti.designer.kickstart.eclipse

        The method getDiagramBehavior() is undefined for the type DiagramEditor FileService.java /org.activiti.designer.kickstart.eclipse/src/main/java/org/activiti/designer/kickstart/eclipse/util line 257 Java Problem
        The method getDiagramBehavior() is undefined for the type DiagramEditor FileService.java /org.activiti.designer.kickstart.eclipse/src/main/java/org/activiti/designer/kickstart/eclipse/util line 243 Java Problem
        The method getDiagramBehavior() is undefined for the type DiagramEditor FileService.java /org.activiti.designer.kickstart.eclipse/src/main/java/org/activiti/designer/kickstart/eclipse/util line 242 Java Problem
        The constructor DefaultUpdateBehavior(DiagramBehavior) is undefined KickstartProcessEditorUpdateBehavior.java /org.activiti.designer.kickstart.eclipse/src/main/java/org/activiti/designer/kickstart/eclipse/editor line 17 Java Problem
        The method getDiagramBehavior() is undefined for the type IDiagramTypeProvider KickstartProcessChangeListener.java /org.activiti.designer.kickstart.eclipse/src/main/java/org/activiti/designer/kickstart/eclipse/editor line 85 Java Problem
        The constructor DiagramEditorContextMenuProvider(EditPartViewer, ActionRegistry, IConfigurationProvider) is undefined ActivitiEditorContextMenuProvider.java /org.activiti.designer.kickstart.eclipse/src/main/java/org/activiti/designer/kickstart/eclipse/ui line 14 Java Problem

        Did the graphiti level change? I am using 9.2, but I see 10.1 jars in the generated classpath.

        I am trying to follow the instructions here:

        http://docs.codehaus.org/display/ACT/Activiti+Designer+Developer+Guide

        I found that I had to update the org.activiti.designer.libs module manifest file to explicitly include all teh root level jars to get this far, but I am not sure what is causing these errors.

        Show
        Lori Small added a comment - I am trying to build the latest level and get some new Java errors: org.activiti.designer.eclipse The constructor DefaultUpdateBehavior(DiagramBehavior) is undefined ActivitiEditorUpdateBehavior.java /org.activiti.designer.eclipse/src/main/java/org/activiti/designer/eclipse/editor line 17 Java Problem The method getDiagramBehavior() is undefined for the type ActivitiDiagramEditor FileService.java /org.activiti.designer.eclipse/src/main/java/org/activiti/designer/eclipse/util line 242 Java Problem The method getDiagramBehavior() is undefined for the type ActivitiDiagramEditor FileService.java /org.activiti.designer.eclipse/src/main/java/org/activiti/designer/eclipse/util line 243 Java Problem The method getDiagramBehavior() is undefined for the type IDiagramTypeProvider ActivitiBpmnModelChangeListener.java /org.activiti.designer.eclipse/src/main/java/org/activiti/designer/eclipse/editor line 84 Java Problem The method getDiagramBehavior() is undefined for the type ActivitiDiagramEditor FileService.java /org.activiti.designer.eclipse/src/main/java/org/activiti/designer/eclipse/util line 257 Java Problem The method getDiagramBehavior() is undefined for the type IDiagramTypeProvider ActivitiBpmnModelChangeListener.java /org.activiti.designer.eclipse/src/main/java/org/activiti/designer/eclipse/editor line 88 Java Problem The constructor DiagramEditorContextMenuProvider(EditPartViewer, ActionRegistry, IConfigurationProvider) is undefined ActivitiEditorContextMenuProvider.java /org.activiti.designer.eclipse/src/main/java/org/activiti/designer/eclipse/ui line 14 Java Problem org.activiti.designer.gui The method getDiagramContainer() is undefined for the type BaseActivitiPropertySection BaseActivitiPropertySection.java /org.activiti.designer.gui/src/main/java/org/activiti/designer/property line 66 Java Problem The method getDiagramContainer() is undefined for the type PropertyServiceTaskSection PropertyServiceTaskSection.java /org.activiti.designer.gui/src/main/java/org/activiti/designer/property line 142 Java Problem org.activiti.designer.kickstart.eclipse The method getDiagramBehavior() is undefined for the type DiagramEditor FileService.java /org.activiti.designer.kickstart.eclipse/src/main/java/org/activiti/designer/kickstart/eclipse/util line 257 Java Problem The method getDiagramBehavior() is undefined for the type DiagramEditor FileService.java /org.activiti.designer.kickstart.eclipse/src/main/java/org/activiti/designer/kickstart/eclipse/util line 243 Java Problem The method getDiagramBehavior() is undefined for the type DiagramEditor FileService.java /org.activiti.designer.kickstart.eclipse/src/main/java/org/activiti/designer/kickstart/eclipse/util line 242 Java Problem The constructor DefaultUpdateBehavior(DiagramBehavior) is undefined KickstartProcessEditorUpdateBehavior.java /org.activiti.designer.kickstart.eclipse/src/main/java/org/activiti/designer/kickstart/eclipse/editor line 17 Java Problem The method getDiagramBehavior() is undefined for the type IDiagramTypeProvider KickstartProcessChangeListener.java /org.activiti.designer.kickstart.eclipse/src/main/java/org/activiti/designer/kickstart/eclipse/editor line 85 Java Problem The constructor DiagramEditorContextMenuProvider(EditPartViewer, ActionRegistry, IConfigurationProvider) is undefined ActivitiEditorContextMenuProvider.java /org.activiti.designer.kickstart.eclipse/src/main/java/org/activiti/designer/kickstart/eclipse/ui line 14 Java Problem Did the graphiti level change? I am using 9.2, but I see 10.1 jars in the generated classpath. I am trying to follow the instructions here: http://docs.codehaus.org/display/ACT/Activiti+Designer+Developer+Guide I found that I had to update the org.activiti.designer.libs module manifest file to explicitly include all teh root level jars to get this far, but I am not sure what is causing these errors.
        Hide
        Lori Small added a comment -

        Never mind, I had the wrong Graphiti plug-in. Once I upgraded to 10.1, the 9.2 jars were removed from the plug-in dependency library.

        Show
        Lori Small added a comment - Never mind, I had the wrong Graphiti plug-in. Once I upgraded to 10.1, the 9.2 jars were removed from the plug-in dependency library.

          People

          • Assignee:
            Tijs Rademakers
            Reporter:
            Lori Small
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: