Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
siva_nagireddy
Explorer
1,775

Decision Tables: 

The use of decision tables in SAP build process automation enables the creation and implementation of business logic and business rules in workflows. These tables usually consist of rows and columns, where each row represents a unique combination of input conditions and each column corresponds to a specific action or result based on those conditions. By leveraging decision tables, organizations can streamline their business processes by automating decision-making tasks.

Imagine a scenario where we have to use a decision table in SAP Build Process Automation and in a project we have to create only a decision table and the project does not start from any form or API. After creating the decision table, this blog shows you how to test it using postman with a basic scenario. So get started quickly and create a decision table.

Step 1:

When your are creating the project no need to create any process, you can cancel it and directly you can start with the creation of decision table.

Screenshot 2024-02-18 at 10.10.50 PM.png

Screenshot 2024-02-18 at 10.16.09 PM.png

 

Step 2:

Now, add the input and output parameters. While adding the input and output parameters, in the data-type section we can choose from the existing basic data-types or else you can explicitly create a data type in the project and select that created data type in type section. Screenshot 2024-02-18 at 10.35.24 PM.png

once the inputs/outputs section is completed, click on the rules tab to configure the decision rules either in decision table rule or text based rule type. Here I'm going with the decision table. 
Now check the below images to configure the conditions and editing the rules.

Screenshot 2024-02-18 at 10.43.12 PM.png

After rule details, now configure the input/ output conditions.

Screenshot 2024-02-18 at 10.43.27 PM.png

Now, configure the results tab, i.e., then condition in the if-then rule.

Screenshot 2024-02-18 at 10.43.54 PM.png

Once review it, if all looks good then click on the create button.

Screenshot 2024-02-18 at 10.44.05 PM.png

Step 3:

After creating the decision table with the necessary fields, save it. You can add as many rows as needed by clicking on the add row button.

Screenshot 2024-02-18 at 10.59.24 PM.png

Once it's saved, we can release the project and after releasing it deploy the project.

Screenshot 2024-02-18 at 11.05.24 PM.png

After deploying it, click on the view details of the decision to get the decision details like Id and version. which are going to be used in the postman for testing.

Screenshot 2024-02-18 at 11.07.28 PM.png

Screenshot 2024-02-18 at 11.10.15 PM.png

Step 4:

In the postman, select the Authorization type as Oauth 2.0 and provide the necessary details and use the url based on the region like for Europe: 

https://spa-api-gateway-bpi-eu-prod.cfapps.eu10.hana.ondemand.com/public/rule/runtime/rest/v2/rule-s...

for US region change it "us" in place of "eu".

And use the body as shown below...

Screenshot 2024-02-18 at 11.44.23 PM.pngScreenshot 2024-02-18 at 11.45.47 PM.png 

The RuleServiceId is nothing but the ID we copied from the details of decision table in the previous step.

 

Thank you, 

Mekapothu Siva Nagireddy.

1 Comment
Labels in this area