IF_WORKFLOW Interface

Use

The IF_WORKFLOW interface is necessary when using an ABAP class within the SAP WebFlow Engine. The interface contains methods that allow the object to be used within the SAP WebFlow Engine.

Features

The SAP WebFlow Engine handles all objects generically. Objects have to be saved in the event of a context change. Therefore, it is necessary to convert object references in such a way that they can be saved persistently. Conversely, you have to be able to generate the corresponding instance of an ABAP class from the persistently saved key.

There are also a number of SAP WebFlow Engine components, for example, the Workflow Log, that can display objects. In this case the object has to provide corresponding functions.

The IF_WORKFLOW interface puts a logical parenthesis round the BI_PERSISTENT (instance management) and BI_OBJECT (object behavior) interfaces. The IF_WORKFLOWinterface contains the following methods:

·        BI_PERSISTENT~FIND_BY_LPOR

·        BI_PERSISTENT~LPOR

·        BI_PERSISTENT~REFRESH

·        BI_OBJECT~DEFAULT_ATTRIBUTE_VALUE

·        BI_OBJECT~EXECUTE_DEFAULT_METHOD

·        BI_OBJECT~RELEASE

A class that implements the IF_WORKFLOW interface can be used in any workflow. The class is automatically released for use in workflows when the interface is implemented. Therefore, only make compatible changes to a class after implementation (do not delete attributes, change types or delete methods). There is no where-used list to show which workflows the class is used in.

Internal classes of an application should not implement the IF_WORKFLOWinterface, since this could mean that each method of the class is used in the workflow. Therefore, you should encapsulate the workflow functions in another class that calls the selected methods of the internal class.