0 Replies Latest reply on Aug 21, 2012 9:06 AM by Navin Maheshwari

    jBPM: issue with getting TaskSummary from BlockingTaskSummaryResponseHandler

    Navin Maheshwari Newbie

      Hello All,

       

      we are getting random behavior for getting jbpm task from BlockingTaskSummaryResponseHandler object. we are using jbpm-human-task-5.2.0.Final.jar from JBPM 5.2 with jboss 7.0.2.

       

      below is my codeblow which behaviour is not expected, i am not able to get tasksummary everytime, sometimes its return task but sometime due to multiple call,  transaction is not returning value,

       

           BlockingTaskSummaryResponseHandler taskSummaryHandler = new BlockingTaskSummaryResponseHandler();

           taskClient.getTasksAssignedAsPotentialOwner(role.get(0),"en-UK", taskSummaryHandler);

          

           for(TaskSummary task : taskSummaryHandler.getResults())

           {

                      if(task.getProcessInstanceId() == processInstanceId && task.getName().equalsIgnoreCase(activity) && task.getStatus().toString().equalsIgnoreCase(toStatus))                 

                          this.task = task;

                      if(null != this.task)

                          break;

           }

       

      anyone has any suggestionm please help? we have doubt whether jbpm transaction management is not working properly. Do we need to do any change? please suggest.