2 Replies Latest reply on Oct 21, 2014 10:51 AM by catherinesjy

    jBPM process loop will automatically pop out in few minutes

    catherinesjy

      Dear all,

       

      I would like to set up a workflow, which looks like:     Loop ( gain files from a port -> process -> Storage )

      I would like to keep the loop running forever (at least for several hours).

       

      However, the jBPM workflow will pop out automatically after 90 times looping.

      In the console window, it shows the Stack Overflow Error.

       

      Could you help me find out that what is the reason for stack overflow?

       

      Looking forward to your help!

       

      Best,
      Catherine

       

      //environment: jre7, jbpm6, eclipse, BPMN2.0, win7

       

      //a little part of console log when popping out:

       

      Exception in thread "main" Executing com.jbpm.Process.DirectoryStorageHandler

      Executing com.jbpm.Process.ReleaseHandler

      java.lang.StackOverflowError

        at org.jbpm.workflow.core.impl.NodeImpl.getContext(NodeImpl.java:254)

        at org.jbpm.workflow.core.impl.NodeImpl.resolveContext(NodeImpl.java:258)

        at org.jbpm.workflow.instance.impl.NodeInstanceImpl.resolveContext(NodeInstanceImpl.java:370)

        at org.jbpm.workflow.instance.impl.NodeInstanceImpl.resolveContextInstance(NodeInstanceImpl.java:374)

        at org.jbpm.workflow.instance.impl.NodeInstanceImpl.getVariable(NodeInstanceImpl.java:419)

        at org.drools.core.spi.ProcessContext.getVariable(ProcessContext.java:62)

        at defaultPackage.Process_defaultPackage$u46$Directory_Process1505979598ReturnValueEvaluator2Invoker.evaluate(Process_defaultPackage$u46$Directory_Process1505979598ReturnValueEvaluator2Invoker.java:12)

        at org.jbpm.process.instance.impl.ReturnValueConstraintEvaluator.evaluate(ReturnValueConstraintEvaluator.java:129)

        at org.jbpm.workflow.instance.node.SplitInstance.executeStrategy(SplitInstance.java:86)

        at org.jbpm.workflow.instance.node.SplitInstance.internalTrigger(SplitInstance.java:63)

        at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:155)

        at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:337)

        at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:296)

        at org.jbpm.workflow.instance.impl.ExtendedNodeInstanceImpl.triggerCompleted(ExtendedNodeInstanceImpl.java:44)

        at org.jbpm.workflow.instance.node.StateBasedNodeInstance.triggerCompleted(StateBasedNodeInstance.java:286)

        at org.jbpm.workflow.instance.node.StateBasedNodeInstance.triggerCompleted(StateBasedNodeInstance.java:265)

        at org.jbpm.workflow.instance.node.WorkItemNodeInstance.triggerCompleted(WorkItemNodeInstance.java:275)

        at org.jbpm.workflow.instance.node.WorkItemNodeInstance.workItemCompleted(WorkItemNodeInstance.java:337)

        • 1. Re: jBPM process loop will automatically pop out in few minutes
          salaboy21

          Hi Catherine,

          Can you please elaborate on how you do the following: "gain files from a port ->"?

          That's the key part to understand why at some point jbpm stop creating processes instances for the files that you are trying to use as inputs.

           

          Regards

          • 2. Re: jBPM process loop will automatically pop out in few minutes
            catherinesjy

            Hi Mauricio,

             

            Thank you for your response.

             

            'Gain files from a port' can be called as 'import'. It is a work item handler in my process. The work item handler does the following steps:

            1. Open the port 104

            2. After the port is open, others can send DICOM files to port 104

            3. 'import' task will store the files coming in from the port 104 to a folder named 'active' and do some basic operations such as renaming at the same time.

             

            Those are all the 'Gain  files from a port' do.

             

            Please let me know if it is still not so clear!

            Looking forward to your further help. Thanks!

             

            Best,

            Catherine