2 Replies Latest reply on Sep 13, 2007 10:28 AM by Petia Wohed

    sub-process invocation

    Petia Wohed Newbie

      Hi,

      How do I invoke a sub-process from a main-process?

      I am trying to invoke a sub-process (in jBPM 3.1.4) but I fail.
      I have the following code in my main-process definition:

       <process-state name="sub1">
       <sub-process name="sequence"></sub-process>
       <transition name="" to="task2"></transition>
       </process-state>
      


      I have a process called sequence which is defined in the same process library as the main-process and which is successfully deployed and tested.

      The beginning of sequence/processdefinition.xml file looks like this:
      <process-definition
       xmlns="urn:jbpm.org:jpdl-3.1" name="sequence">
      ...
      



      When I am trying to deploy the main-process I am getting the following error message. (If the sub-process invocation is excluded, the main-process deploys nicely.)
      java.io.IOException: Server returned HTTP response code: 500 for URL: http://localhost:8080/jbpm/upload
      at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
      at org.jbpm.ui.util.ProcessDeployer.deployProcessWithServlet(Unknown Source)
      at org.jbpm.ui.util.ProcessDeployer.access$3(Unknown Source)
      at org.jbpm.ui.util.ProcessDeployer$1.run(Unknown Source)
      at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:369)
      at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:313)
      at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:479)
      at org.jbpm.ui.util.ProcessDeployer.showProgressMonitorDialog(Unknown Source)
      at org.jbpm.ui.util.ProcessDeployer.deploy(Unknown Source)
      at org.jbpm.ui.editor.form.deployment.DeploymentForm$1.widgetSelected(Unknown Source)
      at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90)
      at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
      at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
      at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)
      at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)
      at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1930)
      at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1894)
      at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:422)
      at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
      at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95)
      at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
      at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
      at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
      at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
      at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
      at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
      at org.eclipse.core.launcher.Main.run(Main.java:977)
      at org.eclipse.core.launcher.Main.main(Main.java:952)
      


      It seems that I do not refer to the sub-process properly. I have tried to find more information about how to do this on this forum and in the documentation, but I have not succeed to find out how to do.

      Help is appreciated. Thanks for taking your time.
      Kind regards, Petia

        • 1. Re: sub-process invocation
          Ronald van Kuijk Master

          look what the SERVER logs.... why it throws a 500

          • 2. Re: sub-process invocation
            Petia Wohed Newbie

            Sorry for the silly question, but where do I find the server log. I have really tried to find it (and searched through all log files modified last day) but I fail.

            I posted the question because I thought the problem of properly referring to a sub-process is similar to this of properly referring to a variable. It took me some time to find out a working syntax for accessing a variable from a xml process specification. The syntax I use now is: contextInstance.variables['variable-name'] (as pointed out on this forum not a straightforward syntax, but it is working. I did not get the syntax proposed in the documentation to work.). I thought that something similar may apply for process invocations.