Tundra, the open source package I maintain, includes a service Tundra/tundra.list.service:invoke, which can invoke multiple services concurrently.
It supports both synchronous concurrency where the number of threads used is configurable and the call to Tundra/tundra.list.service:invoke blocks until all invocations have completed, and asynchronous concurrency where the call to Tundra/tundra.list.service:invoke immediately returns a list of service threads letting you do other work in the calling service then eventually wait/block on thread completion using Tundra/tundra.list.service:join.
For example, given the following inputs (represented using JSON, for want of a better way to show the structure of an IData document list):
tundra.list.service:invoke(
$invocations = [
{
"service": "pub.string:concat",
"pipeline": {
"inString1": "abc",
"inString2": "def"
}
},
{
"service": "pub.string:toUpper",
"pipeline": {
"inString": "example"
}
}
],
$mode = "synchronous",
$concurrency = 2
)
Both pub.string:concat and pub.string:toUpper will be executed concurrently with the call to Tundra/tundra.list.service:invoke blocking until both complete, and then returning the following results (again shown in JSON format):
$invocations = [
{
"service": "pub.string:concat",
"pipeline": {
"inString1": "abc",
"inString2": "def",
"value": "abcdef"
}
},
{
"service": "pub.string:toUpper",
"pipeline": {
"inString": "example",
"value": "EXAMPLE"
}
}
]
#Flow-and-Java-services#webMethods#Integration-Server-and-ESB