SAP Cloud ALM API & Integration: Several extensions of SAP Cloud ALM with SAP BTP (Part 2): Replicate a newly created requirement from SAP Cloud ALM tenant A to B using the External API Management of SAP Cloud ALM.
2023-11-10 04:50:44 Author: blogs.sap.com(查看原文) 阅读量:5 收藏

This blog is the second part of this series of blogs: link to Introduction.

Objective

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.

An integration example

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.

The involved components

  • Connect and synchronise 2 SAP Cloud ALM (Partner ALM and Customer ALM):
    • External API Management of SAP Cloud ALM

SAP Cloud ALM

  • SAP Cloud ALM helps you to implement and operate intelligent cloud and hybrid business solutions.
  • You benefit from an out-of-the-box, native cloud solution, designed as the central entry point to manage your SAP landscape with content-driven guided implementation and highly automated operations.
  • SAP Cloud ALM is included in your cloud subscription containing Enterprise Support, cloud edition and in SAP Enterprise Support.

Procedure Overview

  • Configure an SAP BTP destination to enable connectivity to the SAP Cloud ALM customer tenant.
  • Configure an SAP Cloud ALM web-hook to enable communication between the 2 SAP Cloud ALM tenants.
  • Create an SAP Cloud ALM mapping to define the transformation rules to apply to messages exchanges between the SAP Cloud ALM tenants.
  • Add a SAP Cloud ALM subscription to associate the SAP Cloud ALM  customer tenant with the event types raised by SAP Cloud ALM partner tenant.
  • Configure your SAP Cloud ALM Project to associate SAP Cloud ALM subscriptions to the different tasks types.

Configure SAP BTP destination

In SAP BTP Cockpit create a destination to the SAP Cloud ALM customer tenant to enable the connectivity.

Configure SAP Cloud ALM Web-hook

In the SAP Cloud ALM External API Management application, create a web-hook for your destination with the following parameters:

  • External resource type: Task. 
  • Destination type: Enter Other.

Check the help.sap.portal for more information.

Create a SAP Cloud ALM mapping

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.

Add a SAP Cloud ALM subscription

Create a subscription based on your web-hook and your mapping with the following parameters:

  • Resource typeCALM Task to use this subscription for events raised for resources managed by the project and task applications.
  • TypeBuilt-in to apply a transformation payload.

Check the help.sap.portal for more information.

Configure your SAP Cloud ALM project

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 (DefectsProjects, 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.

Monitor resources changes events

In the SAP Cloud ALM External API Management application, you can monitor the events exchanged with your external system.

Check results in SAP Cloud ALM Customer Tenant

After creating a task in the SAP Cloud ALM Partner tenant, the result can be checked in the SAP Cloud ALM Customer tenant.

More Information

Thanks for reading.

SAP Cloud ALM API & Integration blogs:


文章来源: https://blogs.sap.com/2023/11/09/sap-cloud-alm-api-integration-several-extensions-of-sap-cloud-alm-with-sap-btp-part-2-replicate-a-newly-created-requirement-from-sap-cloud-alm-tenant-a-to-b-using-the-external-api-management-of/
如有侵权请联系:admin#unsafe.sh