[jboss-user] [JBoss jBPM] - Not getting TaskEndLog when canceling the TaskInstance

vikas_khengare22 do-not-reply at jboss.com
Tue Jan 27 01:36:32 EST 2009


Hi Friends,
I am not getting TaskEndLog when I am canceling the TaskInstance bye TaskInstance.cancel() method.

Here is what I am doing,

TaskMgmtInstance tmi = i_token.getProcessInstance().getTaskMgmtInstance();
  | Collection<TaskInstance> unfinishedTasks = tmi.getUnfinishedTasks(i_token);
  |    for (TaskInstance task : unfinishedTasks) {
  |          task.cancel();
  |    }

& to get log
LoggingSession logSession = context.getLoggingSession();
  | Collection<ProcessLog> logs = logSession.findLogsByToken(process.getRootToken().getId());
  | for (ProcessLog processLog : logs) {
  |    if (processLog.getClass().equals( org.jbpm.taskmgmt.log.TaskEndLog.class)) {
  |        System.out.println("Task is ENDED"); 
  |    }
  | }

If I have 5 steps in process and I have canceled the task on 4th step, then I am getting TaskEndLog for first 3 steps but NOT for 4th step in which I have canceled the task.

On 4th step only TaskCreateLog event is firing but not TaskEndLog and as per documentation it should end the task. (that means it should fire TaskEndLog in jbpm_log table).

Thanks

regards
Vikas

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4204876#4204876

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4204876



More information about the jboss-user mailing list