JBoss Community

Re: only the first human task is being saved in db!

created by Odelya Holiday in jBPM - View the full discussion

After finishing the first task I expect with BlockingTaskOperationResponseHandler I expect the second one to be invoked and save in the DB I query for the user's tasks here:

(I created my own Human task handler which is exactly like CommandBasedWSHumanTaskHandler  except fo the fact that I need to send web service about the new human task to an external system. I need to send the new task id to the tem that will send to me web service once the task was completed with task id.

 

public void executeWorkItem(WorkItem workItem, WorkItemManager manager) {

connect();

  .... (here it's the same code as CommandBasedWSHumanTaskHandler  )

....

client.addTask(task, content, null);

//starting my code. I need the new task id from the db.

             BlockingGetTaskResponseHandler handler = new BlockingGetTaskResponseHandler();

                    client.getTaskByWorkItemId(workItem.getId(), handler);

  Task task2 = handler.getTask();

//needs to send web service

WebServicesUtil.startSendNotification(taskId);

..

}

 

Since it's a general behaviour for every human task - I had to define it in handler, and now I am stuck with the second human task id :(

Reply to this message by going to Community

Start a new discussion in jBPM at Community