JBoss.orgCommunity Documentation
There are two examples to demonstrate the conversation aware ESB actions, and the conformance checking against a choreography. These are purchasing
, a simple customer/supplier example with two associated Eclipse projects (purchasing-store
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
, brokerage-supplier
and brokerage-models
).
These examples make use of a common Credit Agency service, defined within the common-creditAgency
Eclipse project, and are executed through the use of client applications defined in the ${OverlordCDL}/samples/client
folder.
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:
purchasing-store/src/main/resources/META-INF/jboss-esb.xml
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'.
$Overlord/samples/purchasing/store
folder and execute ant deploy$Overlord/samples/client
folder and execute ant runPurchasingClient, which will send a 'BuyRequest' message to the Store, which will then perform the credit check before returning a response to the client.
To see a different response from the client, change the isCreditValid method on the CreditAgencyPurchase class to return false, within the common/creditAgency
ESB service implementation, and then re-deploy the Credit Agency service. Then when the client is re-run, a 'BuyFailed' message will be returned.
You can undeploy the corresponding esb artifact by through command ant undeploy
in its directory, such as
$Overlord/samples/purchasing/store
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:
brokerage-broker/src/main/resources/META-INF/jboss-esb.xml
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.
$Overlord/samples/brokerage/supplier
folder and execute ant deploy$Overlord/samples/brokerage/broker
folder and execute ant deploy$Overlord/samples/common/creditAgency
folder and execute ant deploy$Overlord/samples/client
folder and execute ant runBrokerageClient, which will initially send an 'enquiry' message to the Broker, which will communicate with the set of Suppliers to obtain the best quote. The client will then send a 'buy' request, which will result in the Broker performing a credit check before returning a response to the client.
You can undeploy the corresponding esb artifact by through command ant undeploy
in its directory, such as
$Overlord/samples/brokerage/supplier