Show TOC

Function documentationLinking to Own Business Processes Locate this document in the navigation structure

 

You can link your own asynchronous Enterprise Services to Error and Conflict Handler (ECH).

Prerequisites

You have generated a proxy for your Enterprise Service in the ABAP system.

Activities

Implementation

If a business error occurs in your service implementation, you transfer it to ECH as follows:

  1. Use the static method S_INITIALIZE to create an instance of class CL_FEH_REGISTRATION.

  2. Use the COLLECT method to transfer the error symptom to the instance you have created; by doing so, you also transfer it to ECH.

  3. Then issue an exception derived from CX_AI_APPLICATION_FAULT so that the local Web service runtime can react to it.

For more information, see the documentation for the class.

To use Postprocessing Office (PPO) to handle the errors that have occurred, you must implement the callback interface IF_ECH_ACTION. You implement this interface together with the business logic in a class. However, this should not be the proxy class because you need one implementation of the interface IF_ECH_ACTION for each service operation. For more information, see the documentation for the interface.

Customizing

To connect your own business process to ECH, you need to make the Customizing settings in both ECH and PPO. The following settings are mandatory:

  1. In Customizing for Cross-Application Components, select   General Application Functions   Error and Conflict Handler   Postprocessing Office   Software Components   Define Software Components  . In this Customizing activity, you define the new component to which you want to assign your business process.

  2. Define a new business process in PPO. In Customizing for Cross-Application Components, select   General Application Functions   Error and Conflict Handler   Postprocessing Office   Business Processes   Define Business Processes  .

  3. Define a new business process in ECH. In Customizing for Cross-Application Components, select   General Application Functions   Error and Conflict Handler   Postprocessing Office   Business Processes   Define Business Processes  . When doing so, specify your implementation of interface IF_ECH_ACTION as the action class. Enter class CL_FEH_MESSAGE_PERSISTENCY in the Persistence field and class CL_FEH_REGISTRATION in the Notification field.

  4. Assign the ECH business process you created in step 3 to the PPO business process you created in step 2. In Customizing for Cross-Application Components, select   General Application Components   Error and Conflict Handler   Define Business Processes for Postprocessing Office  .

  5. Assign your proxy implementation to the ECH business process you created in step 3. In Customizing for Cross-Application Components select   General Application Components   Error and Conflict Handler   Assign Caller to a Business Process  . Enter the proxy interface in the API Name field and the method of your service operation in the API Component field.

To simplify making the entry, the report Creating a Process for a Service Operation, with which you can make the essential settings on one screen, is available in Customizing for Cross-Application Components under   General Application Functions   Error and Conflict Handler  . These settings are transferred to the above mentioned Customizing tables automatically.