Just to cross verify. Did you checkout the node before creating the new version because until you checkout the node it will not create the new version instead it will return you same version again.
You can also try using versionmanager API to create version of node http://www.day.com/maven/jsr170/javadocs/jcr-2.0/javax/jcr/version/VersionManager.html#che ckin(java.lang.String)
I hope this helps you. For more information let me know.
i used the "Create Version" Workflow Process defined in CQ5 by Adobe - it is not my own process...
the process is very simply:
I create a new page and run a workflow process:
start --> create version --> end.
how can i checkout the node in this situation?
i check the page properties after first Workflow with Create Version.
jcr:isCheckedOut properties is set to true before I run the Workflow once again, then I get this exception and the Workflow Process goes to the STALE status...
I think it my bad i miss understood "Create Version process in Workflow" as functionality you are trying to implementing (custom) instead "CreateVesionProcess" which default implementation to create version of resources.
Yeah, in that case you need not require to checkout the resource as it automatically take care by the process call itself but i hope you are doing one of the below.
If you have extended "CreateVersionProcess" in your custom workflow class. then in "execute" method you have done.
super.execute(item,wfsession,args); //at very first line in your custom method so that default versioning process will take place.
And if you have implements any other workflow process interface then you have called below in your execute method.
It is a bug CQ5-15774 already been logged. File daycare ticket with business case & impact.