SlideShare a Scribd company logo
1 of 21
Download to read offline
Oracle SOA Suite 11g - Sample
SAMPLE NAME : adapters-db-102-Select
COMPONENT : DB Adapter
SAMPLE NAME : adapters-db-102-Select..................................................................... 1
COMPONENT : DB Adapter...................................................................................... 1
OVERVIEW ....................................................................................................................... 1
PROVIDED FILES............................................................................................................. 2
STEP BY STEP INSTRUCTIONS .................................................................................... 2
RUNNING THE PREBUILT SAMPLE ........................................................................ 2
INSTALLING & CONFIGURING............................................................................ 2
RUNNING THE SAMPLE......................................................................................... 2
VERIFYING EXECUTION....................................................................................... 3
BUILDING THE SAMPLE............................................................................................ 4
CREATE THE SOA PROJECT ................................................................................. 4
CREATE THE BPEL PROCESS............................................................................... 4
CREATE THE QUERYBYEXAMPLE REFERENCE............................................. 7
CREATE THE SELECT REFERENCE (ALTERNATIVE) ..................................... 9
CREATE THE PURE SQL REFERENCE (ALTERNATIVE)............................... 12
COMPLETE THE BPEL PROCESS........................................................................ 17
FURTHER DBADAPTER SAMPLES ............................................................................ 21
OVERVIEW
The Select tutorial shows how to invoke a DML select/insert/update/delete as
part of a larger BPEL process or independently as a web service call.
It is intended as the second tutorial for the DatabaseAdapter and is a companion
to MasterDetail, which shows an end to end process using Mediator.
Select is a popular choice for processes that at some point need some
information stored in a database.
There are really three ways to do a select: importing the tables and either
modeling an expression or using query by example, or choosing pure sql and
entering any sql. All three will be shown, but QueryByExample will be
highlighted; it may ultimately be the least practical but is the most fun to play with
when learning the product.
Oracle SOA Suite 11g - Sample
The MasterDetail tutorial shows running the SQL scripts, deploying samples from
Jdev, creating the SOA project and DBAdapter services and references, and
finally using the transform tool.
This tutorial will only show modeling the different selects, creating the BPEL
process, and using the Web Services test page.
PROVIDED FILES
This sample contains the SOA Project that you can deploy along with the sql
scripts.
STEP BY STEP INSTRUCTIONS
RUNNING THE PREBUILT SAMPLE
INSTALLING & CONFIGURING
• Go to sql/oracle and execute the SQL in setup.sql
• Open the jpr file in Jdeveloper, and deploy the sample to a running
WebLogic Server. For screen shots please see the MasterDetail sample
RUNNING THE SAMPLE
• Go to host:8001/soa-console
• Click on the Select composite and then on Test:
• Enter some values for what you want to match to records in the database.
The test page form is a little restrictive for dateTime and decimal values,
so best is just to uncheck “Include in Message” for those you don’t wish to
specify:
Oracle SOA Suite 11g - Sample
VERIFYING EXECUTION
• After hitting invoke from the test page you should then see something like
this:
Oracle SOA Suite 11g - Sample
BUILDING THE SAMPLE
Please see the Database Adapter documentation, specifically the Database
Adapter Wizard Walkthrough. Please also see the previous MasterDetail tutorial,
as many screen shots from there are not duplicated here.
CREATE THE SOA PROJECT
• Create a new SOAProject, with an empty composite in Jdeveloper. Don’t
forget to name it.
CREATE THE BPEL PROCESS
• Drag and drop a BPEL process onto the composite.xml:
Oracle SOA Suite 11g - Sample
• Choose Synchronous BPEL Process, and check ‘Expose as a SOAP
Service’.
• Now double click on the BPEL process:
Oracle SOA Suite 11g - Sample
• Drag two assigns and an invoke onto the flow:
• Now click on BPEL Services and drag and drop a Database Adapter onto
the right swim lane:
Oracle SOA Suite 11g - Sample
•
CREATE THE QUERYBYEXAMPLE REFERENCE
• Call the DBAdapter reference SelectMovies
• Choose the connection SOADemo that you created for MasterDetail
• Choose ‘Perform an Operation on a Table and unselect all but ‘Query By
Example’ (you can select multiple but for clarity will choose only one
here).
Oracle SOA Suite 11g - Sample
• Import the tables MOVIES and MOVIE_REVIEWS.
• Possibly edit which columns you wish to appear in the XML record. Note
if you exclude a column, it cannot be used in the where clause either:
Oracle SOA Suite 11g - Sample
• Query By Example returns an XML representing a collection of queried
records. It takes as input an XML element representing a single instance
of the output collection, an example XML.
• It is very easy to model and use, but down sides are the SQL is generated
differently each time which can be costly, it does not support complex
expressions, or even operators like not or like.
CREATE THE SELECT REFERENCE (ALTERNATIVE)
• Choose perform operation on a table and go with Select instead of Query
By Example:
• Import the tables MOVIES and MOVIE_REVIEWS
• On the Selection Criteria page click on edit:
Oracle SOA Suite 11g - Sample
• Now you want to Add an Expression, which will be title like a new
parameter, called title_param:
Oracle SOA Suite 11g - Sample
• After hitting hit Add click on Ok, your SQL at runtime should now look like:
Oracle SOA Suite 11g - Sample
• Creating the select this way still lets you import and select multiple tables,
and return nested XML records. And the expression creation tool is
simplistic but lets you use the basics: parameter binding, AND, OR, NOT,
LIKE, EQUALS, etc.
CREATE THE PURE SQL REFERENCE (ALTERNATIVE)
• Finally instead choose ‘Execute Pure SQL’:
Oracle SOA Suite 11g - Sample
• As you type any SQL expression the matching XSD is generated:
Oracle SOA Suite 11g - Sample
• This approach lets you generate any arbitrary SQL and have the matching
XSD generated. Some examples of things that would be impossible with
the previous two approaches are shown here:
• Select count (aggregate functions)
Oracle SOA Suite 11g - Sample
• Group by aggregates:
• Functions and order by:
Oracle SOA Suite 11g - Sample
• Complex sub queries:
• The benefits to Pure SQL is that you can use it whenever you encounter a
SQL that is too difficult to model with the previous two approaches. The
downsides are that: you must know the name of the tables to import; SQL
is hard to maintain, and not always easily portable to different database
platforms; and the output XML is never nested, you cannot model complex
relationships.
Oracle SOA Suite 11g - Sample
COMPLETE THE BPEL PROCESS
• After creating the Select DatabaseAdapter reference hook up the invoke
to the select:
• Click on automatically create variable for both input and output:
Oracle SOA Suite 11g - Sample
• Now click on the BPEL process, and expand on the Structure Panel on the
bottom left corner:
• Click on Edit Message Part… And change the Request Payload type to
be the type of the input to selectMovies:
Oracle SOA Suite 11g - Sample
• Now do the same for SelectResponseMessage, but this time choose <.>
MoviesCollection, as that is the output from selectMovies.
• Now the assigns should be very simple. It may not always be this easy to
change the Message types of other variables in BPEL. In those cases you
can use transforms. For Assign_1:
• Create this copy operation:
Oracle SOA Suite 11g - Sample
• Click Ok. For Assign_2 (after the invoke), create:
• Hit save all and you are now ready to deploy! This is the final result:
Oracle SOA Suite 11g - Sample
FURTHER DBADAPTER SAMPLES
This and MasterDetail complete the introductory tutorials for the Database
Adapter. Further tutorials will focus on specific adapter features, like different
polling strategies, ADT and XMLType support, and topics like performance and
scalability.

More Related Content

What's hot

Sqlpass The Magic Of Replication
Sqlpass   The Magic Of ReplicationSqlpass   The Magic Of Replication
Sqlpass The Magic Of Replicationsqlserver.co.il
 
Geek Sync | Field Medic’s Guide to Database Mirroring
Geek Sync | Field Medic’s Guide to Database MirroringGeek Sync | Field Medic’s Guide to Database Mirroring
Geek Sync | Field Medic’s Guide to Database MirroringIDERA Software
 
PLSSUG - Troubleshoot SQL Server performance problems like a Microsoft Engineer
PLSSUG - Troubleshoot SQL Server performance problems like a Microsoft EngineerPLSSUG - Troubleshoot SQL Server performance problems like a Microsoft Engineer
PLSSUG - Troubleshoot SQL Server performance problems like a Microsoft EngineerMarek Maśko
 
Advanced t sql - querying and programming inside sql server
Advanced t sql - querying and programming inside sql serverAdvanced t sql - querying and programming inside sql server
Advanced t sql - querying and programming inside sql serverVinod Kumar
 
Horizontal clustering configuration steps
Horizontal clustering configuration steps Horizontal clustering configuration steps
Horizontal clustering configuration steps TUSHAR VARSHNEY
 
Database Mirror for the exceptional DBA – David Izahk
Database Mirror for the exceptional DBA – David IzahkDatabase Mirror for the exceptional DBA – David Izahk
Database Mirror for the exceptional DBA – David Izahksqlserver.co.il
 
Sql Server 2008 Enhancements
Sql Server 2008 EnhancementsSql Server 2008 Enhancements
Sql Server 2008 Enhancementskobico10
 
Weblogic 12c Graphical Mode installation steps in Windows
Weblogic 12c Graphical Mode installation steps in Windows Weblogic 12c Graphical Mode installation steps in Windows
Weblogic 12c Graphical Mode installation steps in Windows webservicesm
 
Database concurrency and transactions - Tal Olier
Database concurrency and transactions - Tal OlierDatabase concurrency and transactions - Tal Olier
Database concurrency and transactions - Tal Oliersqlserver.co.il
 
OBIEE 11g: Configuring LDAP Server
OBIEE 11g: Configuring LDAP Server  OBIEE 11g: Configuring LDAP Server
OBIEE 11g: Configuring LDAP Server adivasoft
 
OBIEE11g Multi User Development - MUD
OBIEE11g  Multi User Development - MUDOBIEE11g  Multi User Development - MUD
OBIEE11g Multi User Development - MUDadivasoft
 
Web Services and Introduction of SOAPUI
Web Services and Introduction of SOAPUIWeb Services and Introduction of SOAPUI
Web Services and Introduction of SOAPUIDinesh Kaushik
 
Beyond EBR, Quantum Columns, Spook Joins and Virtual Integrity for ZDT Data V...
Beyond EBR, Quantum Columns, Spook Joins and Virtual Integrity for ZDT Data V...Beyond EBR, Quantum Columns, Spook Joins and Virtual Integrity for ZDT Data V...
Beyond EBR, Quantum Columns, Spook Joins and Virtual Integrity for ZDT Data V...Jeff Jacobs
 
NLOUG 2017- Oracle WebCenter Portal 12c Performance
NLOUG 2017- Oracle WebCenter Portal 12c PerformanceNLOUG 2017- Oracle WebCenter Portal 12c Performance
NLOUG 2017- Oracle WebCenter Portal 12c PerformanceDaniel Merchán García
 
BI Publisher Data model design document
BI Publisher Data model design documentBI Publisher Data model design document
BI Publisher Data model design documentadivasoft
 
Oracle Weblogic Server 11g: System Administration I
Oracle Weblogic Server 11g: System Administration IOracle Weblogic Server 11g: System Administration I
Oracle Weblogic Server 11g: System Administration ISachin Kumar
 
How to – wrap soap web service around a database
How to – wrap soap web service around a databaseHow to – wrap soap web service around a database
How to – wrap soap web service around a databaseSon Nguyen
 
Less10 2 e_testermodule_9
Less10 2 e_testermodule_9Less10 2 e_testermodule_9
Less10 2 e_testermodule_9Suresh Mishra
 
Using Selenium to Improve a Teams Development Cycle
Using Selenium to Improve a Teams Development CycleUsing Selenium to Improve a Teams Development Cycle
Using Selenium to Improve a Teams Development Cycleseleniumconf
 

What's hot (20)

Sqlpass The Magic Of Replication
Sqlpass   The Magic Of ReplicationSqlpass   The Magic Of Replication
Sqlpass The Magic Of Replication
 
Geek Sync | Field Medic’s Guide to Database Mirroring
Geek Sync | Field Medic’s Guide to Database MirroringGeek Sync | Field Medic’s Guide to Database Mirroring
Geek Sync | Field Medic’s Guide to Database Mirroring
 
PLSSUG - Troubleshoot SQL Server performance problems like a Microsoft Engineer
PLSSUG - Troubleshoot SQL Server performance problems like a Microsoft EngineerPLSSUG - Troubleshoot SQL Server performance problems like a Microsoft Engineer
PLSSUG - Troubleshoot SQL Server performance problems like a Microsoft Engineer
 
Advanced t sql - querying and programming inside sql server
Advanced t sql - querying and programming inside sql serverAdvanced t sql - querying and programming inside sql server
Advanced t sql - querying and programming inside sql server
 
Horizontal clustering configuration steps
Horizontal clustering configuration steps Horizontal clustering configuration steps
Horizontal clustering configuration steps
 
Database Mirror for the exceptional DBA – David Izahk
Database Mirror for the exceptional DBA – David IzahkDatabase Mirror for the exceptional DBA – David Izahk
Database Mirror for the exceptional DBA – David Izahk
 
Sql Server 2008 Enhancements
Sql Server 2008 EnhancementsSql Server 2008 Enhancements
Sql Server 2008 Enhancements
 
Weblogic 12c Graphical Mode installation steps in Windows
Weblogic 12c Graphical Mode installation steps in Windows Weblogic 12c Graphical Mode installation steps in Windows
Weblogic 12c Graphical Mode installation steps in Windows
 
Database concurrency and transactions - Tal Olier
Database concurrency and transactions - Tal OlierDatabase concurrency and transactions - Tal Olier
Database concurrency and transactions - Tal Olier
 
OBIEE 11g: Configuring LDAP Server
OBIEE 11g: Configuring LDAP Server  OBIEE 11g: Configuring LDAP Server
OBIEE 11g: Configuring LDAP Server
 
OBIEE11g Multi User Development - MUD
OBIEE11g  Multi User Development - MUDOBIEE11g  Multi User Development - MUD
OBIEE11g Multi User Development - MUD
 
Web Services and Introduction of SOAPUI
Web Services and Introduction of SOAPUIWeb Services and Introduction of SOAPUI
Web Services and Introduction of SOAPUI
 
Beyond EBR, Quantum Columns, Spook Joins and Virtual Integrity for ZDT Data V...
Beyond EBR, Quantum Columns, Spook Joins and Virtual Integrity for ZDT Data V...Beyond EBR, Quantum Columns, Spook Joins and Virtual Integrity for ZDT Data V...
Beyond EBR, Quantum Columns, Spook Joins and Virtual Integrity for ZDT Data V...
 
SQL Database Mirroring setup
SQL Database Mirroring setupSQL Database Mirroring setup
SQL Database Mirroring setup
 
NLOUG 2017- Oracle WebCenter Portal 12c Performance
NLOUG 2017- Oracle WebCenter Portal 12c PerformanceNLOUG 2017- Oracle WebCenter Portal 12c Performance
NLOUG 2017- Oracle WebCenter Portal 12c Performance
 
BI Publisher Data model design document
BI Publisher Data model design documentBI Publisher Data model design document
BI Publisher Data model design document
 
Oracle Weblogic Server 11g: System Administration I
Oracle Weblogic Server 11g: System Administration IOracle Weblogic Server 11g: System Administration I
Oracle Weblogic Server 11g: System Administration I
 
How to – wrap soap web service around a database
How to – wrap soap web service around a databaseHow to – wrap soap web service around a database
How to – wrap soap web service around a database
 
Less10 2 e_testermodule_9
Less10 2 e_testermodule_9Less10 2 e_testermodule_9
Less10 2 e_testermodule_9
 
Using Selenium to Improve a Teams Development Cycle
Using Selenium to Improve a Teams Development CycleUsing Selenium to Improve a Teams Development Cycle
Using Selenium to Improve a Teams Development Cycle
 

Similar to DBAdapters

Ten query tuning techniques every SQL Server programmer should know
Ten query tuning techniques every SQL Server programmer should knowTen query tuning techniques every SQL Server programmer should know
Ten query tuning techniques every SQL Server programmer should knowKevin Kline
 
Exploring plsql new features best practices september 2013
Exploring plsql new features best practices   september 2013Exploring plsql new features best practices   september 2013
Exploring plsql new features best practices september 2013Andrejs Vorobjovs
 
Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...
Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...
Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...Alex Zaballa
 
Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAsOracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAsAlex Zaballa
 
Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c  - New Features for Developers and DBAsOracle Database 12c  - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAsAlex Zaballa
 
Ob loading data_oracle
Ob loading data_oracleOb loading data_oracle
Ob loading data_oracleSteve Xu
 
Sql server 2012 tutorials writing transact-sql statements
Sql server 2012 tutorials   writing transact-sql statementsSql server 2012 tutorials   writing transact-sql statements
Sql server 2012 tutorials writing transact-sql statementsSteve Xu
 
Sql training
Sql trainingSql training
Sql trainingpremrings
 
Andrewfraserdba.com training sql_training
Andrewfraserdba.com training sql_trainingAndrewfraserdba.com training sql_training
Andrewfraserdba.com training sql_trainingmark jerald Canal
 
12c weblogic installation steps for Windows
12c weblogic installation steps for Windows12c weblogic installation steps for Windows
12c weblogic installation steps for WindowsCognizant
 
Oracle SOA Suite 12.2.1 new features
Oracle SOA Suite 12.2.1 new featuresOracle SOA Suite 12.2.1 new features
Oracle SOA Suite 12.2.1 new featuresMaarten Smeets
 
Adapters apps-101-orderimportconcurrentprogram
Adapters apps-101-orderimportconcurrentprogramAdapters apps-101-orderimportconcurrentprogram
Adapters apps-101-orderimportconcurrentprogramprathap kumar
 
Oracle Analytics Server Infrastructure Tuning guide v2.pdf
Oracle Analytics Server Infrastructure Tuning guide v2.pdfOracle Analytics Server Infrastructure Tuning guide v2.pdf
Oracle Analytics Server Infrastructure Tuning guide v2.pdfsivakodali7
 
Oracle olap-installation
Oracle olap-installationOracle olap-installation
Oracle olap-installationAmit Sharma
 

Similar to DBAdapters (20)

dbadapters
dbadaptersdbadapters
dbadapters
 
Ten query tuning techniques every SQL Server programmer should know
Ten query tuning techniques every SQL Server programmer should knowTen query tuning techniques every SQL Server programmer should know
Ten query tuning techniques every SQL Server programmer should know
 
Exploring plsql new features best practices september 2013
Exploring plsql new features best practices   september 2013Exploring plsql new features best practices   september 2013
Exploring plsql new features best practices september 2013
 
Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...
Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...
Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...
 
Erik_van_Roon.pdf
Erik_van_Roon.pdfErik_van_Roon.pdf
Erik_van_Roon.pdf
 
Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAsOracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAs
 
Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c  - New Features for Developers and DBAsOracle Database 12c  - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAs
 
Sql tuning
Sql tuningSql tuning
Sql tuning
 
Sql2008 (1)
Sql2008 (1)Sql2008 (1)
Sql2008 (1)
 
Ob loading data_oracle
Ob loading data_oracleOb loading data_oracle
Ob loading data_oracle
 
Sql server 2012 tutorials writing transact-sql statements
Sql server 2012 tutorials   writing transact-sql statementsSql server 2012 tutorials   writing transact-sql statements
Sql server 2012 tutorials writing transact-sql statements
 
Sql training
Sql trainingSql training
Sql training
 
Andrewfraserdba.com training sql_training
Andrewfraserdba.com training sql_trainingAndrewfraserdba.com training sql_training
Andrewfraserdba.com training sql_training
 
12c weblogic installation steps for Windows
12c weblogic installation steps for Windows12c weblogic installation steps for Windows
12c weblogic installation steps for Windows
 
Sql saturday oc 2019
Sql saturday oc 2019Sql saturday oc 2019
Sql saturday oc 2019
 
Oracle SOA Suite 12.2.1 new features
Oracle SOA Suite 12.2.1 new featuresOracle SOA Suite 12.2.1 new features
Oracle SOA Suite 12.2.1 new features
 
Adapters apps-101-orderimportconcurrentprogram
Adapters apps-101-orderimportconcurrentprogramAdapters apps-101-orderimportconcurrentprogram
Adapters apps-101-orderimportconcurrentprogram
 
Oracle Analytics Server Infrastructure Tuning guide v2.pdf
Oracle Analytics Server Infrastructure Tuning guide v2.pdfOracle Analytics Server Infrastructure Tuning guide v2.pdf
Oracle Analytics Server Infrastructure Tuning guide v2.pdf
 
Plantilla oracle
Plantilla oraclePlantilla oracle
Plantilla oracle
 
Oracle olap-installation
Oracle olap-installationOracle olap-installation
Oracle olap-installation
 

More from XAVIERCONSULTANTS (20)

Bpmedn
BpmednBpmedn
Bpmedn
 
Xavier mds upload
Xavier mds uploadXavier mds upload
Xavier mds upload
 
Xavier file adapter_filemoving
Xavier file adapter_filemovingXavier file adapter_filemoving
Xavier file adapter_filemoving
 
Day2 xslt x_path_xquery
Day2 xslt x_path_xqueryDay2 xslt x_path_xquery
Day2 xslt x_path_xquery
 
Custom faultpolicies
Custom faultpoliciesCustom faultpolicies
Custom faultpolicies
 
All adapterscommonproperties
All adapterscommonpropertiesAll adapterscommonproperties
All adapterscommonproperties
 
Adavanced faulthandling
Adavanced faulthandlingAdavanced faulthandling
Adavanced faulthandling
 
SoaFAQS
SoaFAQSSoaFAQS
SoaFAQS
 
Xpath
Xpath Xpath
Xpath
 
Readme
ReadmeReadme
Readme
 
Bpminto
BpmintoBpminto
Bpminto
 
Bpm
BpmBpm
Bpm
 
Bpmnt-102-edn-integration
Bpmnt-102-edn-integrationBpmnt-102-edn-integration
Bpmnt-102-edn-integration
 
Soaosbcourse_content
Soaosbcourse_contentSoaosbcourse_content
Soaosbcourse_content
 
Oracle soa course_content
Oracle soa course_contentOracle soa course_content
Oracle soa course_content
 
EVENT DELIVERY
EVENT DELIVERY EVENT DELIVERY
EVENT DELIVERY
 
jms-integration
jms-integrationjms-integration
jms-integration
 
Bpelprocess-manager
Bpelprocess-managerBpelprocess-manager
Bpelprocess-manager
 
SOA web services concepts
SOA web services conceptsSOA web services concepts
SOA web services concepts
 
Bpel activities to upload club oracle
Bpel activities to upload club oracleBpel activities to upload club oracle
Bpel activities to upload club oracle
 

Recently uploaded

Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsAndrey Dotsenko
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 

Recently uploaded (20)

The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 

DBAdapters

  • 1. Oracle SOA Suite 11g - Sample SAMPLE NAME : adapters-db-102-Select COMPONENT : DB Adapter SAMPLE NAME : adapters-db-102-Select..................................................................... 1 COMPONENT : DB Adapter...................................................................................... 1 OVERVIEW ....................................................................................................................... 1 PROVIDED FILES............................................................................................................. 2 STEP BY STEP INSTRUCTIONS .................................................................................... 2 RUNNING THE PREBUILT SAMPLE ........................................................................ 2 INSTALLING & CONFIGURING............................................................................ 2 RUNNING THE SAMPLE......................................................................................... 2 VERIFYING EXECUTION....................................................................................... 3 BUILDING THE SAMPLE............................................................................................ 4 CREATE THE SOA PROJECT ................................................................................. 4 CREATE THE BPEL PROCESS............................................................................... 4 CREATE THE QUERYBYEXAMPLE REFERENCE............................................. 7 CREATE THE SELECT REFERENCE (ALTERNATIVE) ..................................... 9 CREATE THE PURE SQL REFERENCE (ALTERNATIVE)............................... 12 COMPLETE THE BPEL PROCESS........................................................................ 17 FURTHER DBADAPTER SAMPLES ............................................................................ 21 OVERVIEW The Select tutorial shows how to invoke a DML select/insert/update/delete as part of a larger BPEL process or independently as a web service call. It is intended as the second tutorial for the DatabaseAdapter and is a companion to MasterDetail, which shows an end to end process using Mediator. Select is a popular choice for processes that at some point need some information stored in a database. There are really three ways to do a select: importing the tables and either modeling an expression or using query by example, or choosing pure sql and entering any sql. All three will be shown, but QueryByExample will be highlighted; it may ultimately be the least practical but is the most fun to play with when learning the product.
  • 2. Oracle SOA Suite 11g - Sample The MasterDetail tutorial shows running the SQL scripts, deploying samples from Jdev, creating the SOA project and DBAdapter services and references, and finally using the transform tool. This tutorial will only show modeling the different selects, creating the BPEL process, and using the Web Services test page. PROVIDED FILES This sample contains the SOA Project that you can deploy along with the sql scripts. STEP BY STEP INSTRUCTIONS RUNNING THE PREBUILT SAMPLE INSTALLING & CONFIGURING • Go to sql/oracle and execute the SQL in setup.sql • Open the jpr file in Jdeveloper, and deploy the sample to a running WebLogic Server. For screen shots please see the MasterDetail sample RUNNING THE SAMPLE • Go to host:8001/soa-console • Click on the Select composite and then on Test: • Enter some values for what you want to match to records in the database. The test page form is a little restrictive for dateTime and decimal values, so best is just to uncheck “Include in Message” for those you don’t wish to specify:
  • 3. Oracle SOA Suite 11g - Sample VERIFYING EXECUTION • After hitting invoke from the test page you should then see something like this:
  • 4. Oracle SOA Suite 11g - Sample BUILDING THE SAMPLE Please see the Database Adapter documentation, specifically the Database Adapter Wizard Walkthrough. Please also see the previous MasterDetail tutorial, as many screen shots from there are not duplicated here. CREATE THE SOA PROJECT • Create a new SOAProject, with an empty composite in Jdeveloper. Don’t forget to name it. CREATE THE BPEL PROCESS • Drag and drop a BPEL process onto the composite.xml:
  • 5. Oracle SOA Suite 11g - Sample • Choose Synchronous BPEL Process, and check ‘Expose as a SOAP Service’. • Now double click on the BPEL process:
  • 6. Oracle SOA Suite 11g - Sample • Drag two assigns and an invoke onto the flow: • Now click on BPEL Services and drag and drop a Database Adapter onto the right swim lane:
  • 7. Oracle SOA Suite 11g - Sample • CREATE THE QUERYBYEXAMPLE REFERENCE • Call the DBAdapter reference SelectMovies • Choose the connection SOADemo that you created for MasterDetail • Choose ‘Perform an Operation on a Table and unselect all but ‘Query By Example’ (you can select multiple but for clarity will choose only one here).
  • 8. Oracle SOA Suite 11g - Sample • Import the tables MOVIES and MOVIE_REVIEWS. • Possibly edit which columns you wish to appear in the XML record. Note if you exclude a column, it cannot be used in the where clause either:
  • 9. Oracle SOA Suite 11g - Sample • Query By Example returns an XML representing a collection of queried records. It takes as input an XML element representing a single instance of the output collection, an example XML. • It is very easy to model and use, but down sides are the SQL is generated differently each time which can be costly, it does not support complex expressions, or even operators like not or like. CREATE THE SELECT REFERENCE (ALTERNATIVE) • Choose perform operation on a table and go with Select instead of Query By Example: • Import the tables MOVIES and MOVIE_REVIEWS • On the Selection Criteria page click on edit:
  • 10. Oracle SOA Suite 11g - Sample • Now you want to Add an Expression, which will be title like a new parameter, called title_param:
  • 11. Oracle SOA Suite 11g - Sample • After hitting hit Add click on Ok, your SQL at runtime should now look like:
  • 12. Oracle SOA Suite 11g - Sample • Creating the select this way still lets you import and select multiple tables, and return nested XML records. And the expression creation tool is simplistic but lets you use the basics: parameter binding, AND, OR, NOT, LIKE, EQUALS, etc. CREATE THE PURE SQL REFERENCE (ALTERNATIVE) • Finally instead choose ‘Execute Pure SQL’:
  • 13. Oracle SOA Suite 11g - Sample • As you type any SQL expression the matching XSD is generated:
  • 14. Oracle SOA Suite 11g - Sample • This approach lets you generate any arbitrary SQL and have the matching XSD generated. Some examples of things that would be impossible with the previous two approaches are shown here: • Select count (aggregate functions)
  • 15. Oracle SOA Suite 11g - Sample • Group by aggregates: • Functions and order by:
  • 16. Oracle SOA Suite 11g - Sample • Complex sub queries: • The benefits to Pure SQL is that you can use it whenever you encounter a SQL that is too difficult to model with the previous two approaches. The downsides are that: you must know the name of the tables to import; SQL is hard to maintain, and not always easily portable to different database platforms; and the output XML is never nested, you cannot model complex relationships.
  • 17. Oracle SOA Suite 11g - Sample COMPLETE THE BPEL PROCESS • After creating the Select DatabaseAdapter reference hook up the invoke to the select: • Click on automatically create variable for both input and output:
  • 18. Oracle SOA Suite 11g - Sample • Now click on the BPEL process, and expand on the Structure Panel on the bottom left corner: • Click on Edit Message Part… And change the Request Payload type to be the type of the input to selectMovies:
  • 19. Oracle SOA Suite 11g - Sample • Now do the same for SelectResponseMessage, but this time choose <.> MoviesCollection, as that is the output from selectMovies. • Now the assigns should be very simple. It may not always be this easy to change the Message types of other variables in BPEL. In those cases you can use transforms. For Assign_1: • Create this copy operation:
  • 20. Oracle SOA Suite 11g - Sample • Click Ok. For Assign_2 (after the invoke), create: • Hit save all and you are now ready to deploy! This is the final result:
  • 21. Oracle SOA Suite 11g - Sample FURTHER DBADAPTER SAMPLES This and MasterDetail complete the introductory tutorials for the Database Adapter. Further tutorials will focus on specific adapter features, like different polling strategies, ADT and XMLType support, and topics like performance and scalability.