[jboss-user] [jBPM] New message: "Deleting a task with an ended execution"
Per Christian Henden
do-not-reply at jboss.com
Thu Feb 18 12:18:33 EST 2010
User development,
A new message was posted in the thread "Deleting a task with an ended execution":
http://community.jboss.org/message/527073#527073
Author : Per Christian Henden
Profile : http://community.jboss.org/people/perchrh
Message:
--------------------------------------------------------------
Hi,
I have some tasks related to an ended execution and want to delete (or cancel) these tasks.
I'm not allowed to by taskService.deleteTask, it throws the exception shown below.
Would it be a problem if TaskDelete allowed you to delete tasks with an ended execution?
In org.jbpm.pvm.internal.history.events.TaskDelete
...
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");
}
..
}
Suggested change:
if (task.getExecution()!=null && !task.getExecution.isEnded()) {
throw new JbpmException("tasks related to an execution must be completed. they cannot just be deleted");
}
Background:
An execution in a fork reached an end activity while the other executions of that fork had some tasks related to them. All executions ended. Now I want to get rid of those tasks.
Other suggestions on how to overcome this issue is welcome
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/527073#527073
More information about the jboss-user
mailing list