"activity.result" workflow condition is not following the desired path

Abhinandan Pati
Giga Guru

Hello Everyone,

I am trying to move a change request to a previous state by deleting/cancelling existing approvals of current state and setting previous state approvals to 'requested' state. To achieve this I have created UI Action called 'Revert to previous state' , on click of that button system will revert change request to previous state and it will set all previous state approvals to 'Requested' state.

In UI Action, I am fetching executing workflow activity and setting activity result to 'previous' and activity state to 'finished'. Here is the sample code snippet of UI Action

find_real_file.png

Created new workflow condition called 'Previous' . Please refer below snapshots for reference

find_real_file.png

find_real_file.png

And on click of 'Revert to previous state' system is finishing the 'Approval Group' activity and result of activity is getting set to 'previous' but system is not following the desired path. I mean it is not traversing from 'Previous' output to 'Rollback to' activity. Here is the result of that activity

find_real_file.png

I referred below article but could not find the solution.

Using Rollback To with multiple branches.

Please guide me here.

Thanks & Regards,

Abhinandan

ctomasi  

5 REPLIES 5

Thanks a lot Matthew & Chuck for your valuable suggestions. Will share these suggestions with our client.



Rolling back to previous state on rejection of approvals is already in place.But the requirement is,


  1. 'Change Manager' should be able to move the change request to previous state.
  2. 'Revert to previous state' UI Action should be visible only in one particular state
  3. In that particular state Change Manager is not in the list of approvers.

And client want to have the feature through which change manager should be able to move change request to previous state forcefully without rejecting any of the approvals in change request.



So I am not sure whether this can be achieved now.I will request them to alter their process since its not recommended to play with 'wf_executing' table records.



Thanks & Regards,


Abhinandan