[jbpm-dev] [jBPM Development] - Re: Issue #JBPM-2537

sebastian.s do-not-reply at jboss.com
Sat Oct 31 20:41:00 EDT 2009


The source code posted is faulty. I did not set activityIsTask to true. However I have 2 problems:

I don't manage to retrieve the task. I can get the execution but getTask() returns null. Furthermore the constructor of TaskDelete which is fired when delete() is called on a task-object checks if the task is related to an execution and prevents deletion in such case.


  |   public TaskDelete(TaskImpl task, String reason) {
  |     if (task.getExecution()!=null) {
  |       throw new JbpmException("tasks related to an execution must be completed. they cannot just be deleted");
  |     }
  |       
  |     this.task = task;
  |     this.reason = reason;
  |   }
  | 

The task I intend to delete is related to an execution. So what about checking if it belongs to an active execution but allow deletion of it in case the execution has ended which should be the case when the timer has fired, right?

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

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


More information about the jbpm-dev mailing list