Pages

Thursday, December 23, 2010

Oracle SOASuite Basics

SOA Suite Components
  • Mediator and Service Bus—Disambiguation
Similar to Mediator, Oracle Service Bus also performs mediation activities in Oracle SOA Suite.While both the Mediator and the Service Bus can perform such tasks as interface and data mapping, routing,
and filtering, their scopes are very different: the Mediator is a component that performs intra-composite mediation, to connect components within a given composite. The Service Bus on the other hand is in charge of inter-composite mediation, that is to say that it connects differentcomposites together—and while doing that, it can also carry out other fundamental tasks of a service bus such as service virtualization, protocol translation, service pooling, and so on.


  • Relationship of Applications, Projects, and Composites in JDeveloper
A JDeveloper (JDev) application contains one or more JDev projects. When you are developing SOA technologies, a JDev project is equal to a composite application.

CreditCardApplication
|
|---- JDev Project ( CCValidation) ---- SOA Composite (CCValidation )
|
|----JDev Project ( AccountRegistration) ---- SOA Composite ( AccountRegistration )


  • About the Adapter Wizards
Most adapter wizards follow a common flow explained in below diagram -

 
First give name to the new adapter. Then establish a connection to the target system: it could be a database, some application—or even just a file system (in which case, it is not really a connection, but simply a path). After this, select an operation—the operations that are offered by the wizard will of course be different for each target system: a database will offer the expected SQL operations
(select, insert, delete, and a few more), a file system will be read or write, and so on. Finally, in the last stage,  specify the objects on which you are going to be operating: database tables, specific files, or directories in the file system, records in an application and so on.


Will add more to it.

Saturday, December 18, 2010

Understanding Taskflow Train

Understanding navigations in Taskflow with train

This post illustrate different kind of manipulation with navigation in Taskflow with train.

Create Taskflow with train
A taskflow with train can be created by selecting CreateTrain checkbox in CreateTaskflow wizard.

Add train component to each train stop view.



Change the label for the train stop in the train component -
Select the train stop (view activity) in the diagram and look at the property inspector, choose the Train Stop tab and set the value of display-name property to a string or an EL Expression



1. Simple Train -

Added a input parameter skipValue to Taskflow for later use. Value passed is the name of viewActivity.

Use skip property of train stop to stop access to a viewActivity of the Train -
 Using the taskflow parameter to update the skip property of activity to skip the train sequence.




By default a train is sequential. For a non-sequential behaviour pass modify the sequential property of the TrainStop. 


Drag and drop the taskflow as a region on page and analyze the output.
Navigation to stview4 can be done directly. It's no more sequential. 
Also stview3 is skipped in train navigation. 


2. Complex Train - 

How to call a view activity between two train stops -

Created a taskflow with train having three view activity.  Here we are trying to make a method call when navigating from view1 to view2 .

Drag and drop wildCard Control Flow rule and method. Use control flow case as mentioned in below diagram. 



ctView1 contains a button with action "addText".


For direct navigation without calling method use train. To invoke methodcall use button with action "addText".


Application can be download from here.

Use SQL subquery and SQL OPERATOR ( IN, BETWEEN) in ViewCriteria

Use SQL subquery and SQL OPERATOR ( IN, BETWEEN) in ViewCriteria


This post will illustrate how to use IN,BETWEEN operators in ViewCriteria. How to use the SQL subquery with ViewCriteria.

In this application, HRAppModuleImpl.java contains a method applyCustomCriteria() with three input parameters - departmentIdVar, lowSalaryVar, and highSalaryVar. Expose this method and test .
Below steps explains the code in snapshot below-
1.Create ViewCriteria using createViewCriteria().
2.Create ViewCriteriaRow using createViewCriteriaRow().
3.Create String with required where Clause.
4.Create ViewCriteriaItem  using ensureCriteriaItem. 
5.Use setOperator() to set the sqlOperator. Use JboCompOper. class to find list of supported operators.
6.Use setValue() method of ViewCriteriaItem to set value . Incase of IN/BETWEEN operator, add multiple values. For sql subquery for IN operator, simply use setValue.
8.Use addElement method to ViewCriteriaRow to VC.
9.Use applyViewCriteria to apply created viewCriteria.






 Expose Method -



Run AM and pass parameters to method -

Project can be downloaded from here.