Workflow rollback cancelling workflow

Sam Ogden
Tera Guru

Hi All,

We are in the process of implementing the standard change functionality into our Servicenow instance.

I have created a workflow for the template process:

find_real_file.png

We have a rollback function in place so if the approvals reject it should rollback to the new state.  The rollback seems to work until it hits the 'Wait for condition: Wait for In Progress State'. When it hits this section the workflow is cancelling and I cannot understand why.  I've checked the properties and the 'Max activity count' is set to '200' so the workflow is getting nowhere near this amount.

Any suggestions?

Thanks

Sam

1 ACCEPTED SOLUTION

Ah, that makes it clear. In the case of Std change, if Rejected, I'd rollback to new as well, versus Rejecting and cancelling.

View solution in original post

5 REPLIES 5

Michael Fry1
Kilo Patron

Standard change? with an approval workflow? A Std change is low risk, pre-approved change. Once the template is approved by CAB, when someone submits a Std change it should move right to the Scheduled state. https://docs.servicenow.com/bundle/kingston-it-service-management/page/product/change-management/con...

 

Hi Michael,

Apologies it might not have been clear.  This workflow is for the template proposal.

I've seen OOTB that if the approval was rejected it would just cancel the whole proposal, but our Change manager requires that it returns back to the 'New' state as most of the rejections will be due to things missing from the proposal i.e. the user needs to add more detail in a specific field, rather than purely rejecting that the proposal should not become a template.

I think I have found what is causing my issue.  We have a business rule on the 'Task' table which cancels workflow if it hits a certain state value of '4'.  For the std_change_proposal table this is the 'cancelled' state.  

In my workflow I was setting the approval to 'rejected' before the rollback.  It was meant to change it back to approval = 'requested' after the wait condition it was failing at.  I've just removed this approval = 'rejected' step and this seems to have fixed the issue.  It appear that some script was changing the state to '4' - cancelled when the approval = rejected (not found this script yet).

On rolling back approvals what is best practice.  Should you mark it rejected as I had and then change it back to 'requested' at the relevant point in the workflow?  If I just leave it as  approval = requested when a user rejects and it hits the rollback will I encounter any other issues?

Thanks

Sam

 

Thanks

Sam

Ah, that makes it clear. In the case of Std change, if Rejected, I'd rollback to new as well, versus Rejecting and cancelling.

Thanks.  removed the approval = rejection segment of my workflow and now working as I'd expect.

Thanks