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.
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
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.
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
Scroll down to Port Configuration
Expand Public Endpoint
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.
It might take some time for these settings to reflect.
Steps on the SuccessFactors side
Logon to the SuccessFactors Home Page
Then search for Integration in the search field
Select Integration Center
Click on the tile My Integrations
Click the Create Button to create a new integration between SuccessFactors and Advanced Event Mesh
Select More Integration Types
On the next screen, select:
Trigger Type → Intelligent Services
Destination Type → REST
Source Type → SuccessFactors
Format → JSON
Click the Create Button
A list of all available Intelligent Service Events is displayed. Let us look at the Employee Hire event. Therefore, select Employee Hire
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
Enter an Integration Name and a Description and click Next
On the next screen, click the + button and select Insert Sibling Element
Select the newly added Element and enter the following in the Label field: context
Select the Element “Context” and click the + button and select Add Child Element
Select the newly added Element and enter the following.
Description: userid of the new hire.
Click the button to do a mapping of userId
Click Entity Tree View and Select User ID
Click Change Association to “User ID”
Select the context Element, click the + button and choose Add Child Element
Select the Element and adjust as follows:
Description: Manager of the new Hire
Default Value: “Enter your user id”
Click on Next and then on the Response Fields screen click on Next again until you have made it to the Filter screen
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.
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.
Expand REST and copy the Connection Details
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
Save the Integration by clicking the Save button
Click on “Run Now” to test the event generation.
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.
Go to the Cluster Manager in Advanced Event Mesh, select your broker and click on Manage
Click on Queues
A new window opens up. Click on the +Queue button
Enter a name for the queue, e.g. SuccessFactors and click Create
On the next screen, click Apply
Click on the queue you have just created. Then click on Subscriptions.
Click on the button +Subscriptions
Enter the topic you had used earlier on the SuccessFactors side as part of the REST URL. Most likely successfactors
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.
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.
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.
You should now have a basic setup for event exposure from SAP SuccessFactors to SAP Integration Suite, advanced event mesh up and running.
It's indeed a blog on AEM with SFEC.
Thank you for sharing!!
Thank you for the Blog
Thanks for sharing the detailed blog !!!