Lengthy yet interesting blog! 😊
Contents/Agenda:
1. Introduction to ServiceNow (SNOW):
2. Introduction to SAP OpenConnectors:
3. ServiceNow Configuration:
Log in to the ServiceNow developer (https://developer.servicenow.com/dev.do) portal and create an instance.
You will get the instance URL: https://<instance_name>.service-now.com, Username and Password.
Once the Instance is created and you log in to the ServiceNow tool, your screen should look like below.
In the Filter Navigator search bar, search for OAuth and click on Application Registry.
Now click on New --> Select “Create an OAuth API endpoint for external clients”.
Enter the OAuth details and click on Submit:
Create Users and Groups (assign team members to their respective groups).
4. OpenConnectors Configuration:
Log in to OpenConnectors and configure the ServiceNow OAuth connector.
Enter the ServiceNow details in the tab below and click on Create Instance.
You will now be redirected the screen below.
The ServiceNow instance is ready, and we can test it. 👆
Click on Instances --> API Docs.
Scroll to the ping section and click on Try it out.
Click on Execute.
You can see the response below. SNOW Instance is reachable from OpenConnectors.
5. SAP CI IFlow Scenario: Create an IFlow using a timer and simple 1:1 mapping for testing convenience.
When the message fails, a ticket will be assigned to CI.
The CI team can then take appropriate actions on the ticket.
Step 1: Use Timer --> To trigger the interface.
Step 2: Set interface priority and Save XML Payload
Step 3: Message Mapping: Map source and target fields (1:1). As we are not passing the “heading” field (refer to step 2.2), the mapping will fail.
Exception Subprocess: In the event of mapping failure, the Exception Subprocess will be triggered.
Step 1: Use Error Start Event --> To trigger the Exception Subprocess.
Step 2: Configure the Content Modifier for assigning tickets to different team members.
Maintain the number ranges under Security Material as shown below.
Step 3: Configure Content Modifier for Incident creation
Code:
<?xml version="1.0" encoding="UTF-8" ?>
<root>
<active>true</active>
<assigned_to>${header.user}</assigned_to>
<activity_due>${date:now:dd-MM-yyyy HH:mm}</activity_due>
<assignment_group>CPI_Support</assignment_group>
<business_duration>${date:now:dd-MM-yyyy HH:mm}</business_duration>
<caller_id>CPI User</caller_id>
<closed_at>${date:property.CamelCreatedTimestamp+48h}</closed_at>
<description>
Alert Time : ${date:now:dd-MM-yyyy HH:mm} UTC
Message ID : ${property.SAP_MessageProcessingLogID}
Service Name : SAP CI
Interface : ${header.Interface_Name}
**
Error Details : ${header.Error_Details}
Message Details: <Messages: SAP CPI tenant URL>
</description>
<impact>${header.Priority}</impact>
<knowledge>true</knowledge>
<made_sla>true</made_sla>
<opened_at>${date:now:dd-MM-yyyy HH:mm}</opened_at>
<service>CPI Production</service>
<short_description>CPI alert for ${header.Interface_Name}</short_description>
<state>In Progress</state>
<subcategory>Internal Application</subcategory>
<urgency>${header.Priority}</urgency>
<work_start>${date:now:dd-MM-yyyy HH:mm}</work_start>
</root>
Step 4: Convert XML to JSON
Use a converter to change the XML data to JSON since Open Connectors accepts only JSON data.
Step 5: Request Reply to ServiceNow
Use the request reply step to send and receive incident details back from ServiceNow.
Step 6: Configure Open Connectors Adapter.
In the connection tab of Open Connectors adapter, do the configuration as shown below.
Step 7: End the Flow.
Deploy the IFlow: Once deployed, the message will fail in the mapping step, triggering the exception subprocess to send the message OpenConnectors.
6. Conclusion & Incident Record in ServiceNow: With this approach, incident creation is automated based on failures.
A new incident can be seen in ServiceNow.
Thank you very much!
Keep blogging!! 😊 Feel free to post your queries, and I'll be more than happy to help resolve them.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
3 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 |