I spent about 90 minutes on a call Friday before last talking to a new CDK user with lots of questions. Good questions... about JBI in general, Component Toolkit, exchange patterns, the OJC build system... all the factors that must be considered when developing a JBI component. But this post isn't so much about how CDK simplifies these things but rather an analogy that will maybe help how JBI works and where a component fits in. I will acknowledge up front that while my analogies always make sense to me, my track record with others is... well, let's go with "hit and miss" (because "crappy" would be less glorifying... and more accurate).
You're at work and your boss tells you to run some errands in your Hyper-Text Teal Porsche (which basically means you're color-blind and ruined a nice car by writing on it...moving on). You have a package of expense reports and an address, not to all the places you're going but rather to where you start. Your tacky car is clean (as in recently SOAPed) and you head out to your starting point: the Binding Center. When you arrive, the BC folks find your car offensive and decree you must be normalized before you can continue on your way. The address you're given is in JBI City, which means you'll need a factory-fresh hover car (including navigation system) to run your errands (can't drive foreign cars in JBI City...only hover cars). The BC folks enter the address into the navigation system and send you to the NMR highway via the Delivery Channel onramp.
Did I mention the hover cars have auto-pilot? Once you're buckled in, the hover car gets on the highway and makes a beeline for the offramp you need. Since you're running business errands, you exit the NMR highway at the offramp for the BPEL Service Emporium. Upon arrival, you park and head to the Processing Center to find out which group handles expense reports. You're directed to a Business Processing Activities room, where you're greeted by the Receiving Activity coordinator, who tells you you're first activity is to copy some important values from your expense report to another ledger. Next, you need to enter the expense report into another system, one that you don't know how to use because all the data fields use different names than the corresponding fields in your report. Fortunately, this BP room has hover car rentals available (as each hover car's navigational system only knows how to get one place and back) to take you and your expense reports somewhere that translates them into the right format. Some translations are done in house, but others are sent to the XSLT Service Emporium, which is your next stop. After checking out your hover rental, you're back on the highway and soon getting off at the XSLT Delivery Channel offramp. One translation later and you're back on the highway, stopping by the BPEL Service Emporium to pick up your original hover car (the loaner from the Binding Center).
An important note about renting hover cars: always send a thank you note. Always. Either you're done using it or something was wrong with the car and you need to notify the rental center about the error. Back to the analogy... You've gotten your expense reports translated, you've returned to the BPEL Service Emporium, and you've sent your thank you note for the translation. Pick up your original hover car and get back on the NMR highway because you need to get back to work. Finally, you're back at the Binding Center, where you send your thank you note and grab your teal Porsche on the way back to the office.
So............could you tell I was describing a BPEL process, exposed via HTTP, with an Invoke to XsltSE throw in? Were you able to follow at all? Resounding silence is not the response for which I was looking...
Here's how it breaks down:
| Crappy Analogy | Actual JBI Meaning |
|---|---|
| Bossing telling you to run errands in your teal Porsche | A message is sent over the HTTP protocol |
| You and a package of expense reports | The message and its data payload |
| Starting address | The WSDL service port's SOAP address |
| Car is clean | Message is formatted using SOAP |
| Binding Center | HTTP Binding Component |
| Offensive car is normalized | Message payload is extracted from protocol-specific format and inserted into JBI message exchange |
| Hover cars | Message exchanges |
| Navigation system | JBI runtime resolves addresses to determine correct component destination |
| No foreign cars in JBI City | Only message exchanges travel the NMR |
| BC folks enter the address | The message exchange is addressed with a "consumer" endpoint |
| To the NMR highway via the DeliveryChannel onramp | All message exchanges are sent to the NMR via the DeliveryChannel and its send() methods. |
| Auto-pilot feature | The component need not steer the message exchange to its destination; handled by JBI runtime |
| The offramp | The DeliveryChannel of the destination component via the accept() method. |
| BPEL Service Emporium | BPEL Service Engine |
| Processing Center | NMR-listening threads coordinate with a ServiceUnitManager to determine the correct business process to handle the message. |
| Business Processing Activities room | The BPEL process instance. |
| Receiving Activity coordinator | A BPEL Receive activity. |
| Copying expense reports | A BPEL Assign activity. |
| Hover car rentals | A BPEL Invoke activity, which creates a new/distinct message exchange for each trip between components. |
| Navigation is to one address and back | The message exchange from HTTPBC to BPELSE cannot be used to send data from BPELSE to XsltSE. |
| Translations done in house | The doXslTransform() extension function in BPEL. |
| XSLT Service Emporium | Xslt Service Engine |
| Translation services | XsltSE Transform activities |
| Picking up original hover loaner | Once invoke to XsltSE is complete, send reply back in original message exchange (the one from HTTPBC to BPELSE). |
| Sending thank you notes | Every message exchange must be completed with a Status response. See the Understanding Exchange Patterns wiki for more details. |
| Back at the Binding Center | The original message exchange returns via the NMR to HTTPBC, where the payload is denormalized. |
| Leaving in teal Porsche | The response is sent back on the protocol on which the request was received. |
Be sure to check out the CDK Concepts wiki for more details on the concepts crammed into this analogy. Thanks for reading!
