Part 2 – vCloud Automation Center – Service Now Integration via vCO SOAP Plug-in – Version 1.1 – Mark Andreopoulos SET West
Please note that the methods used in this article are the “old” approach, and it is best to utilize the modern capabilities of vCO using my updated blog post in the link below:
https://www.vmtocloud.com/service-now-cmdb-integration-in-30-minutes/
vCAC Configuration
Create a build profile in vCAC by navigating to Enterprise Administrator
vCAC Configuration
I called mine ServiceNow. Add the 4 custom properties shown below
vCAC Configuration
Assign your build profile to one of the Blueprints as shown in the screen here
vCAC Configuration
Now we must launch the vCAC Designer and load the workflow stub for WFStubMachineProvisioned
vCAC Configuration
Double click in the box
vCAC Configuration
Double click custom code
vCAC Configuration
Here is an overview of the workflow stub. We are getting the machine name, owner, and properties and assigning them to variables.
We then invoke the vCO workflows that we just created above
After the vCO workflow runs, we will use the SetMachineProperty action to assign snow_id and inc_id to their respective vCAC custom properties
You must drag in each element from the left pane and then connect the arrows as shown.
Please refer to each of the detailed screens for the necessary values. You must update each of the steps properties on the right pane
vCAC Configuration
Browse for your vCO workflow by clicking the elipses and filtering on snow; assuming your workflow in vCO has snow in the name
Select the Insert workflow and click OK
vCAC Configuration
vCAC Configuration
vCAC Configuration
vCAC Configuration
vCAC Configuration
vCAC Configuration
vCAC Configuration
vCAC Configuration
All variables will be of type string with the exception of properties
vCAC Configuration
Properties variable assignment
vCAC Configuration
When completed updating variables and properties, you must click the Send button to update the workflow stub.
Provide a description
vCAC Configuration
Now we will follow similar steps for the WFStubMachineDisposing stub
vCAC Configuration
Double click here
vCAC Configuration
Double click custom code
vCAC Configuration
Here is the workflow for updating and closing the incident. Quite similar to the Insert workflow.
Values for GetMachineName, GetMachineOwnwer, and GetMachineProperties are exactly the same as in the MachineProvisioned stub above
vCAC Configuration
Once again, choose your vCO workflow by clicking the elipses and filtering on snow
vCAC Configuration
After updating all of the properties Send this workflow and provide a description
Test the Integration
Request a new machine based on a Blueprint that has the build profile we created earlier associated with it.
Once the machine has been provisioned navigate to Enterprise Administrator and choose Edit
Test the Integration
You should now see both sys_id (guid assigned by SNOW) and inc_id assigned as custom properties for the machine.
These will follow the machine throughout it’s lifecycle and enable vCAC and vCO to update the ServiceNow incident state (to Closed) and details when the machine is destroyed.
Once again, any of the parameters from the vCO workflow could be assigned and mapped to custom properties.
Test the Integration
As you can see, the new incident has been created with both the machine name and user capture in the description of the case.
Now you should destroy the machine to test the update workflow
Test the Integration
After the machine has been destroyed, you will notice the Activity field has been updated, and the State has been changed to Closed
Test the Integration
To validate your workflows have run successfully, navigate to the vCO workflows we created earlier.
You should see green check marks for successful tokens.
Also notice the variables have been captured for sys_id and inc_id.
Pingback: Part 1 – vCloud Automation Center – Service Now Integration via vCO SOAP Plug-in – Version 1.1 – Mark Andreopoulos SET West | VMtoCloud.com
Pingback: Integrating vRealize Automation with ServiceNow | VMware Cloud Management - VMware Blogs