11

SAP Integration Suite, advanced event mesh: Using SAP SuccessFactors solutions...

 1 year ago
source link: https://blogs.sap.com/2022/12/23/sap-integration-suite-advanced-event-mesh-using-sap-successfactors-solutions-as-an-event-source/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
December 23, 2022 8 minute read

SAP Integration Suite, advanced event mesh: Using SAP SuccessFactors solutions as an Event Source

SAP SuccessFactors solutions are cloud-based HCM software applications that support core HR and payroll, talent management, HR analytics and workforce planning, and employee experience management. SuccessFactors solutions are used by over 235+ million users in more than 200 countries and territories around the world.

SuccessFactors.png

SAP SuccessFactors Intelligent Services Events

SuccessFactors already comes with Intelligent Services events that allow to simplify HR workflows with the capabilities of these HTTP-based events. As a result, a number of SAP-built events are already available in SAP SuccessFactors that can be adjusted to specific use cases and needs and therefore used in event-driven business cases around SuccessFactors.

Intelligent Services Events include for example:

  • Employee Hire – a new worker is created with a specified start date
  • Change in Manager – published after a job information change for an employee that has been assigned to a new manager
  • Change in Employee Location – a worker has moved to a new location

A list of all available Intelligent Services Events can be found in the SAP SuccessFactors solutions documentation here.

SAP Event Mesh as an event broker for SuccessFactors

A few years ago my colleague Sai Harish Balantrapu has written an excellent blog on using SAP Event Mesh as an event broker for SuccessFactors. You can find this blog here.

We will take the approach this blog has described and adjust it for usage with our new offering SAP Integration Suite, advanced event mesh. In the end the approach remains the same, with just a few adjustments that are needed.

A lot of ground we are covering here has been described in the original blog. I was wondering whether it would make sense to just describe the differences, in the end decided to give you the full picture here to make it as easy as possible to follow.

Again, Kudos to Sai Harish for all the groundwork!

SAP Integration Suite, advanced Event Mesh

SAP Integration Suite, advanced event mesh is a fully managed event streaming and management service that enables enterprise-wide and enterprise-grade event-driven architecture. Advanced Event Mesh is a distributed mesh of event brokers that can be deployed across environments, both in the cloud and on-premise It offers a full purpose set of eventing services covering all relevant use cases AEM supports event streaming, event management and event monitoring Brokers fully scale as required and come in T-shirt sizes to perfectly fit different needs

AEM.png

High Level Overview of our Approach

On the SuccessFactors side we will create an integration in the Integration Center. The destination for this integration is going to be REST and we will choose JSON format for the event. We will add selected fields to the event. Then we will have to create the destination settings. We will use basic authentication and REST. The information for the destination we will have to look up in Advanced Event Mesh, so keep it open in parallel.

SF29-1.png

There is a very important step that we, most likely and depending on your individual settings, have to take before: we have to change the ports we use. The standard settings for SAP SuccessFactors ports don’t fit the standard settings for Advanced Event Mesh ports. So either we have to open up our AEM standard ports in SuccessFactors, or we can just adjust the ports on the Advanced Event Mesh side. Here we will just adjust the AEM port settings since this is very straightforward.

Preparation on the Advanced Event Mesh side

Go to the Cluster Manager and select your Event Broker

Click on Manage

Click on Advanced Options

AEM1.png

Scroll down to Port Configuration

Expand Public Endpoint

AEM2-1.png

Check on the value for Secured REST Host. AEM standard settings here would be 9443 which is typically blocked by SAP SuccessFactors. By standard the Secured Web Messaging Host is set to port 443 in AEM.

If you would like to adjust the ports on the AEM side (remember, you could open up the port on the SuccessFactors side as well), click on Edit.

Change the Secured Web Messaging Host port to a different value (e.g. 7443)

Then change the Secured REST Host to use port 443.

AEM3.png

It might take some time for these settings to reflect.

Steps on the SuccessFactors side

Step 1

Logon to the SuccessFactors Home Page

Then search for Integration in the search field

Select Integration Center

  • SF1.png

Step 2

Click on the tile My Integrations

SF2.png

Step 3

Click the Create Button to create a new integration between SuccessFactors and Advanced Event Mesh

SF3.png

Step 4

Select More Integration Types

SF4.png

Step 5

On the next screen, select:

Trigger Type → Intelligent Services
Destination Type → REST
Source Type → SuccessFactors
Format → JSON

Click the Create Button

SF5.png

Step 6

A list of all available Intelligent Service Events is displayed. Let us look at the Employee Hire event. Therefore, select Employee Hire

SF6.png

Step 7

The Employee Hire event information is displayed in the right-side panel and you can see the fields including a data preview.

Click the Select button

SF7.png

Step 8

Enter an Integration Name and a Description and click Next

SF8.png

Step 9

On the next screen, click the + button and select Insert Sibling Element

SF9.png

Step 10

Select the newly added Element and enter the following in the Label field: context

SF10.png

Step 11

Select the Element “Context” and click the + button and select Add Child Element

SF11.png

Step 12

Select the newly added Element and enter the following.

Label: userId
Description: userid of the new hire.

Click the map.png button to do a mapping of userId

SF12.png

Step 13

Click Entity Tree View and Select User ID

SF13.png

Step 14

Click Change Association to “User ID”

Step 15

Select the context Element, click the + button and choose Add Child Element

SF14.png

Step 16

Select the Element and adjust as follows:

Label: managerId
Description: Manager of the new Hire
Default Value: “Enter your user id”

SF15.png

Step 17

Click on Next and then on the Response Fields screen click on Next again until you have made it to the Filter screen

SF16.png

Step 18

Expand Advanced Filters, then enter the following:

  • Field: context/userId
  • Operation: is equal to
  • Value: <a user in your system>.

The filter value enables you to test the integration.

Click on Next.

SF17-1.png

Step 19

In the destination settings click on REST Server Settings and enter the following pieces of information from Advanced Event Mesh:

  • Connection Name → <Any Name>
  • REST API URL → <From AEM Secured REST Host> + your topic (e.g. /successfactors)
  • User Name → <From AEM Username>
  • Password → <From AEM Password>

To get this information, in Advanced Event Mesh go to your broker. Then select Connect.

SF18.png

Expand REST and copy the Connection Details

SF19.png

IMPORTANT: you need to add a topic to write to. So add for example /successfactors as a topic at the end of the REST API URL

SF20.png

Click Next.

Step 20

Save the Integration by clicking the Save button

Step 21

Click on “Run Now” to test the event generation.

SF21.png

Steps on Advanced Event Mesh side

Employee Hired events are now configured on the SAP SuccessFactors side and will be written to a topic. In order to receive these events in Advanced Event Mesh we will create a queue and a queue subscription to our topic.

Step 21

Go to the Cluster Manager in Advanced Event Mesh, select your broker and click on Manage

SF22.png

Step 22

Click on Queues

SF23.png

Step 23

A new window opens up. Click on the +Queue button

SF24.png

Step 24

Enter a name for the queue, e.g. SuccessFactors and click Create

SF25.png

Step 25

On the next screen, click Apply

SF26.png

Step 26

Click on the queue you have just created. Then click on Subscriptions.

SF27.png

Step 27

Click on the button +Subscriptions

Step 28

Enter the topic you had used earlier on the SuccessFactors side as part of the REST URL. Most likely successfactors

Click Create

SF28.png

Step 29

Go back to the Queues screen. You queue is now subscribed to your topic.

Summary and Test

You have set up an event end-to-end all the way from SAP SuccessFactors to SAP Integration Suite, advanced event mesh where it ends up in your queue based on a queue subscription. In a next step you could now consume the event from the queue.

This diagram again shows the steps you have taken in SuccessFactors.

SF29.png

Now you can test your setup.

Go back to SuccessFactors and select your integration. Click the Run Now button to test the integration.

Once the integration has run successfully you can see this in the status of Last Run Time.

SF30.png

Once that has happened, go back to your queue in Advanced Event Mesh and check on whether the event has ended up in your queue.

SF31.png

You should now have a basic setup for event exposure from SAP SuccessFactors to SAP Integration Suite, advanced event mesh up and running.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK