Petals-SE-EIP

compared with
Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (6)

View Page History

!aggregator.gif!
*Configuration of a Service Unit to provide a service (EIP) *
{table-plus}
|| Parameter || Description || Default || Required by pattern ||
| eip | The name of the pattern to execute : {{aggregator}} | \- | All |
dynamic-router |
| aggregator-correlation | XPath condition that is applied on the incoming message to correlate them together | \- | aggregator |
{table-plus}

The EIP Component receives source exchanges and correlates it to a SU deployed. The correlation is retrieved from an XPath expression specified in the SU parameter 'aggregator-correlation'. If the source exchange is {{InOut}} or {{InOptionalOut}}, a standard response is sent :
{code}

{note:title=Caution}
Message order is kept from incoming sequence to the outgoing message.
{note}

{note:title=Caution}
{{consumes}} sections cardinality is [1-1|1-1]
{note}

{note:title=Caution}
All the Message Exchange Pattern are accepted for the source exchanges
{note}

h3. Scatter-Gather Pattern
{loremipsum:5}

*Enterprise Integration Pattern*

!scattergather.gif!
*Configuration of a Service Unit to provide a service (EIP)*

{table-plus}
|| Parameter || Description || Default || Required by pattern ||
| eip | The name of the pattern to execute : {{scatter-gather}} | \- | All |
| fault-robust | If true, a fault thrown by a target exchange don't stop the process and don't change the original status to {{FAULT}} | false | scatter-gather\\
splitter |
| aggregator-correlation | If true, an exception thrown by a targer exchange don't stop the process and don't change the original exchange status to {{ERROR}}. | false | scatter-gather\\
spliter |

{table-plus}


The EIP Component forwards the message to all the services referenced in the consumes sections. The EIP component waits for all the responses from these services, and aggregates them. The aggregation is returned to the original consumer :

{code:xml}
<result xmlns="http://petals.ow2.org/petals-se-eip/scatter-gather">
...
</result>
{code}

An example of service unit configuration :

{code:xml}
<?xml version="1.0" encoding="UTF-8"?>
<!-- JBI descriptor for the PEtALS component "EIP"-->
<jbi:jbi version="1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jbi="http://java.sun.com/xml/ns/jbi"
xmlns:petalsCDK="http://petals.ow2.org/components/extensions/version-5"
xmlns:eip="http://petals.ow2.org/components/eip/version-2"
xmlns:test="http://petals.ow2.org/test">

<jbi:services binding-component="false">
<jbi:provides
interface-name="test:scatterGather"
service-name="test:scatterGatherService1"
endpoint-name="scatterGatherService1Endpoint">
<petalsCDK:wsdl xsi:nil="true" />
<eip:eip>scatter-gather</eip:eip>
</jbi:provides>

<jbi:consumes interface-name="test:scatterGatherProvider"
service-name="test:scatterGatherProviderService1"
endpoint-name="scatterGatherProviderService1Endpoint">
<petalsCDK:mep>InOut</petalsCDK:mep>
<petalsCDK:operation xmlns:petals="http://org.ow2.petals">petals:operation</petalsCDK:operation>
</jbi:consumes>

<jbi:consumes interface-name="test:scatterGatherProvider"
service-name="test:scatterGatherProviderService2"
endpoint-name="scatterGatherProviderService2Endpoint">
<petalsCDK:mep>InOut</petalsCDK:mep>
<petalsCDK:operation xmlns:petals="http://org.ow2.petals">petals:operation</petalsCDK:operation>
</jbi:consumes>
</jbi:services>
</jbi:jbi>
{code}

{note:title=Caution}
{{consumes}} sections cardinality is [1-n|1-n]
{note}

{note:title=Caution}
message exchange pattern of the incoming exchange is {{InOut}}.
{note}

{note:title=Caution}
By default, the process stops when a Fault is returned by the provider. To continue the process even if a fault is thrown, set the fault-robust parameter to {{TRUE}}. The fault is concatenated with the others results.
{note}

{note:title=Caution}
By default, the process stops when an Exception is returned by the provider. To continue the process even if an exception is thrown, set the exception-robust to {{TRUE}}. The exception is concatenate with the others results.
{note}

h3. Routing-Slip Pattern
{loremipsum:5}