Workflow transition - how to prevent object save()


I am using the workflow to review & approve object.

Scenario is:

  1. An object is already published.
  2. User (with no publish permission) saves new version for the changes and use workflow to submit for review.
  3. Admin (with publish permission) reviews and reject the change by using workflow to transit object back to user for further modifications. At this point, during the transition, the object is saved() and the new version (which is being rejected) is actually published.

This is happening because in WorkflowController method submitWorkflowTransitionAction(), when calling applyWithAdditionalData() method, the last parameter is set to “true”. And in method applyWithAdditionalData(), all the criteria is being met and hence saved (i.e. saveSubject is true, object is already published) but here the Admin doesn’t want to save it.

Can you please advise.