Chg flow is working as per the flows but in prod it is not working re trigger for approval and dupl

bshivakumar
Tera Contributor

I changed the condition status in the flow and tested it. after changing that the approvals are not getting triggered as per the conditions set.
In the Dev environment, I recreated the scenario by creating a new change with the same services, assignment group, and assigned user. As per the story:

Story point: After approval in the Assess state, the ticket should move to the Authorize state and wait for CAB approval. But instead, it was staying in the Assess state and triggering approval again.
However, in my testing, the flow is working correctly:
• New → Assess → Authorize
• Approvals are triggering properly
• No re-triggering issue
• No duplicate approvers
I also checked in the Test environment and found the same behavior. But I did not change any flows there.

3 REPLIES 3

Dr Atul G- LNG
Tera Patron

Hi @bshivakumar 

It looks like there is a flow that is triggering this step. Please check the out-of-the-box (OOB) flow or the approval policy where it might have been overridden or modified.

*************************************************************************************************************
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/dratulgrover [ Connect for 1-1 Session]

****************************************************************************************************************

Karankants
Tera Contributor

Hi,

Please follow the below steps to solve/validate this issue in Prod:

Go to Flow Designer > Executions and search with the affected Change number.

 

Open the execution and check which flow is triggering the approval again.

 

Check if more than one automation is running for the same Change approval, such as Custom Change flow, OOB Change approval flow, Change Approval Policy, Legacy Workflow, or Business Rule.

 

If any extra flow/policy/business rule is triggering duplicate approval, disable it or correct the condition.

 

Update the flow trigger condition to avoid re-triggering. Use “State changes to Assess” instead of “State is Assess”.

 

After Assess approval is approved, the flow should update the Change state to Authorize.

 

Expected logic should be: If Assess approval is Approved, then update Change State to Authorize.

 

CAB approval should trigger only when the Change reaches Authorize state.

 

CAB approval condition should be: State changes to Authorize and CAB approval required is true.

Add a duplicate approval check before creating a new approval. Check the sysapproval_approver table with conditions: Change is current Change, State is Requested, and Approver is same approver.

 

If approval already exists, skip creating a new approval.

Also check and cancel any old/stuck flow contexts or duplicate approval records for the affected Change ticket.

 

Finally, retest with a new Change ticket in Prod using the same service, assignment group, and assigned user.

 

Expected result: New > Assess > Assess Approval > Approved > Authorize > CAB Approval.

Tanushree Maiti
Tera Patron

Hi @bshivakumar 

.

A. Check KB (Compare and Validate 2 instances) : KB2803489 Change model state transition blocked after workflow approval 

Resolution

To complete these steps, you must have the change_admin or admin role. 

  1. Go to All > Change > Administration > Change Models. Open the custom change model and locate the Assess state in the Model States related list.
  2. Select New to create a state transition from Assess to Scheduled.
  3. In the To field, enter Scheduled, select the Automatic transition check box, and select Submit
  4. Review any other expected workflow-driven transitions (for example, Scheduled to Implement) and confirm they are defined in the change model. To add any missing transitions, repeat steps 1-3.
  5. Save the changes to the custom change model.
  6. Test with a new change request to verify the state transition completes successfully.

B. Check Flow Designer or Workflows

c. Use the Apply Change Approval Policy flow action 

d. Same situation we faced once where 2 BR was conflicting, once we corrected , it works fine.

 

 

 

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti