-
1. Re: Latest process definition and @ResumeProcess
kukeltje.ronald.jbpm.org Jun 1, 2008 11:19 PM (in response to tascc)
I'm wondering why there is such limitiation here?No specific reason I think. Might just be that the implementation of @ResumeProcess also uses the latest version id in the query... in fact I just looked at the seam code (very easy for you to do as well)
From org.jboss.seam.bpm.BusinessProcess.java:
285 /** 286 * Associate the process instance with the given business key 287 * with the current conversation. 288 * 289 * @param processDefinition the jBPM process definition name 290 * @param key the jBPM process instance key 291 * @return true if the process was found and was not ended 292 */ 293 public boolean resumeProcess(String processDefinition, String key) 294 { 295 ProcessDefinition definition = ManagedJbpmContext.instance().getGraphSession().findLatestProcessDefinition(processDefinition); 296 ProcessInstance process = definition==null ? 297 null : ManagedJbpmContext.instance().getProcessInstanceForUpdate(definition, key); 298 if (process!=null) setProcessId( process.getId() ); 299 return afterResumeProcess(key, process); 300 }
you can clearly see the latests version is retrieved. File a jira issue and propose to change this. The current behaviour is indeed not logical
-
2. Re: Latest process definition and @ResumeProcess
kukeltje.ronald.jbpm.org Jun 2, 2008 12:10 AM (in response to tascc)The JbpmContext class that is used, only contains methods using a ProcessDefinition and a key. There also is no query defined in jBPM to retrieve process instances with just a businesskey. So besides that I filed a jira issue in Seam, I also filed one in
jBPM and related the two. -
3. Re: Latest process definition and @ResumeProcess
tascc Jun 20, 2008 11:02 AM (in response to tascc)Hello, thanks for the answer.
Looking at the source code was the first thing I had done before I posted it :), but I wasn't sure that there is no concrete reason to do it this way. I also think it should be changed and I'm glad that you have reported it.Regards,
Slawomir Wojtasiak