[jboss-user] [jBPM Users] - Re: Programmatic task execution reopens the task
do-not-reply at jboss.com
Mon Nov 9 15:55:23 EST 2009
You can try the code below and check if it works.
| ProcessInstance subProcessInstance = ctx.getJbpmContext() .getProcessInstanceForUpdate(subprocessInstanceId);
| //get the task management instance of the process instance
| TaskMgmtInstance taskManagementInstance = subProcessInstance.getTaskMgmtInstance();
| //find the unfinished tasks
| Collection<TaskInstance> taskInstances = taskManagementInstance.getUnfinishedTasks(subProcessInstance.getRootToken());
| //get the task instance of your interest
| TaskInstance taskInstance = /*Some how find out the TaskInstance that we should be executing from taskInstances collection */;
| //finish the TaskInstance
If you can provide the Jpdl snippet that creates problem, and few more lines of your code then that will be helpful to debug the problem with you code.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4264684#4264684
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4264684
More information about the jboss-user