Skip to Content
Product Information
Author's profile photo Murali Shanmugham

Creating Data Types & Decisions: Part 4

In this blog post, I will be creating decisions which will hold the rules and business logic. For this demonstration, I will be using decisions to determine who the approver would be based on the project department and cost. For example, if an employee has opted to work on a Special Project which is governed by Sustainability department, they would need approval from the Sustainability department manager who would review the cost and timeline.

Decisions consist of policies and collection of rules. Rules can either be based on Decision Tables or Text Rule. In this section, I will be using Decision Tables for the automation.

Getting started with SAP Process Automation

Part 1 – Subscribing to SAP Process Automation and understanding the components

Part 2 – Creating your first Business Process Project and configuring Trigger Forms

Part 3 – Adding Process Controls & Approval Form

Part 4 – Creating Data Types & Decisions

Part 5- Create and Configure Automation

Part 6- Deploy Business Process Project

Part 7- Configure Process Visibility Dashboard & Integration with Fiori Launchpad

 

Creating Data Types

Before creating decisions, we would need to define data types. Data types describe a data structure and can be used as Input/Output parameters in automation or processes. Navigate to the Business Process Project and use the “Create” option to create new data types.

In the popup, provide a name and description for a Department Data Type which would be used as the input.

Use the “New Field” to add “DepartmentName” as type string and “cost” as number.

Repeat the same process for “ApproverEmail” Data Type which would be used as an output for the decision.

Creating Decision

In the Process Builder, use the “+” icon on the canvas and create a new decision.

In the Create Decision popup, provide a name and description.

Use the “Open Editor” option to open the Decision. Set the Input and Output with the new Data Types which have been created earlier.

Select the Default Policy to define your rules.

In the Default Policy, add a new decision table.

In the popup, provide the name and description.

Open the decision table and access the settings icon.

In the condition expressions, use the in-place context sensitive help to “Determine Approver Input”. Further select “DepartmentName” and provide a label as “Department”. Similarly, use the “+” icon to add another input for “Cost”.

In the Results, use the help to select “Determine Approvers Output”.

We are now ready to add values to the decision table. For each of the department, provide an email address of the manager who would need to approve requests. For demonstrations, I will use my own email ID to receive and approve these requests.

Save your changes and navigate back to the Process Builder. Connect the other end of the condition control to “Determine Approvers”. Similarly, connect the Approve output from “Manager Approval” to “Determine Approvers”. Notice that the flow settings in the Condition control would automatically get updated based on these changes.

Select “Determine Approvers” and in the Inputs tab, ensure you have mapped it to “Department” and “Cost” from the process content. This is an important step as the decision uses this input to determine the relevant output (Approver email).

In the next blog post, I will enhance this process further with an Approval Form for a Department Manager to action and use automation (RPA) to send email confirmation back to the employee.

 

Assigned Tags

      2 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Keerthana Jayathran
      Keerthana Jayathran

      Hi Murali Shanmugham ,

      What to do when we have to call BRs from an external application like a UI5 application. Previously in workflow management we used to call APIs specifying  the Rule service Id. What is the way to achieve the same in SPA? Please help me with this.

      Regards,
      Keerthana

      Author's profile photo Murali Shanmugham
      Murali Shanmugham
      Blog Post Author

      Hi Keerthana, API based access is currently in the roadmap and should be made available in the coming months