This blog is the second part of this series of blogs: link to Introduction.
Replicate a newly created requirement from SAP Cloud ALM tenant A to B using the External API Management of SAP Cloud ALM.
To do that we will use the External API Management Built-in capabilities of SAP Cloud ALM.
All Integration scenario of SAP Cloud ALM are based on the public APIs listed in the SAP Business Accelerator Hub.
A SAP Partner creates its content (a new requirement in this example) in his SAP Cloud ALM tenant (SAP Cloud ALM partner) and deliver it to a SAP Cloud ALM Customer tenant.
In SAP BTP Cockpit create a destination to the SAP Cloud ALM customer tenant to enable the connectivity.
In the SAP Cloud ALM External API Management application, create a web-hook for your destination with the following parameters:
Check the help.sap.portal for more information.
The mapping defines the transformation rule to apply before sending the request and after receiving the response from the second SAP Cloud ALM tenant.
{
"_information":
{
"_version": "1",
"_source": "SAP Cloud ALM Task",
"_destination": "SAP Cloud ALM Task",
"_name": "SAP Cloud ALM Task to SAP Cloud ALM Task",
"_comment": ""
},
"structure":
{
"request":
{
"externalId": "#{id}",
"projectId": "a3d41c42-973c-46f8-87a9-72046bb4b38b",
"title": "#{title}",
"type": "CALMREQU",
"description": "#{description}",
"scopeId": "f15896c1-ef45-4e9e-81c9-907c1f6ecaf3"
},
"response":
{
"externalId": "#{id}"
}
},
"eventTypeMapping":
{
"_comment": "Specific event type mapping",
"operationMappings":
[
{
"eventType": "TASK.CREATED",
"operation": "POST",
"responseRoot": "",
"externalIdProperty": "/id"
}
]
}
}
Check the help.sap.portal for more information.
Create a subscription based on your web-hook and your mapping with the following parameters:
Check the help.sap.portal for more information.
In the Subscriptions panel of the SAP Cloud ALM Project Management application (partner tenant), associate the subscription to the selected task types.
In this example, tasks events will be sent for Requirements. Other tasks types events (Defects, Projects, User Story and Roadmap Tasks) are ignored.
All changes events for the selected tasks types (Creation, Update and Deletion) will be managed by the associated subscriptions.
Check the help.sap.portal for more information.
In the SAP Cloud ALM External API Management application, you can monitor the events exchanged with your external system.
After creating a task in the SAP Cloud ALM Partner tenant, the result can be checked in the SAP Cloud ALM Customer tenant.
Thanks for reading.