After you run the CreateTicket process, display the process instance to view the parameter values that are passed to ServiceNow. Use this procedure to verify that any custom or mandatory fields that you added are applied when the ServiceNow incident is created.
Follow these steps:
The CA Process Automation ServiceNow Gateway integration processes display.
A list of filters displays in the left pane.
A list of available instance filters appears in the Filters pane and a list of instances that satisfy the filter criteria display in the right pane. For example, if you select All Instances, a list of all instances appears in the right pane.
The CreateTicket_<ProcessID> pane displays. The initial view is the Main Editor, which provides a graphical representation of the process.
The Local_Dataset pane on the left displays the parameters that are used in the process in the following two categories:
Lists CA Process Automation system-generated variables, including the parameters that were set during the configuration.
Lists the parameters that CA SOI provides.
The ServiceNow values that were used in this instance of the CreateTicket process are displayed.
A list of parameters displays. These parameters represent the alert attributes from CA SOI used in this instance of the CreateTicket process and local variables that were passed from the parent process.
Code Example
Use custom fields to populate the ServiceNow incident fields with dynamic alert properties.
Alarm attributes are available as Process.variableName where variableName refers to any of the available alarm properties as defined in the dataset at /ServiceNow/ Common Dataset. For reference, display the current alarm attributes in the environment as detailed in the Display a CA SOI Alert Instance topic.
You can view the ServiceNow incident parameters through WSDL, that is available at https://<servicenow-instance>/incident.do?WSDL.
You can send the custom properties for an incident by mapping the alarm variable to the incident parameters.
The following example defines the severity of an incident that is based on the alert severity:
Process.CustomParams[i] = newValueMap();
Process.CustomParams[i].attribute=”severity”;
if(Process.severity==”Critical” || Process.severity==”Fatal”){
Process.CustomParams[i].value=”1”;
}else if(Process.severity==”Major” || Process.severity==”Minor”){
Process.CustomParams[i].value=”2”;
}else{
Process.CustomParams[i].value=”3”;
}
Here, i, refers to the index variable of Process.CustomParams. Increment this variable to add new values.
The follow example sets the category to Hardware that depends on the model family:
Process.CustomParams[i] = newValueMap();
Process.CustomParams[i].attribute=”category”;
if(Process.model_family==”Hardware”){
Process.CustomParams[i].value=”Hardware”;
}
Note: For more information about CA Process Automation development practices, see the CA Process Automation User Guide.
|
Copyright © 2013 CA.
All rights reserved.
|
|