Working with EIP in Petals

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

Changes (15)

View Page History
{section}

The most famous implementation of EIP is Apache Camel. [Apache Camel|http://camel.apache.org/]. It allows to define _routes_ and facilitates the use of EIP.
At the time Camel was created, Petals developed [its own EIP implementation|petalscomponents:Petals-SE-EIP], in a JBI component for EIP. This component is very efficient and robust, but however supports less patterns than Camel. Due to different objectives, Petals EIP remained in the scope of Petals.

\\
To create an EIP chain to run in Petals, you can either create a service-unit project for the EIP component or create an EIP [croquis|Working with Croquis].
The first approach is deprecated and will not be discussed here. The creation of a croquis for EIP is explained below.
The creation of a croquis for EIP is explained below.

h1. Creating an EIP croquis
h2. EIP nodes

An *EIP node* can be selected among the various ones supported by Petals.
A node taken on the palette can either be dragged and dropped on the diagram or simply set by selecting it in the palette and clicking it on the diagram.


\\
Once added on the diagram, an EIP node must be edited. It is achieved through the properties Eclipse *Properties* view.
There are three different levels of properties.

\\
First, there are the ID properties.
Every EIP node will (unfortuantely) result in a Petals service. Therefore, it must be given an interface name, a service name and an end-point name. A WSDL can also be associated with it.
These connections link the EIP to the services it may invoke (other EIP or Petals services).

!petals-studio-creating-eip-croquis-15.jpg!

h2. End-point nodes

*End-point nodes* represent a Petals service.
One can be created by selecting it in the palette and adding it on the diagram. Its properties then need to be set.

!petals-studio-creating-eip-croquis-9.jpg!

\\
Or you can also drag and drag a service from the [Petals Services view|Getting familiar with the Petals Services view] and drop it on the diagram.

!petals-studio-creating-eip-croquis-4.jpg!
h2. Connections

Connections are links between nodes on the diagram.
They can be created by using the dedicated palette icon or by right-clicking an EIP and selecting *Connect to...*.
A connection always start from an EIP node and may end on an EIP node or an end-point node.

\\
Connections also have properties to edit.
One part of the properties is about the invocation properties.

\\
Validation is performed in live mode during the edition, so that you instantanetely know if there is an error or a missing property.
Once complete, an EIP chain can be exported as two outputs:
* As a service assembly for Petals ESB (i.e. a ZIP archive that can directly be deployed in Petals).