Workflow Event Trigger
Use
In SAP Application Interface Framework, you can define message processing workflows that are triggered by events of SAP Business Workflow. You can, for example, have flight booking SAP Business Workflow events in system ABC automatically trigger outbound proxy calls with messages containing the flight details to system XYZ.
The workflow event trigger functions of SAP Application Interface Framework support you in setting up and filling the required structures and interfaces, and setting up the required actions for such a scenario. You do not need to write a single line of code. Using the monitoring and error handling functions of SAP Application Interface Framework, you can control the process flow.
Features
To enable a workflow event trigger scenario, you need to create the following interfaces including mappings and actions:
-
A reading interface for extracting the event details.
-
A sending interface for feeding the outbound proxy.
We ship the following system objects:
-
Several Customizing activities and configuration transactions for setting up the scenario.
-
Function modules:
-
/AIF/WET_EVENT_TRIGGERED: Event function for receiving the SAP Business Workflow event and triggering the reading interface.
-
/AIF/WET_FILL_SAP_STRUCT: Mapping function for filling the SAP structure of the reading interface.
-
/AIF/WET_AC_TRIGGER_NEXT_INF: Action function for triggering the sending interface.
-
/AIF/WET_AC_TRIGGER_PROXY_OUT: Action function for triggering the outbound proxy call.
-
-
Report /AIF/WET_GEN for generating the SAP structure for your reading interface from the function module (BAPI) of your business object.
-
Generic DDIC structure /AIF/WET_EVENT_DETAILS_PROXY.
The following graphic shows how the created interfaces and the shipped function modules interact, once the scenario is set up:
Activities
To set up a triggered workflow for the “Read Function and Outbound Proxy” scenario, proceed as follows:
Preparation
In transaction /AIF/WET_GEN, from the function module (BAPI) of your business object, generate the SAP structure for your reading interface.
Setting up the Event
-
In transaction SWE2, link the SAP Business Workflow event type, enter /AIF/WET_EVENT_TRIGGERED as the receiver function module, and select Linkage Activated.
-
In transaction /AIF/WET_CONFIG, specify an SAP Application Interface Framework runtime configuration group suitable for filling your reading interface.
-
In Customizing of SAP Application Interface Framework, specify the type of event trigger scenario you want to use for this event under
Setting up the Reading Interface
-
Create the reading interface with the generated BAPI structure as SAP structure and the generic structure /AIF/WET_EVENT_DETAILS_PROXY as the raw structure under
Make sure that, for this interface, the Application Engine and the Persistency Engine are set to XML under .
-
If you use the generic structure /AIF/WET_EVENT_DETAILS_PROXY in more than one interface, set up an XML interface determination for each use with the object type, event, and receiver type as selection criteria under .
-
Map the event details and the object key to the corresponding fields of the structure generated from the BAPI under
-
Enter /AIF/WET_FILL_SAP_STRUCT as the Function Module After Mapping.
-
Define and assign an action with the function module /AIF/WET_AC_TRIGGER_NEXT_INF.
-
Specify the function module (BAPI) you used for generating the SAP structure of the reading interface under .
-
In transaction /AIF/WET_INF_CONFIG, select a runtime configuration group suitable for filling your sending interface.
Setting Up the Sending Interface
-
Create the sending interface with the generated BAPI structure as raw structure and the structure of the outbound proxy method as SAP structure under .
Make sure that, for this interface, the Application Engine and the Persistency Engine are set to XML under .
-
Map the structures under .
-
Define and assign an action with the function module /AIF/WET_AC_TRIGGER_PROXY_OUT.
-
In transaction /AIF/WET_PRXY_CONFIG, specify a logical port of the proxy if you want to use a port other than the default.
-
Specify the class and method of the outbound proxy under .

