Enumeration Orchestration
Enumeration Orchestration is implemented using the mapping capability of TIBCO API Exchange Gateway.
With parallel orchestration, a single inbound request is split into a set of multiple outbound sub-requests. Each sub-request might be routed differently to various service endpoints. After processing and receiving the responses for each sub-requests, all responses are recombined into a single response message for the original inbound request.
Define the transformations for the northbound request forward mapping in such a way that the output document contains the sequence that defines the enumeration orchestration. This output document from this transformation serves as an input for the southbound forward request mapping. This contains the <asg_map:repeat> tag for enumeration and instructs the Core Engine to split the requests.
Enumeration orchestration is done at the southbound forward mapping meaning that one payload is split into multiple sub-requests independently. It also allows you to override the routing key. For each sub-request, the routing key can be defined so that each sub-request is forwarded to a separate service endpoint. Enumeration orchestration modifies the routing of sub-requests to a different service at the southbound forward mapping boundary.
The following example shows the snippet of forward southbound mapping transformation for enumeration orchestration:
<asg_map:repeat> <asg_map:payload-xml> <asg_map:mapping-result> <asg_map:routingKey>getbookbyAuthor_AAA.HTTP</asg_map:routingKey> <asg_map:payload> <SOAP-ENV:Envelope> <SOAP-ENV:Body> <...> <..> </SOAP-ENV:Body> </SOAP-ENV:Envelope> </asg_map:payload> </asg_map:mapping-result> </asg_map:payload-xml> <asg_map:payload-xml> <asg_map:mapping-result> <asg_map:routingKey>getbookbyTitle_BBB.JMS</asg_map:routingKey> <asg_map:payload> <SOAP-ENV:Envelope> <SOAP-ENV:Body> <...> <...> </SOAP-ENV:Body> </SOAP-ENV:Envelope> </asg_map:payload </asg_map:mapping-result> </asg_map:payload-xml> </asg_map:repeat>
For example, GetLocation is a service which finds the location for a single service. This service can be exposed as a service to find location for a group of services. This means that the gateway has to map one request to multiple requests per service. For this case, the payload in the operation request contains a sequence of multiple requests which has to be spilt and sent individually to each service endpoint.