REST Request Processing Route

This route carries the main data flow logic and contains two flows: the route directs RESTful requests to the back-end system and processes the data that was returned from the backend.

Route Structure

The route has two data flows:

Flow #1: The route processing starts at the RESTful Web Service Inbound component that is activated by a request from the REST Call route. Then, the data is sent to the Request to Backend route using the Subroute component.

Flow #2: When the back-end system returns dummy data, the request is retrieved from the XEServer Data Storage and a new response is generated. The key phase in this flow is the fetching of data from Data Storage (the Get DS data component). If the Data Storage contains a data item, the processing reaches the end of Flow #2.

Route Components Description

Component Name Component Type Description
Flow #1
RESTful Web Service Inbound RESTful Web Service Inbound

Directs the data from the RESTful request to the Subroute component. Sets the "Attempt" message exchange property to 0. This property is used later by the route Retry Request To Backend to determine if the data should go for one more attempt of processing.

RequestToBackend Subroute

Invokes the Request to Backend route.

Flow #2
From Backend JMS Inbound

Picks up messages from the back-end emulation route using the Responses JMS queue.

Get DS data Data Storage Inbound

Fetches requests from the /requests location in the XEServer Data Storage. The requests are pushed to Data Storage by the Request to Backend route.

The component sets the "LastMessage" property on the original output. This property is required by the subsequent Aggregation component for batching.

Create MM Exchange Aggregation Aggregates the original data (dummy data received from the back-end system) and the request is fetched from the Data Storage. The trigger for aggregation completion is a message with the "LastMessage" property.
Number of Messages check Router Conducts only those XEServer message exchanges that consist of two messages. Particularly, if some data is fetched from Data Storage, the message exchange passes through this component.
Create Response Groovy

Executes the groovy script that applies the following logic:

Creates a new response with the "ResponseStatus" property that is set depending on the value of the "Flow" message exchange property. If the "Flow" property value is 'timeout', the 504 response code is assigned, otherwise, the 200 code is assigned.

RESTful Web Service Outbound RESTful Web Service Outbound Sends the response back to the REST Call route.