On versioning, I want to check document's lifecycle state and change it, if it is in approved state. How can I achieve this?

1 votes

1 answers

2883 views

ANSWER



You have to getCurrentLifecycle operation check the current state and then call the operation followLifecycleTransition(). It is better to follow a transition rather then modify it currentLifecycleState. Nuxeo operation do not allow modifying currentLifecycle. As far as i know if the document is in Approved State you can follow only delete transition which delete document. Otherwise you have to define your onwn lifecyle scheme. In the attached image you can discove the transitions and states.

FILES:   transition.png
0 votes