Petals Getting started - day 5 - EIP Orchestration

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

Changes (22)

View Page History
{panel}

{info}This tutorial is based on [EIP Buffer complex use case|petalsesb:Bufferize case|petalscomponents:Bufferize operations with EIP].
{info}

* *MathOperations.AddIntegers* processes the messages and send you the responses.

{gliffy:space=petalsesb|page=Bufferize {gliffy:space=petalscomponents|page=Bufferize operations with EIP|name=Petals RMI-EIP-JSR181}

*What is EIP ?*

*What is Agregator pattern ?*
[TODO]

*\[TODO\]*


*What is Splitter Pattern ?*
[TODO]

*\[TODO\]*



# Create a new EIP Technical service with the following configuration:

|| Parameter name \\ || Value \\ || Comments \\ ||
|| JBI propertie || || ||

*EIP Agregator conditions*
# Messages Elements which satisfy "aggregator-correlation" are aggregated
{code:lang=xml}<eip:aggregator-correlation>boolean(/*[local-name()="AddIntegers"])</eip:aggregator-correlation>{code}
This means elements Elements inside <AddIntegers> will be aggregated.

# Messages which satisfy "test" trigger the sending of aggregated buffer
# When "test" is true, aggregated message is sent.
{code:lang=xml}<eip:test>boolean(/*[local-name()="AddIntegers"]/*[local-name()="equals"])</eip:test>{code}
If When <AddIntegers> contains the <equals> element, the aggregated message is sent to the next service, and buffer cleared.


# Elements which satisfy "test" are extracted and sent to the next service.
{code:lang=xml}<eip:test>//*[local-name()="AddIntegers"]</eip:test>{code}
<AddIntegers> elements are split and each one is sent in one message.
<AddIntegers> elements are split and sent one by one.

h2. Test the EIP chain

Deploy the SA containing the SU su-jsr181-MathOperations-provide. Deploy the SA&nbsp;sa-Eip-AggregatorSplitter.
# Deploy the SA containing the SU su-jsr181-MathOperations-provide.
# Deploy the SA&nbsp;sa-Eip-AggregatorSplitter.
# Send messages from webconsole, with InOut MEP (message exchange pattern)
# Send the trigger message.

Send messages from webconsole, with InOut MEP (message exchange pattern), then send the trigger.

{code:lang=xml|title=Message 1|theme=Default}
<AddIntegers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
{code}

Bufferize more messages:

{code:lange=xml|title=Message 2|theme=Default}
{code}

Trigger :
{code:lang=xml|title=Message 4 - Trigger|theme=Default}
<AddIntegers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
{code}

Messages processed by MathOperations :
{code:lang=xml|title=Response message|theme=Default}
<result xmlns="http://petals.ow2.org/petals-se-eip/splitter">



*Other orchestration ways: BPEL, SCA, JSR181 or POJO. More info in whitepaper*