SAP Workflow Management is a key service in SAP Digital Process Automation portfolio. It enables enterprise to digitize workflows, automate and extend business processes, manage decisions, gain end-to-end visibility and configure process variants in a no-code environment.
SAP delivers many Live Process Content package on SAP API Business Hub. These content cover some typical scenarios, Capital Expenditure Approval, Purchase Requisition Approval in ERP, etc. A content package combined Workflow, Decisions Process Visibility and related documentations, which enable customer go live the feature faster and reduce IT cost efficiently.
Process Flexibility Cockpit enable business process experts to discover, import, configure and consume live process content. The sample capital expenditure process automates CAPEX request approvals as a end-to-end scenario step by step.

Prerequisites

Configure SAP Workflow Management Destinations

Import Package Destination

Configure the WM_CF_SPACE_PROVIDER destination that enables you to import packages. This destination is used to import live process packages from SAP API Business Hub. You should setup the password in destination page. If this destination not created yet, you need create it manually as follows.
Login your BTP user, navigate to your subaccount. In the navigation pane, choose Connectivity > Destinations
Create a new destination

Parameter Value
Name WM_CF_SPACE_PROVIDER
Type HTTP
Description Live Package Import destination
URL https://deploy-service.cfapps.cn40.platform.sapcloud.cn/api/v1/spaces/<spaceid>
Proxy Type Internet
Authentication Basic Authentication
User Your BTP user who has Space Developer role
Password Related BTP user’s password

Navigate to your Space view, copy your space id from the browser URL like: https://cockpit.cn40.platform.sapcloud.cn/cockpit/#/globalaccount/xx-yy/subaccount/xxx-yyy/org/xxxx-yyyy/space/AAAA-BBBB-CCC-DDD-EEEE/applications
Copy the space id “AAAA-BBBB-CCC-DDD-EEEE” from the upper URL.
Combine the required URL manually like https://deploy-service.cfapps.cn40.platform.sapcloud.cn/api/v1/spaces/AAAA-BBBB-CCC-DDD-EEEE

Save the changes.

Business Rules Destination

Configure the destination for business rules capability to enable start conditions on process variants.
Navigate to your subaccount. In the navigation pane, choose Connectivity > Destinations
Provide the following details:
Ensure the name in WM_BUSINESSRULES. Regarding the URL, copy the rule_runtime_url from the service key and paste it in the URL field and add /rules-service. The URL format is as shown: <rule_runtime_url>/rules-service

Parameter Value
Name WM_BUSINESSRULES
Type HTTP
Description Business Rules destination
URL https://bpmruleruntime.rule.cn40.apps.platform.sapcloud.cn/rules-service
Proxy Type Internet
Authentication OAuth2ClientCredentials
Client ID Copy the value from the clientid field of service key
Client Secret Copy the value from the clientsecret field of service key
Token Service URL Copy the value from the url field of service key and add /oauth/token to the URL. The URL format is as shown: https://<subaccount>.authentication.cn40.platform.sapcloud.cn/oauth/token


Save the changes.

Notes:
If this E2E process executing fail on the CFO approval step and read error like “TypeError: Cannot read property “push” from undefined in <eval> at line number 32″, you can duplicate the destination and name in BUSINESS_RULES. After that, Re-activate the Decision, and then execute the process again.

Import the sample capital expenditure package

Launch Workflow Management SaaS

Navigate to Subaccount view / Instances and Subscriptions page, click icon “Go to Application” of WorkflowmanagementSaaS

When Workflow Management SaaS home page opened, click tile Process Flexibility Cockpit to open the cockpit. Click button Discover Packages to open Process Hub page.
Search out the Sample Capital Expenditure Approval Process

Select the tile Sample Capital Expenditure Approval Process to open it. Click Import button to import the live package

The import process will take some minutes, resolve the issue first if met some error during the importing process.
After import successfully, the button Import will update to Configure. Click link My Live Processes to go back Process Flexibility Cockpit page. The imported process package displays.

Configure a Process Variant

We can add multiple process variants to mapping our business requirements. Open the tile Sample Capital Expenditure Approval Process.
Select Process Variants to access Process Variants main page.
Click New Process Variant button to access the Manage Process Variants design page. Type a new variant name High Value Investment, and then click Create button to create the new variant. Click variant High Value Investment to access the variant design view.
we need add more step to CFO approval. Drag item Approval to the next step of Local Manager Approval.

Click the new step Approval, navigate to Step Properties view on the right pane. Rename the step to CFO Approval, switch to Details view, rename the Name in CFO, Approval Step to CFO.
Save the changes, Activate the variant.

Go back to Process Variants main view, the new variant High Value Investment has already Activated.

Configure the Decisions

Create new Decision and setup the decision for CFO approval. Access Process Flexibility Cockpit -> My Live Processes, select Sample Expenditure Approval Process tile.
Click Decisions to access the Decisions overview page.

Click tile Determine All Approvers to access the design page.

We cannot edit the original Decision. You need select Copy To Draft to make some edit actions.
Select Auto Approval node, and then click button Edit, update the Total Cost >=5000.

Click node Determine Approvers, and then Edit the Decision table.

It aims to convenient for testing, we update the local manager and CFO as same email which setup to my mail address.

Save the changes, and then Release Version, Type new Description to the new revision. Click button Release complete Decision activation.

Configure Visibility Scenarios

We can monitor the entire approval process status and critical log by Visibility Scenarios.
Navigate to Process Flexibility Cockpit. Click tile Sample Capital Expenditure Approval Process in my Live Processes. And then select item Visibility Scenarios to access the Visibility Scenarios page.
Click tile Sample Capital Expenditure Approval Dashboard to access edit page.

Switch to Performance Indicators tab, select Approved Capital Expenditure Requests from left pane. Navigate to Representation field. Select Bar Chart from drop-down list.
Save the changes, and then Activate the visibility scenario. click < icon go back to Visibility Scenarios page, we will see the Dashboard displays in Active.

Test Workflow Process

Launch Workflow Management SaaS, and then open tile Monitor Workflows.
Select High Value Investment from Workflow Definitions list.
Select Start New Instance, and then input the json context, Start New Instance and Close.
JSON context as follows:

{
  "RequestId": "IAP-2020-180",
  "Title": "App Creation",
  "Requester": {
    "FirstName": "John",
    "LastName": "Doe",
    "Email": "John.Doe@example.com",
    "UserId": "jdoe",
    "Comments": "Please Approve"
  },
  "Investment": {
    "TotalCost": 50000,
    "Type": "Software",
    "CAPEX": 10000,
    "OPEX": 2000,
    "ROI": 5,
    "IRR": 5,
    "Country": "Germany",
    "BusinessUnit": "Purchasing",
    "Description": "Provide a fresh experience for our customers by providing new apps for our services"
  },
  "Sustainability": {
    "EnergyEfficiency": 10,
    "CO2Efficiency": 20,
    "EnergyCostSavings": 15,
    "WaterSavings": 10
  }
}

Navigate to Workflow Management SaaS home page, Open tile Monitor Workflows. A new workflow instance ‘Sample Capital Expenditure Approval Process’ is running.
Go back to home page, we can see 1 new message show up in My Inbox.

Access My Inbox, we can see the role “Local Manager” receives a new approval task. Approve the request.

Go back to Home page. Wait for several seconds, refresh the page. There is 1 new incoming message in the Inbox.

Check Visibility Scenarios

Navigate to Process Flexibility Cockpit. Click tile Sample Capital Expenditure Approval Process in my Live Processes. Check the Live Process Insights, the new process results displays. Access the Live Process Insights to view the dashboard for more information.

Resources

Sample Capital Expenditure Approval Process
Discover and Import Packages

Sara Sampaio

Sara Sampaio

Author Since: March 10, 2022

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x