1 Reply Latest reply on Apr 4, 2013 6:19 AM by mesa

    Jbpm 5.4 spring configuration : Human Task is not created

      hi all ,

       

      i am trying to use jbpm 5.4 with spring. i have created a simple business process definition with one HumanTask and rule Task.

       

      Running UnitTest case (by extending JbpmJUnitTestCase) Process flow works fine and process completes successfully  BUT when i use spring configuration to deploy and run Business Process then  HumanTask is never created  in database , hence querying it using LocalTaskService results in Nothing.

       

      i am using single persistence unit (process+task) and running a localTaskService to assign/complete workitem.

       

      can somone please take a look and help.

       

      There are two zip files :

       

      1) (test-success) that contains persistence.xml used by test case , respective passing junit test case and console logs.

       

      2) (process-spring) that contains spring config file , jbpm utility class (used to create session and taskservice), failing test case(uses this spring config) and console logs.

       

      from two logs i can clearly see that in Testcase (uses spring config) process goes fine and inserts entry in workitemInfo table but the does not create an Entry in Task table.

       

      i checked everything but unable to find a clue.

       

      thanks

       

      Mayank

        • 1. Re: Jbpm 5.4 spring configuration : Human Task is not created

          this issue is identical to : https://community.jboss.org/thread/195386?start=0&tstart=0

           

          looks like issue is caused by : TaskSessionSpringFactoryImpl.java , initialization of TaskPersistenceManager is determined by:

           

          private TaskPersistenceManager createTaskPersistenceManager() {
              TaskPersistenceManager tpm;
              TaskSpringTransactionManager ttxm = new TaskSpringTransactionManager(springTransactionManager, useJTA);
              if (useEMF) {
                  tpm = new TaskPersistenceManager(emf.createEntityManager(), ttxm);  -------------------- this is initialized is it correct ????????
              } else {
                  tpm = new TaskPersistenceManager(springEM, ttxm);
                  tpm.setUseSharedEntityManager(true); ---------------------------------- shouldnt this be initialized ???? if yes then how to configure springEM  
              }
              return tpm;
          }