|
|
YOUR FEEDBACK
Did you read today's front page stories & breaking news?
SYS-CON.TV |
TOP THREE LINKS YOU MUST CLICK ON Integration
Rating WebLogic Integration 8.1 on Process Patterns
WLI and BPEL don't always fly in formation
By: Michael Havey
Oct. 23, 2005 03:15 PM
Digg This!
Page 2 of 2
« previous page
WLI 8.1 cannot easily model the 2-of-3 security clearance example, or any other N-of-M where N>1. The language is limited: the parallel join condition is not sophisticated enough to select, say, two branches. BPEL is no better off, lacking even basic OR join capability that could satisfy Discriminator. (BPEL has an OR join, but it waits for each inbound path to complete, whereas the WLI 8.1 join accepts the first inbound path and discards the others.) The easiest way to implement the search engine example in BPEL is to run the searches in separate processes (Listing 3) that perform the work (line 3) and publish an event to announce when they are done (line 4). The main process (Listing 2) spawns the subprocesses asynchronously (the "invoke" statements in lines 2 and 3) and waits for the first of the completion events to arrive (the "receive" in line 4). The BPEL implementation of the security clearance example, shown in Listing 4, is similar: spawn (lines 2-5) the three checks as subprocesses, and wait for any two to complete (lines 5-6). WLI 8.1 could follow this approach too, perhaps using Message Broker subscriptions to catch the events.
Interleaved Parallel Routing: Supported by BPEL Only For a good example of Interleaved Parallel Routing, consider the case in which an applicant to the army must take three tests - dental, medical, and optical - one after the other, but in any order; when the applicant completes one test, the next one to take is determined by the availability of doctors (example suggested in Reference #6, p.10). The WLI 8.1 implementation is a combinatorial mess! The overall process, shown in Figure 4, starts with an Event Choice with separate paths for Dental, Optical, and Medical. The Dental event means that the applicant has been called in for a dental examination; the applicant responds by attending the examination (Attend Dental), before entering an inner Event Choice (shown collapsed in Figure 4), which models the remaining two appointments. The paths for medical and optical have the same form as dental. Figure 5 shows the expanded Event Choice structures for the three top-level choices. If the first choice had been dental, the next choice is between medical and optical. If called for medical, the applicant attends the medical appointment, and then waits to be called for the optical; if called for optical, the applicant attends the optical and waits for the medical. In total, six paths are required to model the permutations of dental, medical, and optical. If there had been four activities, 24 paths would have been needed; if five activities, 124 paths. Messy indeed! Alternative implementations should be considered on a case-by-case basis. BPEL, probably by accident rather than by design, has an elegant, linear solution. The idea is to place the activities in a parallel structure (the "flow" activity in lines 5-27 of Listing 5), but to force each activity to acquire a mutually exclusive, shared variable (defined in line 3) before running. The effect is that the activities run sequentially, but in indeterminate order. The key to this maneuver is the variableAccessSerializable flag in lines 6, 13, and 20, which ensures, in effect, that as soon as one of the scoped activities (optical in lines 6-12, dental in lines 13-19, medical in lines 20-26) accesses the variable, the others are locked out until the activity has completed. In the BPEL approach the order of activities is effectively random, determined by the proprietary low-level logic of the BPEL engine. This approach is not suitable for cases in which order is to be driven by application logic or external stimuli.
WLI 8.1 Scorecard
Summary References
Page 2 of 2 « previous page BEA WEBLOGIC LATEST STORIES
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
|
SYS-CON FEATURED WHITEPAPERS MOST READ THIS WEEK BREAKING NEWS FROM THE WIRES |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||