Is there a way to end a workflow without change the lifecycle state of an approved document ?
I want to execute an automatic diffusion workflow on an approved document. (the workflow uses start diffusion date and end diffusion date wrapped in document)
The workflow works : it create proxies, delete them, no problem…
Here is the problem : when the workflow is ending a task (create a proxy or delete a proxy by example), it updates the approved document…. which comes back to project lifecycle state… (because it has been updated)
How to maintain this approved lifecycle state ?
If I correctly annalyze what happens, update occurs when workflow is ending task and remove permissions for task actors : it executes then a “session.saveDocument()” (why by the way ? why not a session.setACP() ?). I'm not able to find a solution to avoid that… In my opinion, force an update of the state with an output chain doesn't seem really optimal especially as there is automatic versioning on updates…
Hi,
This is linked to the StandardVersioningService. By default when a document is in approved or obsolete state and it is modified, it is put back to the draft state.
If you want to change this behaviour you have two possible solutions:
- Create a bundle containing:
- A class that will extend the StandardVersioningService and change its logic
- A component to override the service declaration ; see http://explorer.nuxeo.com/nuxeo/site/distribution/Nuxeo%20Platform-6.0/viewExtensionPoint/org.nuxeo.ecm.core.versioning.VersioningService--versioningService
- Or you can use Nuxeo Studio to create your own lifecycle and bind your document types to it. By using custom states, you won't see this happen anymore.
I think I would have to move my business logic… maybe only workflow on the proxy to change rights based on the date… Proxies are immutable, I would have no changes on update when tasks will end…