JBoss.orgCommunity Documentation

Chapter 3. CDL Conformance

3.1. Purchasing Example
3.1.1. Overview
3.1.2. Running the Example
3.2. Brokerage Example
3.2.1. Overview
3.2.2. Running the Example

There are two examples to demonstrate the conversation aware ESB actions(for both stateful and stateless), and the conformance checking against a choreography.

These are purchasing, a simple customer/supplier example with two associated Eclipse projects (purchasing-store-stateful/less and purchasing-models), and brokerage which extends the purchasing example through the introduction of a broker that mediates between potentially multiple suppliers to find the best deal, defined within three Eclipse projects (brokerage-broker-stateful/less, brokerage-supplier-stateful/less and brokerage-models).

These examples make use of a common Credit Agency service, defined within the common-creditAgency-stateful/less Eclipse project, and are executed through the use of client applications defined in the ${OverlordCDL}/samples/client folder.

Warning

At the moment, the conversation aware ESB runtime doesn't support the hot-deploy. That means if you update the business pojo class, such as $creditAgency/src/main/com/acme/services/creditAgency/CreditAgencyPurchase.java file, You need to re-deploy it, and then restart the server to cause it to take effect. This issue has been tracked under https://jira.jboss.org/jira/browse/SOAG-72. Will be fixed in the next release.

The purchasing example describes the interactions between a Buyer, Store and Credit Agency. The flow for this example would be:

To check conformance, we need to refer to the model and service implementation projects in the Eclipse environment. The purchasing-models project contains the CDL used to perform conformance checking on the src/main/resources/META-INF/jboss-esb.xml files within the other projects. A full explanation of the conversation aware ESB actions can be found in the Conversational Aware ESB section of the User Guide in the docs folder.

To provide a simple demonstration of the conformance checking:

The information regarding the expected message type is obtained from the choreography description in the purchasing-models project. To identify the precise interaction within the choreography that this error relates to, select the context menu associated with the error and choose the Quick Fix menu item. This will display a dialog with a list of fixes, select the Show referenced description option and press OK. This will cause the relevant interaction within the choreography description to be displayed.

Another Quick Fix option associated with this error is Update from Referenced Description. By selecting this option, you will notice that the message type is changed back to the value without the 'X'.

The brokerage example describes the interactions between a Customer, Broker, Supplier and Credit Agency. The flow for this example would be:

To check conformance, we need to refer to the model and service implementation projects in the Eclipse environment. The brokerage-models project contains the CDL used to perform conformance checking on the src/main/resources/META-INF/jboss-esb.xml files within the other brokerage projects. A full explanation of the conversation aware ESB actions can be found in the Conversational Aware ESB section of the User Guide in the docs folder.

To provide a simple demonstration of the conformance checking:

The information regarding the expected message type is obtained from the choreography description in the brokerage-models project. To identify the precise interaction within the choreography that this error relates to, select the context menu associated with the error and choose the Quick Fix menu item. This will display a dialog with a list of fixes, select the Show referenced description option and press OK. This will cause the relevant interaction within the choreography description to be displayed.