JBoss.orgCommunity Documentation
This example can be found in the trailblazer
folder, which contains an enhanced version of the trailblazer example found in the JBossESB distribution. See the TrailBlazer Guide in the JBossESB distribution ($JBossESB/docs/samples/TBGuide.pdf
) for more information about the example. The main changes are the introduction of a File Based Bank, and modifications to the message structures to enable a consistent conversation id to be carried with the messages.
The choreography description for the Trailblazer example can be found in the trailblazer-models project in the Eclipse environment. If the project has not yet been imported, then please refer to the instructions in the Getting Started Guide.
You can open the choreography for the trailblazer (trailblazer.cdm) and also a scenario representing a valid transaction associated with the choreography (LoanRequest.scn). In the choreography description editor, view the "Choreography Flows" tab to see the structure of the process.
To simulate the scenario against the choreography, to ensure that the choreography correctly caters for the valid business scenario, the user should press the green 'play' button in the toolbar, associated with the Scenario Editor.
$JBossAS/server/default/deploy/jbossesb.sar/jbossesb-properties.xml
file, in the section entitled "transports" and specify all of the SMTP mail server settings for your environment.
trailblazer/trailblazer.properties
Update the file.bank.monitored.directory and file.output.directory properties. These are folders used by the File Based Bank, and are set to /tmp/input
and /tmp/output
by default.
trailblazer/esb/conf/jboss-esb.xml
There is a fs-provider block, update the directory attribute value to be the same as the file.output.directory value in trailblazer.properties
file.
trailblazer
folder, execute the command to start the ESB: ant deploy
this should deploy the ESB and WAR files to your JBoss AS server/default
.
trailblazer/banks
folder, execute the command to start the JMS Bank service: ant runJMSBank.
trailblazer/banks
folder, execute the command to start the JMS Bank service: ant runFileBank.
In the Eclipse environment, select the popup menu associated with the trailblazer.cdm
file, and choose the Choreography->Monitor menu item.
Wait for the monitor window to start, and indicate that the choreography is being monitored, shown in the status line at the bottom of the window.
Start a browser and enter the URL: localhost:8080/trailblazer.
To demonstrate what occurs when the implementation deviates from the expected behaviour as defined in the choreography description, try the following steps:
The above steps show how changing the service implementation without updating a choreography can result in behavioural validation errors being detected.
Compared to command of ant deploy, basically, we have just updated the following code in $Overlord/samples/trailblazer/client/src/org/jboss/soa/esb/samples/trailblazer/loanbroker/LoanBroker.java file.
In the following code within the processLoanRequest method, we've changed the "4" to "7"
//step 2 - check if score is acceptable if (score >= 4) {
Issue further loan requests, remembering to change the quote reference each time, until a Credit Check result of between 4 and 6 inclusive occurs, which will result in an out of sequence message being reported (in red) to the Choreography Monitor
It is currently a requirement that the choreography used within the Choreography Monitor is the same as the description used to locally monitor the services (i.e. within the overlord-cdl-validator.esb/models directory).