“Plan-To-Action” in Workforce Management, with decentralized approval logic using BTP Build Process Automation – a technical view

Blog co-authored by Holger Handel (Head of Product Management for SAP Analytics Cloud for Planning) and special thanks to Johannes Huhn for his development support.

 

This is the second article on the topic, following the first blog written few weeks ago, which was more focusing on the functional aspects of this Plan-to-Action scenario around Human Resource Planning and Position Management.

In this article, we will explore the technical view of our decentralized approval logic managed by SAP Build Process Automation, based on a Workforce Planning application entirely created in SAP Analytics Cloud.

Create HTTP API Connection in SAP Analytics Cloud

To establish an HTTP API Connection, SAP Analytics Cloud has introduced Multi-Actions public APIs in the second half of 2023. These APIs can trigger Multi-Actions execution and query the results later. For guidance on configuring this API, please refer to the following blogs:

Public%20HTTP%20API%20connection%20in%20SAP%20Analytics%20Cloud

Public HTTP API connection in SAP Analytics Cloud

As previously mentioned, SAP Analytics Cloud requires an HTTP API connection linked to the SAP Build Process Automation tenant to be created.

HTTP%20API%20connection%20details%20in%20SAP%20Analytics%20Cloud

HTTP API connection details in SAP Analytics Cloud

To trigger a SAP Build Process Automation process from an external application (in this case SAP Analytics Cloud), correct setup and credentials are essential. Follow the tutorials below to 1) create an API trigger and 2) call the API trigger. The BTP destination provides the credentials for use in SAC HTTP API connection:

Confirm planned positions in SAP Analytics Cloud HXM Content

Utilizing the HXM pre-delivered SAC content from SAP, we have adapted the “Confirm” button to not only publish changes to SAC’s planning model but also trigger a new process in SAP Build Process Automation.

Confirm%20button%20triggers%20the%20workflow%20in%20SAP%20Build%20Process%20Automation

Confirm button triggers the workflow in SAP Build Process Automation

A new process is instantiated for each planned new position, leveraging SAP Analytics Cloud Multi-Actions concept.

API%20Step%20calling%20the%20BTP%20Process%20Automation%20workflow

API Step calling SAP Build Process Automation workflow

In the body request, various parameters, such as context about headcount and position, can be passed.

Body%20request%20with%20SAC%20context%20mapping

Body request with SAC context mapping

SAP Build Process Automation overall workflow

Once the SAC Multi-Action is executed, the SAP Build Process Automation workflow is called and instantiated.

SAP%20Build%20Process%20Automation%20overall%20workflow

SAP Build Process Automation overall workflow

Process Inputs are used throughout the overall process, consisting of those being passed over from the public API via the body in the request.

Process%20Input%20definition

Process Input definition

Approval Form Template

Once information is available, it flows into the Position Approval Form, where it is exposed. Additional items, such as a comment box, can be added to explain the approve or reject decision.

Approval%20Form%20Template

Approval Form Template

After defining the Approval Form Template, Process Inputs must be mapped to different fields in the form.

Mapping%20fields%20from%20the%20Approval%20Form%20to%20the%20Process%20Inputs

Mapping fields from the Approval Form to the Process Inputs

Approve step

If a new position is approved, the information is passed over to SAP SuccessFactors using the Position Management API available.

Note, in order to call the Position Management API, you must import the APIs as an Action in SAP Build Process Automation. You can follow an example on how to create actions here: https://developers.sap.com/group.connect-process-external-sap-bpa.html

SF%20Position%20Management%20Connection

Position API Connection

Once the SAP SuccessFactors connection is configured, it is used as a Destination Variable in the Approval step.

Position%20Management%20call%20from%20SAP%20BTP%20Process%20Automation

Position Management call from SAP BTP Process Automation

In the same step, Process Inputs must be mapped to different fields of the Position Management API.

Mapping%20Process%20Inputs%20to%20Position%20Management%20API

Mapping Process Inputs to Position Management API

Once this step is done, an email is sent to the defined controllers notifying them that a position has been approved and captured in SAP SuccessFactors.

Approval%20Email%20Setup

Approval Email Configuration

Reject step

If the position is rejected, SAP BTP Process Automation initiates a SAC Multi-Action to delete the rejected position.

Note: the Multi-Action API from SAP Analytics Cloud must be imported as an action into SAP Build Process Automation (similar to the approach to embed the Position Management API).

SAC%20Multi-Action%20call%20to%20delete%20the%20rejected%20position

SAC Multi-Action call to delete the rejected position

This Multi-Action consists of two steps: first, it deletes the rejected position via the position parameter passed from SAP Build Process Automation, cleaning all associated records in the SAC Planning model, and then publishes the changes.

Deletion%20of%20the%20rejected%20position%20via%20a%20SAC%20multi-action

Deletion of the rejected position via a SAC Multi-Action

Afterwards, there’s a step to send an email to inform the controller(s) that the position has been rejected this time.

Rejection%20Email%20Configuration

Rejection Email Configuration

 

Summary

The objective of this second blog was to showcase the technical application of various BTP services in the context of an HR planning scenario. While the above case has been simplified for readability, both SAP Analytics Cloud and SAP BTP Process Automation provide complete flexibility for customers and partners to customize the process according to their specific requirements.

 

Scroll to Top