BRF+ allows only scalar data elements and expressions as columns in decision tables. Conditions on non-scalar values (tables) usually require you to add expression columns with scalar result values. This approach therefore requires changing the decision table settings every time a check for a new value needs to be tested for.
An alternative is to use the boolean constant expression True as a column and to add the table expressions directly into the cells of the decision table.
We use a SAP workflow solution that can be configured entirely via BRF+ (rule-based Workflow of SAP Master Data Governance). We want to implement the following rules:
The list of content owner departments (more than 10) is known, but can of course change over time. There is one approval path in the workflow for each of the departments. While on the path, a BRF+ rule is queried to determine whether the actual approval is required or not.
In a request process, an arbitrary number of data fields can be changed. Each data field is assigned to exactly one group, but there is no restriction on the number of field groups in a change request.
The implementations shown are reduced to the decision table. Instead of outputting the values needed to steer the workflow, we just use some log actions to showcase the idea.
In the standard approach, we create expressions with scalar return values (here: Boolean). Each expression searches for the occurrence of a given field group name in the list of changed field groups.
The resulting decision table schema looks like this:
Now we can fill the decision table like this:
While this solution is working, adding a new field group requires changing the table schema, a change that requires re-testing of the table, since this change affects the complete decision table. Also, the table gets harder to maintain as we add more values to check for, as each value requires a new column.
An alternative implementation inverts the notion of value and expression by placing the constant expression True in a column and the expressions into the rows of the table.
The table schema is depicted in the following image. Note that you can get the constant True by clicking the "include FDT standard application" check-box in the context search dialog:
In the table, add the expressions by choosing Select... from the context menu of the table cell. We can re-use the expressions created for the first approach here, as long as those expressions return a boolean value:
I hope this tip is something new & useful for the community. I have found a ton of interesting material in the forums and blogs already that helped me in my project, and I hope I can give something back this way. BRF+ is a fun & exciting tool to work with, and I want to thank carsten.ziegler for writing & constantly improving it. :smile:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 | |
2 |