This content has been marked as final.
Show 3 replies
-
1. Re: Version for Process definition always -1
koen.aers Feb 14, 2006 4:45 AM (in response to feroshjacob)Hi Ferosh,
Did you actually deploy, or simply save the processdefinition?
Regards,
Koen -
2. Re: Version for Process definition always -1
feroshjacob Feb 14, 2006 4:59 AM (in response to feroshjacob)
Yes koen , I deployed and checked the value of version from database
Is this implemented ? .I have checked the source code.I coudnt make out How the logic is implemented
thanks
ferosh -
3. Re: Version for Process definition always -1
koen.aers Feb 14, 2006 5:14 AM (in response to feroshjacob)Ferosh,
Locate the GraphSession class in your distribution. There you will find the implementation for deployment of processdefinitions :public void deployProcessDefinition(ProcessDefinition processDefinition) { String processDefinitionName = processDefinition.getName(); // if the process definition has a name (process versioning only applies to named process definitions) if (processDefinitionName!=null) { // find the current latest process definition ProcessDefinition previousLatestVersion = findLatestProcessDefinition(processDefinitionName); // if there is a current latest process definition if (previousLatestVersion!=null) { // take the next version number processDefinition.setVersion( previousLatestVersion.getVersion()+1 ); } else { // start from 1 processDefinition.setVersion(1); } session.save(processDefinition); } else { throw new JbpmException("process definition does not have a name"); } }
Regards,
Koen