Documentation

GenericParallel is a Proxy Service that takes a list of requests for one or more services, executes them in parallel with configurable concurrency and error handling strategy and gives you back the list of responses.

GenericParallel is a simpler and more functional wrapper over Split & Join facility.

Note @GPSIndex attribute in GPS Response element. This is the position of the request in the original list, so the responses can be corresponded to the requests.

By default, the returned list is already sorted by GPSIndex, so the first response is for the first request, and so on. For performance reasons though this can be turned off with GPSDoNotSort attribute:

<soapenv:Body>
<typ:GPS GPSDoNotSort="true">
...
<typ:Requests>

Calling Business Services, Pipelines and Flows

GenericParallel is able to determine the type of the target resource at runtime. However, to save the time required for this probing, it is recommended to provide the GPSTargetType attribute explicitly.

The 1.3 attribute used for the same purpose, GPSTargetIsProxy, is deprecated.

Cross-Project Calls to Pipelines and Flows

OSB 12 is not permitting dynamic calls to pipelines and flows located in another project. GenericParallel contains a workaround for this limitation.

To perform a cross-project call to a pipeline or a flow, copy GenericParallelThunk proxy and pipeline into the target project. GenericParallel, if this proxy is found, will use it as an project entry point for all calls to pipelines and flows.

Specifying the Operation

Most services are able to deduct the operation name by the SOAP body’s first child element.

However, when you have to specify the operation, provide it in the GPSOperation attribute:

Note that GPSOperation is not the same as SOAPAction HTTP header. GPSOperation should contain the operation name as defined in WSDL and as seen in OSB console.

Limiting the Concurrency

When a service cannot handle too many parallel requests, you may limit how many requests GenericParallel makes at the same time.

This limit is specified in GPSMaxParallel attribute of the GPS element.

The complete list of requests passed to GenericParallel will be split into batches no more than GPSMaxParallel in size.

<soapenv:Body>
<typ:GPS GPSMaxParallel="2">
...
<typ:Requests>

The default value of GPSMaxParallel is 5.

GPSMaxParallel must be a positive integer, if specified.

The maximum concurrency is global for all requests within the current call. It is currently not possible to set a separate concurrency for different target services within the same call.

Concurrency Debug Attributes

For testing purposes, GenericParallel also reports which batch a request was sent in.

For instance, if GPSMaxParallel is set to 2, requests 1 and 2 (GPSIndex = 1 or 2) will be sent in batch 1 (GPSBatchIndex=1), while requests 3 and 4 (GPSIndex = 3 or 4) will be sent in batch 2 (GPSBatchIndex=2), and so on.

The 3rd response then will have these debug attributes:

<types:Response GPSIndex="3" GPSBatchIndex="2">
...

Skipping Some Requests

Sometimes you need to suppress programmatically some of the parallel calls (for example, when the account doesn’t have a cable TV, no need to call for TV account details). If you retrieve the responses by their relative number in the batch, skipping calls creates some troubles because the positions of the responses change.

To skip a call but still keep its slot, GPS supports a dummy payload . If it is provided instead of the request payload, GPS does not perform a call for this request, but simply returns an empty response.

The detail element of the fault contains the responses accumulated so far, including the failed one, so you can troubleshoot the parallel call as easy as you do a sequential one. You can also cache the successful responses and retry only the failed ones.

Please note that the list of responses under Fault/detail may not be complete. Remember that GenericParallel had to cancel the operation, and some of the requests may not be completed or has not even started yet.

Do Not Fail, Report All Failures

<soapenv:Body>
<typ:GPS GPSFailMode="NEVER">
<typ:Requests>
...

In this second most useful mode, GenericParallel executes all requests, even if some of them fail, and return failures as soapenv:Fault in the GPS Response elements.