1 2 Previous Next 18 Replies Latest reply on Nov 27, 2013 8:06 AM by Yogesh Gupta

    How track JBPM5 flow diagram?

    Zhao Lu Newbie

           I want to know when I start the process,

      how to view a flow chart to keep track of the current node,

      be able to view the flow chart of the current node.

        • 1. Re: How track JBPM5 flow diagram?
          Shobhit Tyagi Master

          Zhao,

           

          I believe you only have process instance id.

          So you can use the following to get the coordinates of the current node :

          public static ArrayList<String> getProcessGraphicalStatus(String processInstanceId) throws Exception
           {
            String processDefId = JPAProcessInstanceDbLog.findProcessInstance(Long.parseLong(processInstanceId)).getProcessId();
              kbase = readKnowledgeBase();  // Method to get the KnowledgeBase object.
               Process process = kbase.getProcess(processDefId);
          
           
            ArrayList<String> coordinates = new ArrayList<String>();
            try
            {
             List<NodeInstanceLog> nodeInstanceLogList;
             for (Node node : (Node[])((WorkflowProcessImpl) process).getNodes())
             {
              nodeInstanceLogList = JPAProcessInstanceDbLog.findNodeInstances(Long.parseLong(processInstanceId), new Long(node.getId()).toString());
              if(nodeInstanceLogList.size() == 1)
              {
               coordinates.add(node.getMetaData().get("x")+"");
               coordinates.add(node.getMetaData().get("y")+"");
               coordinates.add(node.getMetaData().get("height")+"");
               coordinates.add(node.getMetaData().get("width")+"");
              }
             }
            }
            catch(Exception e)
            {
             e.printStackTrace();
            }
            return coordinates;
           }
          

           

          Once you have the coordinates you can put the following in your view :

           

           

          <div style="position:relative;width:1024px; height:768px;">
                  <img src="ProcessImageUrl" style="position:absolute;top:0;left:0" />
                 <ui:repeat value="CoordinateArrayList" var="item">
                           <div style="position:absolute;top:YCoordinatepx;left:XCoordinatepx;height:HeightCoordinatepx;width:WidthCoordinatepx;border:3px solid red; z-index:1000;"></div>
                       </ui:repeat>
                </div>
          
          

           

          Just reduce the height coordinate and width coordinate values by 6 before you put them in the view part.

           

          Regards.

          1 of 1 people found this helpful
          • 2. Re: How track JBPM5 flow diagram?
            Zhao Lu Newbie

            Dear  Shobhit

                 Thank you very much.

             

            Best wishes.

             

                      Zhao

            • 3. Re: How track JBPM5 flow diagram?
              Yelve Yakut Newbie

              Unfortunately all meta information gets lost when using the eclipse editor mentioned in Chapter 10. Eclipse BPMN 2.0 Plugin to save the file. On the other hand the "BPMN2 Process Editor" packaged in the drools eclipse plugin seems to retain meta data. Unfortunately the latter doesn't support event based gateways. Is there any way to teach the former how to include meta data?

              • 4. Re: How track JBPM5 flow diagram?
                Robert (Bob) Brodt Newbie

                Hi Yelve,

                 

                Can you be more specific about what metadata is getting lost?

                 

                Thanks,

                Bob

                • 5. Re: Re: How track JBPM5 flow diagram?
                  Yelve Yakut Newbie

                  Hey Bob,

                   

                  my code does something like:


                  public void afterNodeTriggered(ProcessNodeTriggeredEvent e) {

                  ...

                  Map<String, Object> meta = e.getNodeInstance().getNode().getMetaData();

                  ...

                  }

                   

                  Usually the meta map would look like this: {height=48, width=48, UniqueId=_5, y=12, x=420}

                   

                  Turns out that once I edit the .bpmn file with the editor which is mentioned in the documentation(Bpmn2 Diagram Editor), the very same code would result in a map like: {UniqueId=_5}



                  The file becomes tainted, so that the other editor(BPMN2 Process Editor) is not able to open it anymore. All nodes are overlapping like this:

                  missing-meta-bug.png

                  It is really strange that the Bpmn2 Diagram Editor has no problems showing the file properly.

                   

                  Unfortunately I wasn't able to pinpoint the problem in the xml. Maybe you can? I attached the tainted bpmn file.

                  I'm also willing to debug myself if anybody could point me to the class which is responsible for parsing the meta information.


                  Ciao,

                  Yelve

                  • 6. Re: Re: How track JBPM5 flow diagram?
                    Robert (Bob) Brodt Newbie

                    Hi Yelve,

                     

                    Thanks for the attachments. I've had a chance to look at these in more depth and I believe this inconsistency is now fixed in the latest version of the BPMN2 Modeler (what you call the "Bpmn2 Diagram Editor" ). Could you please try to install the latest version from the eclipse update site and see if this problem goes away? Process files should now be interchangeable between the old and new eclipse editors.

                     

                    If you're interested, the problem arose because the old eclipse editor was not fully BPMN 2.0 spec compliant: some of the model object references that should have been QNames (according to the spec) were not serialized as such in the old editor. The new editor is based on the eclipse bpmn2 metamodel (which is spec compliant) so I've had to do some XML gymnastics to get the new editor to write valid XML files that are also backward compatible.

                     

                    Thanks!

                    Bob

                    • 7. Re: How track JBPM5 flow diagram?
                      praveen reddy Newbie

                      Hello Bob....

                       

                      Could you please let me know how can we Integrate JSON  Object (Java Script) File with JBPM Work flow....I'm new to JBPM and Struggling to find Integrating the  UI which is Developed HTML to JBPMN

                       

                      I would ready to call you also but  i dnt knw who can help me

                      • 8. Re: How track JBPM5 flow diagram?
                        mdegan Newbie

                        Hi Shobhit,

                         

                        I did implement the logic for getting the current active nodes to display graphically. However, if I am in a parallel process, I get more than 1 active nodes. With my basic logic of using iterator on ActiveNodeInstances, I am able to color code all. However, I am trying to highlight the one which the current user has to act on. For example, there is NodeA and NodeB which are active now. NodeA is pending UserX and NodeB is pending UserY. When UserX is logged in, I want to highlight the NodeA for him, similar for UserY.

                         

                        Right now, I am not able to relate the nodes to the tasks, therefore not able to relate the node to the user as well. If there is a suggestion on this, it might be of great help.

                         

                        Regards,

                        Manish

                        • 9. Re: Re: Re: How track JBPM5 flow diagram?
                          Yelve Yakut Newbie

                          Hi Bob,

                           

                          thanks for the reply. I tried the latest stable(0.2.5.201305082126) and nightly(0.2.7.201310031845) versions of the BPMN2 Editor. The former is still the same version which gave me an headache and the latter crashes with an exception.

                           

                          Suggestions?

                           

                          org.eclipse.core.runtime.CoreException: Plug-in org.eclipse.bpmn2.modeler.ui was unable to load class org.eclipse.bpmn2.modeler.ui.editor.BPMN2MultiPageEditor.

                              at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.throwException(RegistryStrategyOSGI.java:194)

                              at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:176)

                              at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905)

                              at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)

                              at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)

                              at org.eclipse.ui.internal.WorkbenchPlugin$1.run(WorkbenchPlugin.java:273)

                              at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)

                              at org.eclipse.ui.internal.WorkbenchPlugin.createExtension(WorkbenchPlugin.java:269)

                              at org.eclipse.ui.internal.registry.EditorDescriptor.createEditor(EditorDescriptor.java:235)

                              at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:319)

                              at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPart(CompatibilityPart.java:262)

                              at org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor.createPart(CompatibilityEditor.java:61)

                              at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:299)

                              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                              at java.lang.reflect.Method.invoke(Method.java:606)

                              at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)

                              at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:861)

                              at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:841)

                              at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:113)

                              at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:321)

                              at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:242)

                              at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:161)

                              at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:102)

                              at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:71)

                              at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:53)

                              at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer.createWidget(ContributedPartRenderer.java:141)

                              at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:894)

                              at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:629)

                              at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:731)

                              at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$2(PartRenderingEngine.java:702)

                              at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:696)

                              at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)

                              at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:681)

                              at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer.showTab(StackRenderer.java:1115)

                              at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer$1.handleEvent(LazyStackRenderer.java:67)

                              at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:41)

                              at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:180)

                              at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150)

                              at org.eclipse.swt.widgets.Display.syncExec(Display.java:4299)

                              at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:187)

                              at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:38)

                              at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:197)

                              at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197)

                              at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)

                              at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)

                              at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)

                              at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135)

                              at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78)

                              at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39)

                              at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:80)

                              at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:58)

                              at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374)

                              at org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl.setSelectedElement(ElementContainerImpl.java:171)

                              at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.showElementInWindow(ModelServiceImpl.java:422)

                              at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.bringToTop(ModelServiceImpl.java:389)

                              at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.delegateBringToTop(PartServiceImpl.java:606)

                              at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.bringToTop(PartServiceImpl.java:332)

                              at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(PartServiceImpl.java:1029)

                              at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:3047)

                              at org.eclipse.ui.internal.WorkbenchPage.access$22(WorkbenchPage.java:2969)

                              at org.eclipse.ui.internal.WorkbenchPage$8.run(WorkbenchPage.java:2951)

                              at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)

                              at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2947)

                              at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2911)

                              at org.eclipse.ui.actions.OpenWithMenu.openEditor(OpenWithMenu.java:338)

                              at org.eclipse.ui.actions.OpenWithMenu$2.handleEvent(OpenWithMenu.java:180)

                              at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)

                              at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1276)

                              at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3562)

                              at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3186)

                              at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)

                              at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)

                              at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)

                              at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)

                              at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)

                              at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)

                              at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)

                              at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)

                              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:353)

                              at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)

                              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                              at java.lang.reflect.Method.invoke(Method.java:606)

                              at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)

                              at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)

                              at org.eclipse.equinox.launcher.Main.run(Main.java:1438)

                              at org.eclipse.equinox.launcher.Main.main(Main.java:1414)

                          Caused by: org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter$TerminatingClassNotFoundException: An error occurred while automatically activating bundle org.eclipse.bpmn2.modeler.ui (1226).

                              at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:122)

                              at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:469)

                              at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)

                              at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:395)

                              at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:464)

                              at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)

                              at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)

                              at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)

                              at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

                              at java.lang.Class.getDeclaredConstructors0(Native Method)

                              at java.lang.Class.privateGetDeclaredConstructors(Class.java:2483)

                              at java.lang.Class.getConstructor0(Class.java:2793)

                              at java.lang.Class.newInstance(Class.java:345)

                              at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:184)

                              at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905)

                              at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)

                              at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)

                              at org.eclipse.core.internal.content.ContentType.getDescriber(ContentType.java:271)

                              at org.eclipse.core.internal.content.ContentType.internalGetDescriptionFor(ContentType.java:450)

                              at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:356)

                              at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:360)

                              at org.eclipse.core.internal.content.ContentTypeMatcher.getDescriptionFor(ContentTypeMatcher.java:86)

                              at org.eclipse.core.internal.resources.ContentDescriptionManager.readDescription(ContentDescriptionManager.java:445)

                              at org.eclipse.core.internal.resources.ContentDescriptionManager.getDescriptionFor(ContentDescriptionManager.java:355)

                              at org.eclipse.core.internal.resources.File.getContentDescription(File.java:271)

                              at org.eclipse.core.internal.propertytester.FilePropertyTester.testContentType(FilePropertyTester.java:108)

                              at org.eclipse.core.internal.propertytester.FilePropertyTester.test(FilePropertyTester.java:60)

                              at org.eclipse.core.internal.expressions.Property.test(Property.java:58)

                              at org.eclipse.core.internal.expressions.TestExpression.evaluate(TestExpression.java:99)

                              at org.eclipse.core.internal.expressions.CompositeExpression.evaluateOr(CompositeExpression.java:68)

                              at org.eclipse.core.internal.expressions.OrExpression.evaluate(OrExpression.java:21)

                              at org.eclipse.core.internal.expressions.CompositeExpression.evaluateAnd(CompositeExpression.java:53)

                              at org.eclipse.core.internal.expressions.AdaptExpression.evaluate(AdaptExpression.java:91)

                              at org.eclipse.core.internal.expressions.CompositeExpression.evaluateAnd(CompositeExpression.java:53)

                              at org.eclipse.core.internal.expressions.AndExpression.evaluate(AndExpression.java:29)

                              at org.eclipse.ui.internal.dialogs.RegistryPageContributor.failsEnablement(RegistryPageContributor.java:311)

                              at org.eclipse.ui.internal.dialogs.RegistryPageContributor.isApplicableTo(RegistryPageContributor.java:251)

                              at org.eclipse.ui.internal.dialogs.PropertyPageContributorManager.getApplicableContributors(PropertyPageContributorManager.java:218)

                              at org.eclipse.ui.internal.dialogs.PropertyPageContributorManager.getApplicableContributors(PropertyPageContributorManager.java:237)

                              at org.eclipse.ui.dialogs.PropertyDialogAction.hasPropertyPagesFor(PropertyDialogAction.java:105)

                              at org.eclipse.ui.dialogs.PropertyDialogAction.isApplicableForSelection(PropertyDialogAction.java:147)

                              at org.eclipse.ui.dialogs.PropertyDialogAction.isApplicableForSelection(PropertyDialogAction.java:127)

                              at org.eclipse.jdt.ui.actions.OpenViewActionGroup.fillContextMenu(OpenViewActionGroup.java:278)

                              at org.eclipse.jdt.ui.actions.NavigateActionGroup.fillContextMenu(NavigateActionGroup.java:108)

                              at org.eclipse.jdt.internal.ui.actions.CompositeActionGroup.fillContextMenu(CompositeActionGroup.java:75)

                              at org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.fillContextMenu(PackageExplorerActionGroup.java:290)

                              at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart.menuAboutToShow(PackageExplorerPart.java:795)

                              at org.eclipse.jface.action.MenuManager.fireAboutToShow(MenuManager.java:343)

                              at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:475)

                              at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:470)

                              at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:500)

                              at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:255)

                              at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)

                              at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1276)

                              at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1300)

                              at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1281)

                              at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:198)

                              at org.eclipse.swt.widgets.Display.runPopups(Display.java:3604)

                              at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3176)

                              ... 22 more

                          Caused by: org.osgi.framework.BundleException: The activator org.eclipse.bpmn2.modeler.ui.Activator for bundle org.eclipse.bpmn2.modeler.ui is invalid

                              at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:172)

                              at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:679)

                              at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)

                              at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:300)

                              at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:440)

                              at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:263)

                              at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107)

                              ... 80 more

                          Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.eclipse.bpmn2.modeler.ui.Activator

                              at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

                              at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)

                              at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

                              at java.lang.reflect.Constructor.newInstance(Constructor.java:526)

                              at java.lang.Class.newInstance(Class.java:374)

                              at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:167)

                              ... 86 more

                          • 10. Re: Re: How track JBPM5 flow diagram?
                            Robert (Bob) Brodt Newbie

                            This version (the nightly build) is specifically built for Graphiti version 0.9.2. If you are running eclipse Kepler which, by default, uses Graphiti 0.10.0 you will need to use the nightly build from here instead.

                             

                            Just FYI, I was able to open the process you had attached previously using eclipse Juno and it looks like this:

                             

                             

                            This process file is actually invalid because the simulation parameter elements duplicate the IDs of BPMN2 elements and by definition, IDs must be unique within an XML document. For example, this first ElementParameters element:

                             

                            <bpsim:ElementParameters xsi:type="bpsim:ElementParameters" id="_1">

                             

                            has the same ID as the Start Event:

                             

                            <bpmn2:startEvent id="_1" name="Start">

                             

                            To fix this, simply use a text editor to remove the entire <bpmn2:relationship> element. To reconstruct the simulation parameters, you must enable them from the global User Preferences: Window -> Preferences -> BPMN2 -> jBPM Runtime -> Enable Simulation Parameters

                             

                            Please let me know if you still have problems.

                             

                            Cheers,

                            Bob

                            • 11. Re: How track JBPM5 flow diagram?
                              Shobhit Tyagi Master

                              Manish,

                               

                              Nodes have names. Unfortunately there is no task id you can get from a node as it is general for all process instances. So you have two objects. A node and a task. Whats common in there is the task name. I believe you are keeping the name of tasks different. 

                               

                              What you can do here is to get the name and match it with the task name and highlight only that.

                               

                              Another way i can think of is to match the meta data id of the task node. But i am not sure if we can obtain the meta data task id from the task object. It can be obtained from node though. If not then you can go with the first approach.Regards.

                              • 12. Re: How track JBPM5 flow diagram?
                                mdegan Newbie

                                Hi Shobhit,

                                 

                                Thanks for the reply. I tried getting the metadata from the node but the items available are only Height, Width, UniqueId, x and y. I am using these for plotting of active nodes, however I could not get the id that could relate me to the task for the node. I know that we configure the task name for the node and we are keeping them unique, however, I am still trying to understand how to get the task name from the node object. Node allows a getName() which gives the node name and not the task name. I was able to get task name from the task summary object. So if I can get it from the node object, I will be done.

                                 

                                Pardon my ignorance in case there is an obvious solution as I am new to jBPM. I have done my home work by going through the entire manual and a lot of reading material on the community. Appreciate your help.

                                 

                                Regards,

                                Manish

                                • 13. Re: How track JBPM5 flow diagram?
                                  mdegan Newbie

                                  Hi,

                                   

                                  I have been able to make some progress and get the linked node for a task. I am using workitemId to link the two. Here is the approach that I am taking:

                                  1) Get the workItemId for the task as : getTaskService().getTask(tasksummary.getId()).getTaskData().getWorkItemId()

                                  2) Get the information of the node as follows:

                                  ProcessInstance instance = kSession.getProcessInstance(tasksummary.getProcessInstanceId()); 

                                  WorkflowProcessInstance wfInstance = ((WorkflowProcessInstance)instance);

                                    // get currently Node instances

                                  Iterator<NodeInstance> iterator =wfInstance.getNodeInstances().iterator();

                                  NodeInstance nodeInstance = iterator.next();

                                  if(nodeInstance instanceof HumanTaskNodeInstance)

                                    {

                                        HumanTaskNodeInstance htask = (HumanTaskNodeInstance) nodeInstance;

                                       if(htask.getWorkItemId() == getTaskService().getTask(tasksummary.getId()).getTaskData().getWorkItemId())

                                            {

                                                  System.out.println("Node found for the task");

                                            }

                                     }

                                   

                                  So overall, if the workitemId from task matches the workItemId fetched from nodeInstance, I am considering the node to be linked to the task. Please let me know if this looks like a fine approach.

                                   

                                  Regards,

                                  Manish

                                  • 14. Re: How track JBPM5 flow diagram?
                                    Yogesh Gupta Newbie

                                    Hi Manish,
                                    Did you able to  get x and y coordinates??
                                    If yes than please share some code to get as above. It would be very helpful to me.

                                     

                                    Thanks in advance

                                    Yogesh

                                    1 2 Previous Next