We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

How to restart the legacy workflow after reverting a Normal Change from Assess to New?

snehalkausa
Tera Contributor

Hi All,

I'm working on a requirement where Normal Change Requests need to be automatically reverted from Assess to New if they miss the CAB submission deadline.

To achieve this, I created a scheduled job that runs every Saturday. It identifies eligible Normal Changes in the Assess state, updates the state back to New, adds a work note, sets a custom flag, and sends a notification to the Change Owner to update the dates and resubmit the Change.

The state update is simply:
chgGR.state = -5; // New
chgGR.setValue('u_reverted_to_new_by_system', 'true');
chgGR.work_notes = 'This change is Auto-reverted from Assess to NEW State';
chgGR.update();

Issue-

1.The first time a Normal Change is submitted, clicking Request Approval works as expected:

The Change moves to Assess.

The legacy Change Request - Normal workflow starts.

Approvers are generated successfully.

2.However, after the scheduled job reverts the Change back to New:

The user updates the planned dates.

Clicks Request Approval again.

The Change moves back to Assess, but no approvers are generated.

From my analysis, only the state is being updated by the scheduled job. The existing workflow context is not restarted or reset, so the approval generation step is not executed again.


What I tried

-I manually cancelled the existing workflow context and clicked Request Approval again.

-The Change moved to Assess, but no new workflow context was created and no approvers were generated.

-If I change the Change Type to Emergency, the Emergency Change workflow starts normally and approvals are generated.

Is there a supported way to restart or reinitialize the legacy "Change Request - Normal" workflow for an existing Change Request after it has been reverted from Assess to New?

Thanks in advance!

1 REPLY 1

Tanushree Maiti
Tera Patron

Hi @snehalkausa 

 

Refer: Reset a workflow Change Request - Normal in dev instance 

https://servicenowguru.com/business-rules-scripting/reset-change-request-workflow-approvals-tasks/

 

 

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