Petals-SE-EIP

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

Changes (3)

View Page History

*Configuration of a Service Unit to provide a service (EIP)*
{loremipsum:5}
|| Parameter || Description \\ || Default \\ || Required by pattern \\ ||
| eip | The name of the pattern to execute : {{routing-slip}}. \\ | \- | all |
| fault-to-exception \\ | If true, a fault received from the target service is transformed to an exception into the source exchange. \\ | false | bridge\\
router\\
dynamicrouter\\
routing-slip\\
dispatcher |

The EIP Component chains invocation of the referenced services in the {{consumes}} sections, in the order that they are declared. The IN message of the incoming exchange is sent to the first service; the OUT response of this service is sent to the second service as an IN message, and so on. The last target exchange is matched with the source exchange as better as possible. So : 
* If the source exchange needs a response (InOut or InOptionalOut patterns) and no response are received (InOnly, RobustInOnly or InOptionalOut patterns), a default response is returned :
{code:lang=xml}<result xmlns="http://petals.ow2.org/petals-se-eip/bridge">Bridge: no content into the final target exchange</result>{code}
* If the source exchange doesn't accept a response (InOnly or RobustInOnly patterns) and a response is received (InOut or InOptionalOut patterns), the response is ignored.
* If the source exchange doesn't accept a fault (InOnly pattern) and a fault is received (RobustInOnly, InOut or InOptionalOut patterns), the fault is ignored.

An example of service unit configuration :
{code:lang=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:routingSlip"
service-name="test:routingSlipService1"
endpoint-name="routingSlipService1Endpoint">

<petalsCDK:wsdl xsi:nil="true" />
<eip:eip>routing-slip</eip:eip>
<eip:fault-to-exception>false</eip:fault-to-exception>
</jbi:provides>

<jbi:consumes interface-name="test:routingSlipProvider"
service-name="test:routingSlipProviderService1"
endpoint-name="routingSlipProviderService1Endpoint">

<petalsCDK:mep>InOut</petalsCDK:mep>
<petalsCDK:operation xmlns:petals="http://org.ow2.petals">petals:operation</petalsCDK:operation>
</jbi:consumes>

<jbi:consumes interface-name="test:routingSlipProvider"
service-name="test:routingSlipProviderService2"
endpoint-name="routingSlipProviderService2Endpoint">

<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}by default, the {{process}} stops when a Fault is returned by the provider if it doesn't use the InOnly Message Exchange Pattern{note}
\\
{note:title=Caution}by default, the process stops when an Exception is returned by the provider{note}
\\
{note:title=Caution}message exchange pattern of all the target exchanges, except the last, is {{InOut}}{note}
\\
{note:title=Caution}all the Message Exchange Pattern are accepted for the source exchange{note}


h3. Wire-Tap Pattern