To invoke services concurrently, we can use the <flow>
construct. In the following example, the three <invoke>
operations will perform concurrently:
<process ...> ... <sequence> <!-- Wait for the incoming request to start the process --> <receive ... /> <!-- Invoke a set of related services, concurrently --> <flow> <invoke ... /> <invoke ... /> <invoke ... /> </flow> ... <!-- Return the response --> <reply ... /> </sequence> </process>
We can also combine and nest the <sequence>
and <flow>
constructs that allow us to define several sequences that execute concurrently. In the following example, we have defined two sequences, one that consists of three invocations, and one with two invocations. Both sequences will execute concurrently:
<process ...>
...
<sequence>
<!-- Wait for...