Configuring Preprocessing and Postprocessing Steps in Inbound REST API

Sometimes resources, such as business objects, business services and workflows, that are accessed using REST API may change state variables, such as profile attributes, and session global values as part of a custom implementation. As a result, this can affect the functionality of subsequent business service or business object APIs that depend on these state variables in the same session.

State variables are specific to each implementation, and because the REST API framework does not identify any change to state variables, the REST API framework does not undo state changes automatically. To ensure consistent and correct results for all APIs, there is a need to reverse or reset the state changes implemented by these resources in REST API.

Preprocessing and postprocessing steps can be used for all inbound data, service, workspace and workflow REST APIs. They can assist you when you need to perform setup and cleanup operations before and after invoking the REST API, therefore not affecting subsequent REST API calls on the same session. Preprocessing steps are called before the Object Manager instance processing starts, the REST API is executed, and then the postprocessing steps are called after the Object Manager instance is completed.

Note: You cannot configure preprocessing and postprocessing steps for OpenAPI specification API calls.

In order to enable preprocessing and postprocessing steps, you must define the following business service user property on the EAI Rest Adapter Service business service in Web Tools, and deliver the workspace with business service user property changes:

  • Business service user property name. EnablePrePostProcessing

  • Associated business service. EAI Rest Adapter Service

  • User property value.True.

    Note: For more information about defining business service user properties, see Integration Platform Technologies: Siebel Enterprise Application Integration.

Preprocessing and postprocessing steps for each resource require preprocessing and postprocessing functions in the form of a business service and business method. In the EAI Rest Adapter Service in Siebel Tools, you must map the URL that identifies the target resource with the business service and business method that is responsible for each preprocessing and postprocessing function.

The following figure shows the Business Service User Props pane and sample resource mapping user property keys and values:

The surrounding text describes the steps involved creating preprocessing and postprocessing steps for inbound REST API.

You can define wildcard specification for the URL mapping resource. For example, if you add an asterisk to a data URL resource (data/*), then preprocessing and postprocessing applies to all data APIs. In the event where you list a specific resource and a wildcard, then REST API considers the specific resource. You can only use wildcard to generalize an API type.

The following table contains sample resource URLs and their corresponding user properties and values to configure preprocessing and postprocessing steps.
Note: The maximum number of characters for the user property key is 75, and the user property value is restricted to 250 characters.
Requested URL User Property Key User Property Value

data/Account/Account/.....

resource_1

data/Account

resource_1_preprocess

Business_Service1:Method

resource_1_postprocess

Business_Service2:Method

service/Siebel Account/.....

resource_2

service/Siebel Account

resource_2_preprocess

Business_Service3:Method

resource_2_postprocess

Business_Service4:Method

workspace/Applet/....

resource_3

workspace/Applet

resource_3_preprocess

Business_Service1:Method

resource 3 preprocess

Business_Service2:Method

workflow/EAISiebDemo1

resource_4

workflow/EAISiebDemo1

resource_4_preprocess

Business_Service1:Method

resource_4_preprocess

Business_Service2:Method

data/...

resource_5

data/*

resource_5_preprocess

Business_Service4:Method

resource_5_postprocess

Business_Service5:Method