[jboss-user] [JBoss jBPM] - removeTaskInstance doesn't work!

MindTheGap2 do-not-reply at jboss.com
Wed Jan 17 12:00:08 EST 2007


Hi,

I need in my code to remove some TaskInstances.
I have:


  | static JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance();
  | 
  | public void removeTI(TaskInstance SomeTaskInstance) {
  | 		JbpmContext jc = jbpmConfiguration.createJbpmContext();
  | 		TaskMgmtSession tms = jc.getTaskMgmtSession();
  | 		try {
  | 			GraphSession gs = jc.getGraphSession();
  | 			ProcessDefinition pd = gs.findLatestProcessDefinition("PROCESS");
  | 			ProcessInstance pi = new ProcessInstance(pd);	
  | pi.getTaskMgmtInstance().removeTaskInstance(SomeTaskInstance);	
  | 	
  | 			jc.save(pi);
  | 		} finally {
  | 			
  | 			jc.close();
  | 		}
  | 	}
  | 

it doesn't throw any error but my jBPM database remains exactly the same.
What im i forgot?

Thanks in advance

RQ_

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

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



More information about the jboss-user mailing list