cancel
Showing results for 
Search instead for 
Did you mean: 

How do I model a Decision based on a Decision Table with List Input Variables

SebastianEsch
Active Participant
0 Kudos
192

I'm trying to model a Decision in SAP Build Process Automation that is using inputs that are lists.

The documentation for SBPA on how to create Decisions states:

  • Once you select List, this list input parameter will be displayed under Vocabulary when you configure your conditions and results in the wizard.
  • However, you will not be able to use these list parameters to configure conditions in condition headers and these will appear greyed out in the Configure Conditions screen. See Model a Rule in a Decision Table.
  • Once a rule is added, you can use these list parameters in the cells of the decision table while modelling rule expressions.

Example

    • If you have the following input in a tabular form with the IDs of employees and their cities as list input parameters, you can use 'BLR' EXISTSIN (Employees, CityCode) to determine whether it contains the input 'BLR’. When you configure your inputs, you can use 'Employees' and select the List checkbox.

Employees

Employee_ID

CityCode

Age

L321

BLR

30

L322

MUM

40

My question is, how would I model the decision table to use the Employees List? Would I need another  condition to use Employees from the example, as Employees is not available to add as a condition?

And where do I add the EXISTSIN conditions? 'BLR' EXISTSIN(Employees, CityCode) adapted to my case always gives me syntax errors in the Condition Editor.

UPDATE:

After leaving comments in the SAP Build Process Automation documentation, and getting pointed to the blog post Understanding how-to use Table & its Functions in Business Rules and also reading Using Vocabulary Rules to Build Reusable Formulas in SAP Cloud Platform Business Rules I think I'm a step further.

Unfortunately those two blogs are from the Business Rules in SAP Workflow Service days and therefore hard to find when you search with SAP Build Process Automation terminology.

But I'm still stuck with how to model the rule that calls the decision table.

2nd UPDATE:

I had success modeling a Decision that has an Input Parameter that is a List and then evaluate a Decision Table with Hit Policy First-Match.

SebastianEsch_0-1723200099507.png

The part I don't know how to solve is, how can I handle results from a Decision Table with Hit Policy All Match?

I would need a nested loop to handle the multiple results returned from the Decision Table for each Employee.

Kind regards,

Sebastian

SebastianEsch
Active Participant
0 Kudos
Unfortunately comments for questions are very limited. So I updated my original question.

Accepted Solutions (1)

Accepted Solutions (1)

SebastianEsch
Active Participant

I finally figured it out. When you switch the Decision Table Hit-Policy to All Match, the UPDATE function has to assign the result to a Data Type that contains a List of the Result Data Type.

SebastianEsch_0-1723201625584.png

 

Answers (0)