Is there a way to update an existing document to have a newly created lifecycle?
We have a custom doctype that was using the Nuxeo “default” lifecycle. We found that we didn't like the states of “project,” “approved,” and “obsolete,” so we created a new custom lifecycle called “simple” with the states of “active” and “inactive.” After reading documentation, we find that only newly created documents will have the “simple” lifecycle, with existing documents retaining “default.”
How can we update all the existing documents that have the old lifecycle, to now use the new one? I've seen references to using “Document.FollowLifecycleTransition”, but that doesn't seem to work since it would still only follow the transitions of default. Ideally we would like to use an API call (bulk automation), but I have not yet found anything I could make work.
It seems like my only options are CoreSession.reinitLifeCycleState
and Document.FollowLifecycleTransition
, but I hope I'm just overlooking something. it would be nice if reinitLifeCycleState
would reset the lifecycle to the new one, but I don't think that is how it works.
These are the related questions I've found, but none seem to be asking for the same thing as we need: https://answers.nuxeo.com/general/q/1c370e212dea46fba65903e63f237c16/CMIS-change-nuxeo-lifecycleState https://answers.nuxeo.com/general/q/36056e9d30ea481c9c154056627caa29/Can-i-change-Life-Cycle-State-through-REST-API https://answers.nuxeo.com/general/q/2cbffb4ccc9f4eb9810bd9f37cdd4682/Not-able-to-change-state-of-document-to-previous-state https://answers.nuxeo.com/general/q/86199415a6274b2b911a284c5fe44974/Can-I-set-the-Current-Life-Cycle-State-to-approved-using-studio
Hello. I don't think this is something we support OOTB. The only possible think I guess is to use the same transition name.