6 Replies Latest reply on Aug 12, 2010 11:49 PM by Donald Walters

    JBPM Hangs

    Donald Walters Newbie

      I have an application that integrated Spring Framework and JBPM. I was using version 4.3 before upgrading to version 4.4. Since upgrading to 4.4 the application seems to hang at the same position all the time.

       

      @AutoWired

      private ProcessEngine processEngine;

       

      ....

       

      ExecutionService executionService = processEngine.getExecutionService();

       

      ProcessInstance processInstance = executionService.startProcessInstanceByKey(workflowName, variables); <-----Hangs here with no output in log4j and no exception is thrown

       

       

      It is very difficult to troubleshoot as There is no indication of what is actually taking place. is there an issue with this method in this version? How can I go about fixing this?

       

      Thanks

        • 1. Re: JBPM Hangs
          HuiSheng Xu Master

          Hi Donald,

           

          I am afraid that we need more information to investigate.  This method is used to start a process instance by process definition key.  As we know,  all of testcase in jBPM-4.4 could passed.

          • 2. Re: JBPM Hangs
            Donald Walters Newbie

            I have attached the XML file that I am loading.

             

            Below snippet shows how I am loading the file to the repository. This is being done from a web application and is being deployed properly. I checked the database and I can see the files there.

             

            Note: I have a method to generate a unique key for the key attribute of the process XML before serializing it to a file.

             

            RepositoryService ser = processEngine.getRepositoryService();
                            String deploymentId = ser.createDeployment().
                                    addResourceFromInputStream(pName, new FileInputStream(jpdlFile)).
                                    addResourceFromFile(image).deploy();

             

            After this the process is loaded from a standalone application for execution. The "workflow" variable is the unique that was generated previously as the process key. The custom nodes it in the XML simply outputs messages to the screen.

             

            processInstance = executionService.startProcessInstanceByKey(workflowName, variables);

             

            I am trying to step through it with netbeans also but once it reaches here nothing happens. Every time I run the application it reaches here and nothing happens.

             

            Please let me know if I need to post more details and what exactly I need to post.

            • 3. Re: JBPM Hangs
              Michael Wohlfart Expert

              Enable debug logging might help to figure out what is happening?

              And are you saying in the Netbeans Debugger you can't do a "step into method" when the debugger reaches the executionService.startProcessInstanceByKey() method?

              • 4. Re: JBPM Hangs
                Donald Walters Newbie

                This is exactly what I am saying. Debugging is on for all loggers and the root. In Netbeans I cannot step into that method. It just stops there.

                • 5. Re: JBPM Hangs
                  Michael Wohlfart Expert

                  So is there anything interesting in the debug logs?

                  Can you step into other jBPM4 API methods with the NetBeans debugger or is it just this one?

                  • 6. Re: JBPM Hangs
                    Donald Walters Newbie

                    I was able to step into the methods and i found that transactionManagerName is null in the SpringTransactionInterceptor. then it fails at

                    return EnvironmentImpl.getFromCurrent(PlatformTransactionManager.class);