!--a11y-->
Connection to SAP Business
Workflow 
When critical situations occur, SAP Business Workflow as a SAP Web Application Server service allows you not only to automate a business process, but also to inform the person responsible.
If you want to react to events, you can link SAP Event Management (SAP EM) with SAP Business Workflow in accordance with your rule set.

For example, your customer sends a proof of delivery that triggers the event Proof of Delivery in SAP EM, which in turn uses SAP Business Workflow to trigger the settlement process for the delivery.
You define parameters to link the events that start workflows in the local system or in another system.
You define the event type linkage in Customizing for SAP EM by:
· Defining the event START_WORKFLOW with object type /SAPTRX/EH
This event links SAP EM to the events that each start a workflow.
· Specifying /SAPTRX/TRIGGER_WORKFLOW as the receiver function module
· Activating the event type linkage
The advantage of the event type linkage is in error handling: In cases where the application system is not available, the system administrator receives a message and the system saves the event temporarily.
For more information about SAP Business Workflow, see the SAP Library under SAP NetWeaver Components ® SAP Web Application Server ® Business Management (BC-BMT) ® SAP Business Workflow Engine (BC-BMT-WFM).
SAP has already predefined the event type linkage to trigger a workflow. Check that the following settings have been made correctly:
· Object type: /SAPTRX/EH
· Event: START_WORKFLOW
· Receiver type: TRIGGER_WORKFLOW
· Receiver call: Function module
· Receiver function module: /SAPTRX/TRIGGER_WORKFLOW
· Linkage activated: Checked
You have created the following in Customizing for SAP EM:
· The activity ID that SAP EM uses as the key
· The object type of the event that triggers the workflow
· The event that triggers the workflow
· The business object key
· An RFC connection for SAP EM if you want to start a workflow in a system other than the one on which SAP EM runs.
· If you use the workflow locally, choose None or Workflow_local.

In this case, you must maintain an entry for the RFC destination with the same name Workflow_local to link to the same system on which SAP EM runs.
For more information about setting up an RFC connection to the application system, see the Implementation Guide (IMG) forEvent Management General Settings in SAP Event Management Define RFC Connection to Application System.
· At least one rule set that uses the rule for the workflow and its activity.
¡ You create a rule in your rule set by selecting the activity WORKFLOW_START.
¡ You specify the first activity parameter. The activity parameter is the activity ID that you defined previously in SAP EM Customizing.
¡ You can assign a condition to your rule to control how the workflow is triggered.

For example, you specify the internal event code of the event message as Arrival at Customer.
For more information about integration between SAP Business Workflow and SAP EM, see the Implementation Guide (IMG) for Event Management ® Reactions to Event Messages ® Define SAP Business Workflow Integration.
...
1. You send an event message Proof of Delivery to SAP EM for a shipment and want to start a predefined workflow in the application system using this event message.
2. SAP EM updates the event handlers belonging to the shipment, which it finds using the tracking ID and the internal event code set.
3. Your new rule is in the event handler’s rule set. This rule triggers the creation of the event START_WORKFLOW when the event Proof of Delivery is reported.
4. The event START_WORKFLOW starts the workflow that triggers an automated process (settlement process) in the application system (SAP R/3, SAP APO, SAP CRM).
The event links SAP EM to SAP Business Workflow.
