Multiple Change tasks

diannemcintosh
Tera Contributor

I'd like to open multiple (1000+) change tasks for one parent Change Request. Each Change Task would reference a different Server CI. Any ideas on how to automate this?

8 REPLIES 8

Hi there.   I am not a scripter and we are still working in our trial instance and waiting on formal training, but we will have a need to 'spawn' an approval task for each person listed in a given field (possibly a task field, but could be on change request if needed).   In our current tool, we just put one approval task in the workflow diagram and set that task to forward to the field in question.   It automatically spawns the necessary number of tasks to send one to each person in the field.   Would a script like the one you started above be the way to do this in Service Now - or is there a 'no-code-needed' way?


Karen,


For the Approvals, you probably want to create a new field in the Change Request table, similar to the Watch List or Work Notes List, to store an array of Users.   The Type of field is LIST and the Reference type is User.   You could call it something like u_server_patch_approval or something more generic, I suppose.   This field could be exposed conditionally if the Change Type is Server Patch using a UI Policy.


Once you've got the field created, you can create a User Approval step in your Change Workflow (for that Change Type).   The User field will be that reference field in your Change, and you'll set the Wait For to "everyone to approve" if that's the functionality you're after.   This is probably the easiest "no code needed" solution.   See my screenshot below.   In this example, I used the work notes list.


Other solutions would probably involve scripted Business Rules.serverpatchapproval.PNG


That is perfect.   Exactly what we need.   It will be a list of 5-6 approvers so manageable (ie not 1000 for us )   Thanks so much for the quick reply!


Uncle Rob
Kilo Patron

You need to think of tasks as a unit of work.   In this Change is a human being performing a distinct alteration on each of those 1000+ servers?   Or are we perhaps talking about a change that effects those Servers?   Or perhaps are we talking a bout an automated algorithm that's making the same change to 1000+ servers?



In both the latter cases, individual Change Tasks are the wrong way to go.     If the 1000+ machines are just "in harm's way", they should merely be affected CI's.   If its a single algorithm making the change, there should be one task to launch the algorithm, and again the servers should all be affected CI's.