At the moment i'm trying to make a review workflow that on rejection will rollback (revert) the package to its previous version. This will be triggered by a rule on update.
I know how to revert to a specified version with
.revert(history, major , version); aka node.revert("Workflow Rejection Rollback", false, 1.1);
But I don't how I can get the previous version number so I can replace the 1.1 above with a var containing the previous version.
Is this possible with javascript inside the wf definition?