Show TOC

Background documentationWorkflow Event Action

 

With a workflow event action, you can integrate workflow processing into BRFplus. In contrast to a Start Workflow action, you do not have to specify a particular workflow to be triggered. Rather, you specify an event that has been defined for an object in the backend system. Whenever the event is raised, all the workflows that have been registered for that event are triggered.

Prerequisites

Your backend system contains software component SAP_BASIS with a release lower than 800. In SAP_BASIS 800 or higher, the underlying workflow functionality of this action type is not supported.

Features

General

BRFplus supports the following types of objects that you can use for referring to an event:

  • ABAP Objects Class (CL)

  • Business Class (BC)

  • Business Object (BOR object; BO)

After having entered the required event details, click Update Event Container. The system analyzes all the data dictionary elements that are used as event parameters. For each of these data dictionary elements, the system automatically creates a BRFplus data object in the current application and defines a binding relationship to the corresponding dictionary element.

Once the event container has been populated with the parameter fields, you can define the values to be passed to the event. Depending on the parameter type, you can accomplish this by either directly entering a value or by assigning an expression that is evaluated at runtime.

ABAP Objects Class

For events defined in classes of type ABAP Objects as well as of type Business Class, it is required that the class implements the IF_WORKFLOW interface. If you use the value help (F4) to search for classes, the system automatically restricts the search results to classes that meet this requirement.

All parameters of an event you want to use must have a direct, explicit type definition. That is, the type definition must refer to a type that exists in the data dictionary. If at least one event parameter has an indirect type assignment (for example, realized by the TYPE REF or LIKE statement), the event cannot be used for the workflow event action.

Object Instance ID

At runtime, events are raised by an instance of the given class or business object. For a class, you can identify this instance by its local persistent object reference (LPOR). A business object (BO) instance can be identified via the business object key. For a BRFplus workflow event action, the LPOR or BO key must be passed to the Object Instance ID field at runtime. You can accomplish this by either passing the respective value to the action via a context data object or by evaluating an expression. It is up to the calling application to pass the relevant instance ID to the called function's context.

Comparison of Workflow Event Action and Start Workflow Action

The main differences between the workflow event action type and the Start Workflow action type are the following:

  • A Start Workflow action has always exactly one workflow assigned, and the assignment is part of the action's definition. In contrast to this, a workflow event action can have any number of registered workflows (including zero) that listen for the event that has been defined in the action.

  • As a consequence of the statement above, triggering a workflow event action does not guarantee that any workflow is started at all in response to the action. If there is no workflow event handler listening to the action's event, nothing will happen.

  • Unlike the Start Workflow action, the workflow event action provides no way to see which workflow exactly will be triggered by the action. This is determined by the fact that a particular workflow instance has been registered for the event in question. The workflow event handler permanently listens to the events that are raised in the system. As soon as a registered event is raised, the workflow starts.

Business Class, Business Object

These constructs refer to older class concepts found in SAP systems. BRFplus supports these legacy class types for compatibility reasons. We do not recommend to create new classes of this kind.