Workflow. Using BRF+ Functions in an SAP Workflow Task

Workflow. Using BRF+ Functions in an SAP Workflow Task

Some time ago, I shared a short note about the Business Rule Framework (aka BRF+), which allows working with so-called business rules in the SAP system.

See the note: Small SAP Talk. SAP Business Rule Framework plus

It was interesting to learn about the possibility of using functions from created business rules within workflow tasks. What do I mean?

Example of a Function in a BRF+ Application

To demonstrate this in the note, I created a small function in a BRF+ application that assigns one of two string constants, STOP or CONTINUE,to a result parameter, depending on the value of the input parameter. The following video snippet shows how such a function works:

0:00
/0:23

Now About Workflow Tasks

Let’s imagine the BRF+ function we've created performs something critically important, and using it in a workflow will clearly help determine how that workflow proceeds. That is, depending on the return value of the BRF+ function, I need to decide how the running workflow will behave.

To add a BRF+ function to a workflow task, you need to select the corresponding option from the context menu (after the task itself has been added to the workflow).

It’s important to pay attention to the presence of appropriate container elements in the created workflow, which will later be used by the system to perform the binding.

The following video snippet shows the sequence of actions in which:

  • A new workflow is created
  • Required container elements are defined in the workflow
  • A new task is added that contains the BRF+ function
  • A condition is added to monitor the result of the BRF+ function execution in the workflow
0:00
/2:27

N.B. Please note that the ID of the BRF+ function added to a workflow task can be copied by opening that same function in the BRF+ transaction.

Testing

I’m trying to see how everything turned out. The main question is about populating the workflow container elements with the values returned by the BRF+ function.

0:00
/1:06

N.B. Please note that when a BRF+ function is added to a workflow task, the system automatically generates a class that activates the mechanism of the predefined BRF+ function.

0:00
/1:14

It's still a pleasure working with you! Hugs.