The CreatorCon Call for Content is officially open! Get started here.

How do I skip "Scheduled" in a change management workflow?

ServiceNowSteve
Giga Guru

Hello all,

I am building out our Change Management piece of ServiceNow and one of the requirements was to skip the "Scheduled" phase and go straight into Implement after approval. If I change the workflow to set the state to implement instead of Scheduled it just doesn't do it and in fact it will freeze up the whole process because it's expecting to first goto Scheduled before it proceeds. We are OOB for the most part, any idea how I can accomplish this?

1 ACCEPTED SOLUTION

nyancer3
Tera Expert

Change request flows are now built on a set of script includes. The script includes come in pairs; one includes "SNC" in the name and is read-only. The other has the same name, but without "SNC" and is available for you to customize. That is the best-practice method for customizing change management for instances running the Change Management - State Model plugin.

Take a look at the script include "ChangeRequestStateModel_normal" to see the structure of the state models used by the Change Management application to control state flow. There are also script includes for Standard and Emergency changes.

You can see that there is a property in the script include for each state value. This property is an object with several of its own properties. The one you need for your question is the "next_state" array. Find the "authorize" property and change the next_state array from "scheduled" to "implement" in order to make that the next state. You will also want to update the workflow activity that sets the state to Scheduled and make it Implement (looks like you already did that).

However, I would caution that this will also populate the actual start date on the change request immediately after approval. You need to be sure this is what you want to do.

Hope that helps.

View solution in original post

26 REPLIES 26

@Chaitanya naram In my experience once a workflow is triggered there's no switching it. I've always had to re-create the item be it a change, request, etc..  or just manually fulfill older items that don't use the new workflow.

 

Sorry, I'm sure that's not the answer you were looking for. If somebody knows how to not do that I'd be interested as well.

@Chaitanya naram as @Steve M. said, the running workflow is now waiting for something that cannot happen. If scheduled is still a valid state and you are able to change the state to that value via script for those records with running flows, then that is probably what you need to do.

FYI, the state transitions are much improved if you move to the new Change Models functionality, You can set manual or auto state transitions that the Flow Designer flows can evaluate, so it is much simpler to accomplish skipping states if that is the requirement.