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

So with my trying to accomplish a particular Normal Change request workflow based on condition, will i be able to tie a particular script include based on that condition?

The include just steers what state is allowed to come next, your workflow should handle what state gets set next based on conditions. Just bear in mind that if you don't make state read-only, users could potentially bypass those states without meeting your conditions. Otherwise, yes you will be repeating your logic in the state handler script include (to allow the state transition) and in your workflow (to actually set the state).

From an ITSM standpoint, though, it does not really sound like a Normal change if you are skipping approval based on assignment groups. sounds like you need some Standard Change templates for that, but it's up to you.

Thanks for the direction nyancer3

We have one team that wants a simplified change process, with one approval and bypassing some states. I did consider Standard Change, so maybe i'll play around with that and see if that would work for them. I also considered doing a new Type, which sounds like considerable extra work.

 

 

Sounds sensible. I always prefer to avoid complexity through process. One way to solve for the "one approval" for the standard change is to restrict access to the standard change template to the folks who are authorized to approve it in the first place. If they are the ones requesting it, you can assume it's approved.

Good luck 🙂

Hi @nyancer3 , We have also the same requirement of removing schedule stage and move the change from authorize to implement.

The code given by you works fine. But we got a problem with already existing tickets. The workflow in the old change tickets was freezed at "wait for condition to move the state to scheduled".

Could you please help me how to fix this and bypass it?

@Steve M. did you get the same issue? If yes, can you provide the resolution how you fixed this?

Thanks in Advance.

Thanks & Regards | Chiranjeevi Chaitanya Naram
Kindly mark the answer Correct and Helpful if it helps to resolve your issue.