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

It worked! I changed the workflow to also skip Move to Scheduled along with your script change and it works!!!

 

I can't thank you enough! If you're ever in the Tampa/Clearwater area lunch is on me!

Nice! Glad to hear you got it working 🙂

I did set it

 

authorize: {
nextState: [ "implement" ],

 

//Original 
//nextState: [ "scheduled" ],

 

but it still went to scheduled. I am ok with the actual start date part.

Is this in official documentation somewhere? Seems to be in the wrong direction of the 'no code' direction ServiceNow was headed (or so I thought)

 I've been trying to setup alternate Change workflows based on condition (such as when it is for a certain assignment group) and they wanted to skip over some states. It looked like all was well but then got stuck wanting an approval even though the approval was set, so i guess i need to look into these script includes to make things progress vs just setting values through a workflow activity.

thanks for the insight, i hope this kind of stuff gets added to official docs.

Hi Les,

I do not see a ton in the documentation, except for some mention in the Installed with Change Management - State Model plugin documentation. I can say that I have seen the "SNC" and "Override" script include model used in other places as well, for targeted overrides to existing functionality so it is not unique to Change.

Hope that helps.

Thanks,
Nick