Create and Update Change Request (ServiceNow) - Workflow
  • 18 Oct 2024
  • Dark
    Light
  • PDF

Create and Update Change Request (ServiceNow) - Workflow

  • Dark
    Light
  • PDF

Article summary

Workflow TItle

Let’s move into the Change Request Create and Update use case. We will begin by reviewing the Itential Pre-Builts that we are using for today’s Workshop.

  • Create Change Request - ServiceNow
  • Update Change Request - ServiceNow

These Itential Pre-Builts are an excellent example of modular automations. They can be incorporated as steps in a larger automation very easily. We will incorporate these modular automations through the use of child jobs. A child job is a workflow nested within another workflow, allowing for the same workflows to be referenced in multiple automations. Rather than recreating the same workflow multiple times, we are reusing the same asset so that only one workflow needs to be maintained going forward.

Create a Workflow Video - Part 1


Step 1

From the Itential Automation Platform dashboard, click Automation Studio in the left navigation panel.

Step 2

Expand the Workflows section.

Step 3

Expand the Workflow Group for Create and Update Change Request - ServiceNow. Then click into the Create Change Request - ServiceNow Workflow.

Step 4

The Create Change Request - ServiceNow Pre-Built workflow utilizes the Itential ServiceNow Adapter. There is one main task, Create Change Request. This task reaches out to ServiceNow and creates a new Change Request.

The Update Change Request - ServiceNow Pre-Built workflow looks very similar to the previous Pre-Built. It is comprised of two primary tasks: Get Change Request and Update Change Request. In our exercise today, we will retrieve the Change Request that was created in the first Pre-Built and then update it. 

Now that we’ve gone over the Itential Pre-Built we’ll continue with our workshop exercise building a workflow that uses the JSON Form and Transformation (JST) you built earlier. 

Step 5

From the Automation Studio dashboard, click the + at the top of the left navigation panel.

Step 6

Select Workflow from the dropdown list. Name it Lab - Create and Update Change Request - ServiceNow - XX and click CREATE. (XX represents your initials)

Step 7

A fresh workflow canvas opens. For this workflow you will first add all of the tasks to the canvas, then connect them with transitions. Finally you will configure each task. 

First, add a Transformation task by entering Transformation  into the Search box at the top right. The JSON Transformation task appears. Hover the mouse over the task. 

A + will appear to the left of the task. Click the + to add the task to the canvas.

Step 8

Add a second Transformation task to the canvas. You can click the next to the JSON Transformation task or click the first JSON Transformation task and then the Clone icon in the upper right. 

Step 9

Click and drag one of the JSON Transformation tasks next to the Start task.

Step 10

Next,  you will need to add two Child Job tasks to the canvas. Enter Child job in the into the Search box at the top right. The Childjob task appears. Hover the mouse over the task. 

A + will appear to the left of the task. Click the + twice to add the tasks to the canvas.

Step 11

Click one of the Childjob Tasks and drag it on the canvas between the two JSON Transformation tasks. Drag the second Childjob task on the canvas to the right of the second JSON Transformation task.

Step 12

The last task  you will need to add to the canvas is a View Data  task. Enter viewdata in the into the Search box at the top right. The Viewdata task appears. Hover the mouse over the task. A + will appear to the left of the task. Click the + to add the task to the canvas.

Step 13

Click the Viewdata task and drag it on the canvas between the second JSON Transformation task and the last Childjob task.

Step 14

The next step is to add transitions which will connect the tasks together to form the workflow. This is done by clicking the crossed arrows button at the top of the canvas, then click and drag from the center of the START task to the center of the first JSON Transformation task.

Step 15

Add additional transitions between each task. 


Create a Workflow Video - Part 2


Step 16

The next step is to begin configuring the workflow tasks. 

Double click the first JSON Transformation task.

Step 17

Type Lab - Create and Update in the Transformation name field. Select the Lab - Create and Update Change Request - ServiceNow JST - XX (XX represents your initials).

The purpose of the Transformation is to extract the individual values submitted in the form. 

By changing the Location for formData under Incoming Schema from static to job, we are configuring the Transformation task to source the data from the form inputs submitted to the workflow, rather than static inputs. 

Change Location for formData under Incoming Schema from static to Job. Ensure formData is selected in the Value field.

Click Save.

Step 18

Next, double click the first Childjob task.

Step 19

Update the Summary to Create Change Request. Update the Description to Create Change Request using Itential Pre-built Description. 

Type Create Change Request in the Workflow search box. Select the Create Change Request - ServiceNow. Note, this is first Pre-built workflow we looked at earlier. 

Set the following values for the Job Variables, then click SAVE:

NameLocationValue
configurationItemLab - Create and Update Change Request - ServiceNow JST
configurationItem
titleLab - Create and Update Change Request - ServiceNow JST

title
descriptionLab - Create and Update Change Request - ServiceNow JST

description
staticLab - Create and Update Change Request - ServiceNow JST

static
commentsstaticChange Request Created by Itential Automation Platform

Step 20

Double click the second JSON Transformation task to configure it.

Step 21

Type Process CR Create in the Transformation name field. Select the Process CR Create Response JST.

 Ensure the Summary is changed to Process CR Create Process. Under Incoming Schema, change the Location to Create Change Request. Change the Value to job_details. 

Click SAVE.

Step 22

Double click the ViewData task to configure it.

Step 23

Update the Summary and Description to Pause for Change Completion. Update the following variables under Incoming:

VariableTypeReference TaskReference Variable
headerstringstaticPause for Change Completion
messagestringstatic
bodystringProcess CR Create Responsemessage
variablesobjectstatic
btn_successstringstaticContinue
btn_failurestringstatic

Click Save.

Step 24

Double Click the second Childjob task to configure it.

Step 25

Update the Summary to Update Change Request. Update the Description to Update Change Request using Itential Pre-built.

Enter Update Change Request in the Workflow search box. Select the Update Change Request - ServiceNow workflow. This is the second Pre-built workflow we reviewed earlier.

Set the following values for the Job Variables, then click SAVE:

NameLocationValue
crNumberProcess CR Create ResponsecrNumber
commentsstaticChange completed
statestatic

Step 26

In the upper left, click the Save icon followed by the  ▶ icon.

Step 27

In the Job Description window, click START.

Step 28

The Set Variables window opens, showing the variables the workflow requires to run. This workflow expects to receive one variable, formData, which will be passed in from Operations Manager.  We will cover Operations Manager in the next module.

The START button will run the workflow, but we are only testing it to confirm the inputs. Your view should match the image below.

Click CANCEL



Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.