[jboss-user] [JBoss jBPM] - Re: Multiinstances of the same process
antitrust1982
do-not-reply at jboss.com
Tue Sep 19 10:49:53 EDT 2006
I resolve the porblem with graphSession.saveProcessInstance(pi); by remplacing by jbpmContext.save(pi);.
but the processinstance don't appear on my console as I haven't any processinstance. SO I have try to use is empty methode and I have this answer: is "true". but I have create a process instance just before... what I missed?
this is my code:
| GraphSession graphSession = jbpmSession.getGraphSession();
| TaskMgmtSession taskMgmtSession = jbpmSession.getTaskMgmtSession();
| jbpmSession.beginTransaction();
|
|
| System.out.println("creation d'une instance de process");
| pi = new ProcessInstance(pd);
| System.out.println("enregistrement du processinstance");
| jbpmContext.save(pi);
| System.out.println("PROCESS INSTANCE ID:"+ pi.getId());
| jbpmContext.loadProcessInstanceForUpdate(pi.getId());
|
| jbpmContext.save(pi);
| //UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUu
| Collection processinstances=graphSession.findProcessInstances(pd.getId());
| System.out.println("empty:" +processinstances.isEmpty());
| Iterator itpro = processinstances.iterator();
| while(itpro.hasNext()){
| ProcessInstance processinstance =(ProcessInstance) itpro.next();
|
| System.out.println("les elements de la collection de process sont : "+processinstance.getId());
| }
|
| //uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu
|
If you see what I missed or have a solution to my probelm thank you to help me please
antitrust1982
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3972608#3972608
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3972608
More information about the jboss-user
mailing list