Databases Reference
In-Depth Information
Switch to the composite view in JDeveloper, next place your mouse over the yellow
arrow on the StockOrder process (the one to add a new Reference ). Click and hold
your mouse button, then drag the arrow onto the blue arrow on the StockQuote
process (the one that represents the Service Interface ), then release, as shown in the
following screenshot:
This will wire these two processes together and create a corresponding partner link
in the StockOrder process. From here, implement the required steps to invoke the
process operation of the StockQuote process, making sure that they are included
within the while loop.
Using the switch activity
Remember our requirement is that we return success if the price matches or is better
than the one specified in the order. Obviously, whether the price is better depends on
whether we are selling or buying. If we are selling we need the price to be equal to or
greater than the asking price; whereas if we are buying, we need the price to be equal
to or less than the asking price.
So for this, we will introduce the <switch> activity. Drag a <switch> activity from
the Process Activities list of the Component Palette on to your process after the
invoke activity for the StockQuote service. Next, click on the plus symbol to expand
the <switch> activity. By default, it will have two branches illustrated as follows:
 
Search WWH ::




Custom Search