Parallel Pipe

The Parallel Pipe style of coordination requires an agent to send a message to multiple agents or components and accept the reply that comes back first and process business logic with it. The following applies when method signatures of invoked agents and components are different.

Syntax : ParallelPipe(agent.methodA(paramlist), component.methodB(paramlist),                        [agent[ ] | component[ ].method(paramlist)]; result) {		// business logic } where,
 * agent and component are instances of type Agent and Component
 * agent[ ] and component[ ] are arrays of type Agent and Component
 * result is a variable that holds of a value of type specified by the return type of the method invoked on the agent or component

Like in Broadcast, in the parallel pipe of coordination
 * responses from agents and components is assigned to the return variable result which is passed to the logic block for further processing. Once this happens, the channel is cleared
 * role and id of agents and components may be retrieved as __parallelpipe__agent__role and __parallelpipe__agent__id in the logic block

However, unlike in Broadcast, a Parallel piping of requests to multiple agents and components may be invoked on different methods defined on the specified agents and components.

Next : Callback