10 Replies Latest reply on Mar 15, 2013 3:21 PM by Jboss fan99

    Local human task service doesn't participate in a JTA transaction

    Jboss fan99 Newbie

      Our product release is end of the month and we just found out this bug. Will really appreciate any help in resolving it.

       

      Using jBPM 5.2 with MySQL DB and JBoss 7.1.0

       

      I have a stateless session bean method that runs in a transaction

      public void doSomething()

      {

           // blah blah

           humanTaskService.start( taskId, userId);

          humanTaskService.complete( taskId, userId, contentData);

            //blah blah

            throw NullPointerException

      }

       

      Now the above task is complete and not rolled back. I have attached persistence.xml used for my project.

      Also the way I'm starting the local human task server is below:

       

                          TaskService humanTaskService = new TaskService(jbpmEmf,

                                              SystemEventListenerFactory.getSystemEventListener());

                          humanTaskServiceSession = humanTaskService.createSession();

                          humanTaskServiceSession.setTransactionType("local-JTA");

                          SyncWSHumanTaskHandler humanTaskHandler = new SyncWSHumanTaskHandler(

                                              new LocalTaskService(humanTaskServiceSession), ksession);

                          humanTaskHandler.setLocal(true);

                          humanTaskHandler.connect();

                          ksession.getWorkItemManager().registerWorkItemHandler("Human Task", humanTaskHandler);

       

      Please help.