Upload
abraham-rougerio-unzueta
View
188
Download
5
Embed Size (px)
Citation preview
1
2Understanding Basic Concepts and Architecture2
Copyright © 2005, Oracle. All rights reserved.
and Architecture
Objectives
After completing this lesson, you should be able to:• Identify the standards and architecture for service-
oriented architecture (SOA) • Describe the basic concepts of Oracle BPEL
P M
2-2 Copyright © 2005, Oracle. All rights reserved.
Process Manager • Explain the Oracle BPEL Process Manager
architecture• Describe Oracle Integration products• Install and configure JDeveloper BPEL Designer
and Manager
Services and Composite Applications
Application for cell phoneplan activation
SMS Activation ManagerGPRS Activation Manager
Roaming Activation Manager
A composite application combines multiple services, applications, or systems.
2-3 Copyright © 2005, Oracle. All rights reserved.
Process floworchestration
Roaming Activation Manager
Automatic payment approval
Service not available exception
Billing services
Credit card payment servicesPayment services
Application server
Credit check service
ADF
New plan selection–
user interface
2
Service-Oriented Architecture
Service-oriented architecture (SOA) is:• An architectural style for loose coupling
between interacting software agents• A set of components that can be invoked
2-4 Copyright © 2005, Oracle. All rights reserved.
• Enabled through a set of standards
Service provider
Service consumer
Service request
Service response
Life Cycle of Service-Oriented Architecture Applications
Developservices
Composeservices
Secure and federate
2-5 Copyright © 2005, Oracle. All rights reserved.
services
Orchestrateservices
Discover andaccess
Provision and manage
and federate
Service-Oriented Architecture: Components
Web client(Self-service)
.NET client(Support)
APPLICATION
PortalsJ2EE applicationsServlets
Portal(Self-service)
PROCESS FLOWS
BPEL
2-6 Copyright © 2005, Oracle. All rights reserved.
BUSINESSSERVICES
XML, XML schemaWSDL/WSIFSOAP, JCA, JMS
JDBC
.NET/Axis
SOAP
WSDL
Database
WSDL
Mainframe
JMS
WSDL
Packaged apps
JCA
WSDL
EJBs
RMI
WSDL
Management and security WS-SecurityWS-Policy, SAML
BPELXSLTXQuery
Orchestration
3
Introducing Web Services
Web services:• Are self-describing business functions• Allow connections between services from any
Web-connected device by using:
2-7 Copyright © 2005, Oracle. All rights reserved.
– A set of standard messaging protocols– Programming standards– Network registration
Web serviceWeb browser
Request
Response
Web Service Architecture and Standards
WSILbrowser
2Register (UDDI)3 Find
(UDDI)
Find Locate
2-8 Copyright © 2005, Oracle. All rights reserved.
Web service
ServiceimplementationWeb service
Client application
Web servicesdirectory
InternetInterface(WSDL)
1Generate
WSDL
Invoke request (SOAP)
Send response(SOAP)
4
5
Notes Only Page
2-9 Copyright © 2005, Oracle. All rights reserved.
4
SOAP Message Structure
A SOAP message is a unit of communication, containing:• Optional HTTP headers• An envelope enclosing the
payload• A SOAP header with zero
SOAP messageHTTP headers
SOAP envelope
SOAP header
1
2
2-10 Copyright © 2005, Oracle. All rights reserved.
SOAP content styles
• A SOAP header with zero or more headers blocks
• A SOAP body containing a collection of zero or more message elements
• XML-encoded style message elements, with the doc-literal style, as recommended by the WS-Interoperability standard
SOAP body
Headers
Message nameand data
3
RPC-encodedDoc-encoded
Doc-literalRPC-literal
A SOAP Example
Request(RPC-literal)
<SOAP-ENV:Envelope><SOAP-ENV:Body>
<GetStockQuotexmlns="urn:stock-quotes" >
<StockSymbol>ORCL</StockSymbol></GetStockQuote>
</SOAP ENV B d >
2-11 Copyright © 2005, Oracle. All rights reserved.
Response(RPC-literal)
</SOAP-ENV:Body></SOAP-ENV:Envelope>
<SOAP-ENV:Envelope><SOAP-ENV:Body>
<GetStockQuoteResponsexmlns="urn:stock-quotes" >
<USD_Price>15.25</USD_Price></GetStockQuoteResponse>
</SOAP-ENV:Body></SOAP-ENV:Envelope>
Service Invocation
Services can be:• Synchronous
C llb k
<creditRating>560
</creditRating>
2-12 Copyright © 2005, Oracle. All rights reserved.
• Asynchronous
• Secured
Callback location 10:05 Receive order
10:10 Processing….10:25 <risk>4</risk>
<Patient>Disease A</Patient>
Network-centric
5
Orchestrating Services Through BPEL
PortalWeb service
Java service
2-13 Copyright © 2005, Oracle. All rights reserved.
UI
J2EE
Tomcat
ERPSAP, Oracle
User tasks
Databasestored procedures
?c
BPEL
What Is BPEL?
BPEL is:• A markup language for composing a set of
discrete services into an end-to-end process flow• A mechanism for asynchronous interactions,
parallel processing and exception management
2-14 Copyright © 2005, Oracle. All rights reserved.
<process><partnerLinks><partnerLink name="service-name" ... />
</partnerLinks><variables><variable name="var-name"
messageType="type"/></variables><sequence name="main"><receive .../><assign><copy><to.../><from.../></copy></assign><reply .../></sequence></process>
parallel processing, and exception managementSalesDB
EndRouter Billing
Start
Duplicate number!
BPEL source
Benefits of BPEL
BPEL:• Integrates a set of services to implement business
processes• Defines a sequence of activities, called a process
flow using a standard XML application language
2-15 Copyright © 2005, Oracle. All rights reserved.
flow, using a standard XML application language• Supports definition and invocation of
synchronous and asynchronous services• Enables structured message data to be exchanged
with invoked services• May be constructed visually with designer tools,
such as JDeveloper BPEL Designer• Provides its process flow as a service
6
Standards: Building Blocks of BPEL
Quality ofservice
Businessprocesses
Transactions
WS-securityWS-reliability
Orchestration: BPEL4WS
men
t
Choreography: CDL4WS
Coordination
2-16 Copyright © 2005, Oracle. All rights reserved.
Description
Transport
Message
Discovery
Description
HTTP, IIOP, JMS, SMTP
XML
SOAP
WSDL
UDDI
Context
Man
agem
Oracle BPEL Process Manager Architecture
• Plug-and-play• Cross-platform• Scalable
BPEL Process Manager
JDeveloper, Eclipse
BPEL Designer
BPEL
Deploy
2-17 Copyright © 2005, Oracle. All rights reserved.
J2EE application server(Oracle AS, WebLogic, JBoss, WebSphere)
Core BPEL engine
WSDL binding Built-in integration services
File, FTP
Web service
Java, JMS, JCA
Database
XQuery XSLT Usertasks
Dehydration store
(Oracle DB)
Java/J2EE
iWay
Manage
BPELConsole
Develop
Notes Only Page
2-18 Copyright © 2005, Oracle. All rights reserved.
7
Oracle BPEL Process Manager: Key Features
Modeling Connectivity Execution run time MANAGEMENTManagement
BPEL Designer
WSDLBindings
BPEL Engine
BPELConsole
2-19 Copyright © 2005, Oracle. All rights reserved.
BPEL, XQuery, XSLT, WS-ADDRESSING
Modeling Connectivity Execution run time MANAGEMENTManagement• Comprehensive BPEL 1.1 • Visual modeling tool• Native Java embedding• XML facade• XQuery transformation• Detailed error reporting• Ant-based build and
deployment framework• Versioning
• Bindings to 100+ backend systems (JCA)
• JMS bridge• .NET, Axis, Workshop,
Glue, Systinet, interop• User tasks/workflow• E-mail with attachment
• Comprehensive BPEL 1.1• Sync. messaging• Async. messaging• Context dehydration• Reliability• Side-by-side versioning• Compensating transactions• Clustering• Large XML documents
• Visual monitoring• Auditing• BPEL debugging• In-flight administration• Performance tuning• Task management• Partitioning/Domains
Application server (Oracle, WebLogic, WebSphere, JBoss)
BPEL Process Manager Server
defaultjar
deploy
DomainsBPEL
suitcase
BPELBPEL process manager
BPEL
2-20 Copyright © 2005, Oracle. All rights reserved.
BPEL Designer
J2EE application server(Oracle AS, WebLogic, JBoss, WebSphere)
WSDL adapters Built-in integration services
JCA
Web service
JMS
Database
Xquery/XSLT
Workflowservice
Oracle DBSensors
Files
Manage
BPELConsole
Core BPEL engine
Core Engine Architecture
Project 1.0
P j t 1 1Manage
Lifecycle
Delivery
Loader
DispatcherBPELConsole
2 3
4
2-21 Copyright © 2005, Oracle. All rights reserved.
Project 1.1
Adapters
J2EE code
Messaging
g
Console
Java delegate
SOAP gateway
Worklist
Engine
Persistence service
Write-through cache
WSIF
JCA
Java
JMS
ClientAPI
1
8
Notes Only Page
2-22 Copyright © 2005, Oracle. All rights reserved.
Performance and Scalability
Compact binary DOMLazy loading• Smart partitioning• W3C DOM interface
Write-through cacheBPELserver
BPEL-optimizedSOAP stack
ance
r
App. server
2-23 Copyright © 2005, Oracle. All rights reserved.
W3C DOM interface• Support for large
documents
Dehydration store(Oracle database)
App. server
BPELserver
BPELserver Support for large BPEL
processes (20,000+ activities)Stateless architecture
• Clustering• Failover
Load
bal
App. server
Service Adapters
.NET, Axis Web services
Java, JCA components
Database
WSDL
WSDL
WSDL
2-24 Copyright © 2005, Oracle. All rights reserved.
200+ iWay adapters
JMS queue or topic
Oracle E-Business Suite
XML,WSIF,JCA
BPEL
Files
WSDL
WSDL
WSDL
WSDL
9
Integrated Adapters
2-25 Copyright © 2005, Oracle. All rights reserved.
Oracle Application Server Adapters
Enterprise-strength infrastructure for connectivity to Enterprise Information Systems (EIS)
Oracle Application Server
OC4JE-Business
Suite
• Bidirectional connectivity• Service-oriented
architecture (SOA)• Open standards support
– WSIF– WSDL
BPEL PMJ2CA
Native APIs
2-26 Copyright © 2005, Oracle. All rights reserved.
Repository API
XSDrepository
Legacy applications
Packaged applications
File/FTP, JMS, AQ, RDBMS
– J2CA– WSIL– SOAP
• Managed through Oracle application server
• Seamless integration with Oracle products
Adapter
BSE
B2B
InterConnect
BAM
J2CA
SOAP request/response
APIs
WSDL/SOAP
Data Transformation Services
The BPEL Designer provides:• A built-in data transformation component• An XSLT Mapper that uses XPath, XSD, and XSL to
specify transformations visually
2-27 Copyright © 2005, Oracle. All rights reserved.
• A test tool to perform in-linetransformation tests duringdevelopment
10
Oracle BPEL Process Manager: Methodology
Exposeservices Flow ExceptionTransformation
2-28 Copyright © 2005, Oracle. All rights reserved.
User tasks
workflow
Unit test
Performance testAuditSensorsMonitor
Change
Oracle Integration
BAMBPMB2B Data HubInterConnect
2-29 Copyright © 2005, Oracle. All rights reserved.
Enterprise Service Bus
AdaptersRoutingTransformationMessaging
Oracle Integration InterConnect
Transformation Routing iStudio
2-30 Copyright © 2005, Oracle. All rights reserved.
Adapter
SAP JavaMQ seriesDatabase
Oracle database
Messaging
Adapter Adapter Adapter
11
Oracle Integration B2B
Oracle AS integration B2B serverSecurity MIME, S/MIME
E-Business Suite
Trading partner management
2-31 Copyright © 2005, Oracle. All rights reserved.
Oracle databaseOracle application server
Core B2B engine
Exchange interfaces
RNIF AS2 Generic
Document interfaces
PIP EDI Generic
TransportHTTPs, FTPs, File, SMTP, IMAPLegacy
applications
File/FTP, JMS, AQ, RDBMS
Packaged applications
Oracle Integration BAM
Sensors
B ilt i
BPEL PM
B2B
Oracle integration BAMBPELPM BAM
ModelingDashboard
2-32 Copyright © 2005, Oracle. All rights reserved.
Actual cube
Target cube
B2B engine
Built-in processorsInterConnect
SDK Correlation KPI Alerts
InterConnect
Oracle database
Installing Oracle BPEL Software
2-33 Copyright © 2005, Oracle. All rights reserved.
12
Oracle BPEL Process Manager: Components
Oracle BPEL Process Manager
2-34 Copyright © 2005, Oracle. All rights reserved.
Oracle Litedatabase
JDeveloperBPEL Designer
BPELConsole
Creating Connections
Use the JDeveloper Connections - Navigator to create connections for:
The BPEL Process Manager Server
2-35 Copyright © 2005, Oracle. All rights reserved.
A database, such as the Oracle Lite database
Creating the BPEL PM Server Connection
1
3
2-36 Copyright © 2005, Oracle. All rights reserved.
2
13
Creating the Database Connection
1 2
2-37 Copyright © 2005, Oracle. All rights reserved.
3
Creating the Database Connection
4 5
6
2-38 Copyright © 2005, Oracle. All rights reserved.
7
Summary
In this lesson, you should have learned how to:• Identify the standards and architecture for SOA • Describe the basic concepts of Oracle BPEL
Process Manager
2-39 Copyright © 2005, Oracle. All rights reserved.
• Explain the Oracle BPEL Process Manager architecture
• Describe Oracle Integration products• Install and configure JDeveloper BPEL Designer
and Manager
14
Practice for Lesson 2
Installing BPEL Designer and Process Manager
2-40 Copyright © 2005, Oracle. All rights reserved.
1
3Building a Simple BPEL Process 3Copyright © 2005, Oracle. All rights reserved.
Objectives
After completing this lesson, you should be able to:• Use JDeveloper BPEL Designer to design a simple
BPEL process• Create a synchronous BPEL process
3-2 Copyright © 2005, Oracle. All rights reserved.
• Deploy the BPEL process• Use the run-time server to run the process• Manage and administer the process
The BPEL StandardSome of the key foundation points of BPEL are:• Asynchrony: Asynchronous interactions• Flow coordination: Parallel flow of execution• Exception management: Handling exceptions
SalesDB Start
3-3 Copyright © 2005, Oracle. All rights reserved.
Duplicate number!
End
Router
Billing
2
Notes Only Page
3-4 Copyright © 2005, Oracle. All rights reserved.
JDeveloper BPEL Designer
Applications
Editor pane Component Palette
3-5 Copyright © 2005, Oracle. All rights reserved.
Applications -Navigator
Structure paneMessage log
The HelloWorld Process
<input>Name</input>Request:
Response:
3-6 Copyright © 2005, Oracle. All rights reserved.
HelloWorldBPEL process
Client
Concatenate
"Hello " + Name
<result>Hello Name</result>
3
Creating the HelloWorld Process
Create a workspace and a synchronous
BPEL project. Assign text to output message.
Create connections.
13
2
3-7 Copyright © 2005, Oracle. All rights reserved.
Build, deploy,
and test.
4
Creating a New Workspace
1
3-8 Copyright © 2005, Oracle. All rights reserved.
2
3
Creating a New Project
12
3-9 Copyright © 2005, Oracle. All rights reserved.
3
4
Initial State of the BPEL Process
By selecting Synchronous BPEL Process, a skeleton is
created along with all the
3-10 Copyright © 2005, Oracle. All rights reserved.
necessary source files.
Project file
BPEL deployment descriptor:Contains metadata regarding
Workspace
Anatomy of a BPEL Project
3-11 Copyright © 2005, Oracle. All rights reserved.
the HelloWorld process
BPEL source file:Defines this BPEL process
WSDL interface of this process:Initiates the HelloWorld BPEL process
Adding an Assign Activity to the Process
• Copies text from a source to an output message• Drag an Assign activity and drop it between the
receiveInput and replyOutput activities.
3-12 Copyright © 2005, Oracle. All rights reserved.
5
Creating a Copy Rule
1 2
XPath expression builder icon3
3-13 Copyright © 2005, Oracle. All rights reserved.
4
Using the XPath Expression Builder
Functiontypes
2
3
3-14 Copyright © 2005, Oracle. All rights reserved.
1
BPEL Process Source Structure
<process><!-- Partner Links Section: services --><partnerLinks>
<partnerLink name="service-name" .../></partnerLinks><!-- Process Variables Section: message data -->
3-15 Copyright © 2005, Oracle. All rights reserved.
<! Process Variables Section: message data ><variables>
<variable name="var-name" messageType="type"/></variables><!-- ORCHESTRATION LOGIC --><!-- Activity Flow Section: activities --><sequence name="main">
<receive .../><assign><copy><from...><to...></copy></assign><reply .../>
</sequence></process>
6
BPEL Activities in HelloWorld
The <sequence> activity, which contains:• A <receive> activity• An <assign> activity, which includes a <copy>
element with:A l t if i th f d t
3-16 Copyright © 2005, Oracle. All rights reserved.
– A <from> element specifying the source of data– A <to> element specifying the destination for data
• A <reply> activityNote: BPEL variables are used to store data that is used by activities and communicated between clients and services.
The HelloWorld BPEL Source
<sequence name="main"><receive name="receiveInput" partnerLink="client"
portType="client:HelloWorld" operation="process" variable="inputVariable" createInstance="yes"/>
<assign name="createReturnStr"><copy><from expression="concat("Hello " bpws:getVariableData('inputVariable' 'pa
3-17 Copyright © 2005, Oracle. All rights reserved.
",bpws:getVariableData('inputVariable','payload','/client:HelloWorldProcessRequest/client:input'))"/>
<to variable="outputVariable" part="payload" query="/client:HelloWorldProcessResponse/client:result"/>
</copy></assign><reply name="replyOutput" partnerLink="client"
portType="client:HelloWorld" operation="process" variable="outputVariable"/>
</sequence>
Notes Only Page
3-18 Copyright © 2005, Oracle. All rights reserved.
7
BPEL Depends on WSDL and WSDL Extensions
Service implementation
definition
Service
Port
3-19 Copyright © 2005, Oracle. All rights reserved.
Service interface definition
Binding
Port types define operations
Message
Type
The HelloWorld Design-Time WSDL Source
<?xml version="1.0" encoding="UTF-8"?><definitions name="HelloWorld" ...><types><schema ...><element name="HelloWorldProcessRequest">
<complexType><sequence><element name="input" type="string"/>
</sequence></complexType></element> ...
</schema></types>
3-20 Copyright © 2005, Oracle. All rights reserved.
</schema></types><message name="HelloWorldRequestMessage"><part name="payload" element="client:HelloWorldProcessRequest"/>
</message> ...<portType name="HelloWorld"><operation name="process"><input
message="client:HelloWorldRequestMessage"/><output
message="client:HelloWorldResponseMessage"/></operation></portType> ...</definitions>
Notes Only Page
3-21 Copyright © 2005, Oracle. All rights reserved.
8
Validating and Deploying a BPEL Process
Validation and deployment can be performed by using:• Command-line tools and scripts installed with
Oracle BPEL Process Manager• Oracle JDeveloper BPEL Designer
3-22 Copyright © 2005, Oracle. All rights reserved.
HelloWorld.bpelbpel.xml
HelloWorld.wsdl
Build
HelloWorld project
obant
bpel_HelloWorld_1.0.jar
BPEL PM server
Domaindefault
Deploy
bpelc
Deployment with JDeveloper
1
3-23 Copyright © 2005, Oracle. All rights reserved.
2
34
<?xml version = '1.0' encoding = 'UTF-8'?><BPELSuitcase>
<BPELProcess id="HelloWorld" src="HelloWorld.bpel">
<partnerLinkBindings><partnerLinkBinding name="client"><property name="wsdlLocation">HelloWorld.wsdl</property></partnerLinkBinding>
The BPEL Suitcase
3-24 Copyright © 2005, Oracle. All rights reserved.
</partnerLinkBindings></BPELProcess>
</BPELSuitcase>
Deployment directory:
bpelc
9
Notes Only Page
3-25 Copyright © 2005, Oracle. All rights reserved.
Testing the Process
1
2
3-26 Copyright © 2005, Oracle. All rights reserved.
3
4
Auditing and Debugging the Instance
3-27 Copyright © 2005, Oracle. All rights reserved.
10
BPEL Activities
Primitive activities:<invoke><receive><assign>< l >
Structured activities:<sequence><switch><pick><fl >
3-28 Copyright © 2005, Oracle. All rights reserved.
<reply><throw><terminate><wait>
<flow><while><scope>
Note: These activities may contain primitive and structured activities.
Summary
In this lesson, you should have learned how to:• Use JDeveloper BPEL Designer to design a simple
BPEL process• Create a synchronous BPEL process
3-29 Copyright © 2005, Oracle. All rights reserved.
• Deploy the BPEL process• Use the run-time server to run the process• Manage and administer the process
Practice 3: Creating the HelloWorldProcess
3-30 Copyright © 2005, Oracle. All rights reserved.
1
4Orchestrating Services with BPEL 4Copyright © 2005, Oracle. All rights reserved.
Objectives
After completing this lesson, you should be able to:• Choose the appropriate JDeveloper BPEL
Designer templates• Orchestrate services in BPEL by:
4-2 Copyright © 2005, Oracle. All rights reserved.
– Invoking a synchronous service– Invoking an asynchronous service
• Describe how WS-Addressing is used to enable asynchronous service invocation
Orchestrating Services Through BPEL
PortalWeb service
Java service
?
4-3 Copyright © 2005, Oracle. All rights reserved.
UI
J2EE
TOMCAT
ERP,SAP, Oracle
User tasks
Databasestored procedures
?
BPEL
2
Developing a BPEL Service
• A BPEL process is a service that may be invoked by other services.
• A BPEL service can be developed by:– Using a visual design tool such as Oracle BPEL
Designer
4-4 Copyright © 2005, Oracle. All rights reserved.
Designer– Editing the BPEL elements with a text editor
• Using Oracle BPEL Designer templates, you can start to create the BPEL services for:– A synchronous service– An asynchronous service– An empty service
Initial Structure of a Synchronous Service
To receive input
To call this process
4-5 Copyright © 2005, Oracle. All rights reserved.
To return output
Initial Structure of an Asynchronous Service
To receive input
To call this process
4-6 Copyright © 2005, Oracle. All rights reserved.
For the asynchronous
callback
3
Initial Structure of an Empty Service
E t
4-7 Copyright © 2005, Oracle. All rights reserved.
Empty process
To design a process flow as a client to initiate other services
Synchronous Services
A synchronous service:• Processes input• Returns an immediate response
Example: Invoking a credit rating Web service
4-8 Copyright © 2005, Oracle. All rights reserved.
Transport (SOAP over HTTP)
CreditRatingRequestMessage
CreditRatingResponseMessage
Web serviceFunctional building block process returns credit rating.
Self-described interface (WSDL)
Partner Links and Service Invocation
Invoking a BPEL process requires:• A <partnerLink> that encapsulates a definition
of how to access a service by using WSDL• An <invoke> activity to initiate an operation
id d b th i
4-9 Copyright © 2005, Oracle. All rights reserved.
BPEL process
provided by the service
Client ServiceInvoke
Service description(WSDL)
WSILbrowser
Partnerlink
Partnerlink
4
Partner Links
<receive>
Deployment descriptor (bpel.xml)nk
inputVariable<variable>Request Message
on
Credit servicePartner link
prepare crInput<assign>
d1
crInput<variable>
4-10 Copyright © 2005, Oracle. All rights reserved.
BPEL processWSDL
Call service<invoke>
Clie
ntpa
rtne
r lin
outputVariable<variable>Response Message
Clie
ntap
plic
atio
WSDL
Credit rating
serviceRead crOutput
<assign>
d3d4
crOutput<variable>
d2 <reply>
Invoking a Synchronous Service
1. Create a PartnerLink.2. Use an Assign activity
to prepare the input.3. Add an Invoke activity
t i k th i 12
4-11 Copyright © 2005, Oracle. All rights reserved.
to invoke the service.4. Add an Assign activity
to obtain the output.
Note: The Invoke activityprovides input and output variables for asynchronous service.
3
4
Creating the OrderBooking BPEL Process
Create an OrderBooking BPEL project with the Asynchronous BPEL Process template.
4-12 Copyright © 2005, Oracle. All rights reserved.
5
Importing a User-Defined XML Schema
2
3
5
4-13 Copyright © 2005, Oracle. All rights reserved.
1
4
Setting the BPEL Process Message Types
1
2
3
4-14 Copyright © 2005, Oracle. All rights reserved.
Note: You can set the message type by editing either the message type name or its payload.
3
Including a Partner Link
Drag the PartnerLink activity into the Diagram View.
4-15 Copyright © 2005, Oracle. All rights reserved.
6
Configuring the Partner Link Activity
1 32
4-16 Copyright © 2005, Oracle. All rights reserved.
4
BPEL Variables
• Communicate data between services and activities used by a BPEL processes
• Have a built-in data, element, or message type– Element types are defined as XML schemas.
Th t t t i d fi d XML
4-17 Copyright © 2005, Oracle. All rights reserved.
– The message type structure is defined as an XML schema element type and is defined in WSDL.
BPEL processXML schema
WSDL
Process variable<types>
…</types>
Message type
Defined as
Defined in
ScopeData variable
Creating the Input Variable1
3
2
Select this message type.
4-18 Copyright © 2005, Oracle. All rights reserved.
2
Confirm this URL.
45
Note: You can also autogenerate variables.
7
Creating the Output Variable
1
3Select this
message type.
4-19 Copyright © 2005, Oracle. All rights reserved.
Confirm this URL.
45
2
Synchronous Flow: Invoking the Credit Rating Service
12
3
4-20 Copyright © 2005, Oracle. All rights reserved.
4
5
Click to autogenerate a
variable.
Click to browse for an existing variable.
Assigning Input Data
Drag an Assign activity into the Diagram View between receiveInput and InvokeCR.
4-21 Copyright © 2005, Oracle. All rights reserved.
1
2
8
Configuring Assign Activity Copy Rules
1
4-22 Copyright © 2005, Oracle. All rights reserved.
2 3
Assigning the Output1
2
3
4-23 Copyright © 2005, Oracle. All rights reserved.
There are two copy rules for this
assignment.4
Viewing the BPEL Process
4-24 Copyright © 2005, Oracle. All rights reserved.
9
Deploying and Running the Process1
2
4-25 Copyright © 2005, Oracle. All rights reserved.
3
4
<!--// Partner Links Section--><partnerLinks xmlns:plext="http://schemas.oracle.com/bpel/extension/partnerlink"><partnerLink myRole="OrderBookingProvider" name="client"
partnerRole="OrderBookingRequester" plext:wsdlloc="OrderBooking.wsdl" partnerLinkType="client:OrderBooking"/>
<partnerLink myRole="CreditRatingServiceProvider" name="CreditService" partnerRole="CreditRatingServiceProvider" plext:wsdlloc="http://edrsr6p1:9700/orabpel/default/CreditRatingSer ice/CreditRatingSer ice? sdl"
Reviewing the Source Code
4-26 Copyright © 2005, Oracle. All rights reserved.
<!--// Process Variables Section--><variables><variable name="inputVariable"
messageType="client:OrderBookingRequestMessage"/><variable name="outputVariable"
messageType="client:OrderBookingResponseMessage"/><variable name="crInput"
messageType="ns2:CreditRatingServiceRequestMessage"/><variable name="crOutput" messageType="ns2:CreditRatingServiceResponseMessage"/>
</variables>
reditRatingService/CreditRatingService?wsdl" partnerLinkType="ns2:CreditRatingService"/>
</partnerLinks>
<sequence name="main"><receive name="receiveInput" partnerLink="client" portType="client:OrderBooking" operation="initiate" variable="inputVariable" createInstance="yes"/>
<assign name="AssignCR"><copy><from variable="inputVariable" part="payload"
query="/ns1:PurchaseOrder/ns1:ID"/><to variable="crInput" part="payload"
query="/ns2:ssn"/></copy></assign><invoke name="invokeCR" partnerLink="CreditService"
portType="ns2:CreditRatingService"operation="process" inputVariable="crInput"
Reviewing the Source Code
4-27 Copyright © 2005, Oracle. All rights reserved.
operation= process inputVariable= crInput outputVariable="crOutput"/>
<assign name="AssignRating"><copy><from expression="string("Credit OK")"/><to variable="inputVariable" part="payload" query="/ns1:PurchaseOrder/ns1:OrderInfo/ns1:OrderComments"/></copy><copy><from variable="crOutput" part="payload"
query="/ns2:rating"/><to variable="outputVariable" part="payload" query="/client:OrderBookingProcessResponse/client:result"/></copy></assign><invoke name="callbackClient" partnerLink="client" portType="client:OrderBookingCallback" operation="onResult" inputVariable="outputVariable"/>
</sequence>
10
Notes Only Page
4-28 Copyright © 2005, Oracle. All rights reserved.
Invoking an Asynchronous Service
Asynchronous services:• Are initiated by using an Invoke activity• Can take any amount of time to complete• Use WS-Addressing information to call back a
4-29 Copyright © 2005, Oracle. All rights reserved.
BPEL process Receive activity waiting for the response
Rapid Distributorsasynchronous
Web service
[2:05] receive[2:06] process…[2:22] callback
Initiate port
Callback port
Initiate
onResult callback
WS-Addressing and Correlation
RapidDistributersP t Li kRDInput
WS-Addressing header:• callback location• correlation ID (relatesTo) [2:05] receive
[2:06] process…[2:22] callback
4-30 Copyright © 2005, Oracle. All rights reserved.
BPEL process: OrderBooking.bpel
WSDL
PartnerLink
AsyncRapid
Distributorservice
RDInput<variable>
Wait for callback<receive>
Callback port
Initiate port
RDOutput<variable>
WS-Addressing header:• correlation ID (relatesTo)
d3
d4
d3
d4
Initiate service<invoke>
11
Implementing Correlation Sets
To implement a correlation set:
BPEL process BPEL process
Create properties.
Create property aliases associated with message type
elements.
1 2
3WSDL WSDL
4-31 Copyright © 2005, Oracle. All rights reserved.
Note: This is necessary only for asynchronous calls when WS-Addressing is not provided by BPEL engine.
BPEL process BPEL processDefine
<correlationSets>Define
<correlationSets>
InvokeUse
<correlationinitiate="no">
Receive Associate
<correlationinitiate="yes">
4
3Create correlation
set based on property aliases.
Use or associate correlation set.
Understanding the BPEL Asynchronous Service
Deployment descriptor (bpel.xml)
ClientPartner
LinkinputVariable <variable>Client
application
Rapid DistributorsPartnerLink
Prepare order<assign>
RDInput<variable>
d1 <receive>
4-32 Copyright © 2005, Oracle. All rights reserved.
BPEL processWSDL
Initiate service<invoke>
outputVariable <variable>
WSDL
PartnerLink<variable>
RDOutput<variable>
Wait for callback<receive>
Callbackport
Initiate port
Dehydration point
d3
d4
Client<callback>
d2
Asyncservice
Including a Partner Link for Rapid Distributors
Create a partner link for the Rapid Distributors service that assigns a supplier based on the items ordered.
4-33 Copyright © 2005, Oracle. All rights reserved.
• My Role must bespecified forasynchronous calls.
• Partner Role is selected from thoseprovided by service.
12
Invoking the Rapid Distributors Service
4-34 Copyright © 2005, Oracle. All rights reserved.
Note: Autogenerated variable names are formed with the activity name and invoked operation name.
Configuring a Receive Activity
4-35 Copyright © 2005, Oracle. All rights reserved.
Configuring the Variable Assignment
4-36 Copyright © 2005, Oracle. All rights reserved.
13
Viewing the Asynchronous Process Activities
Note: Only the order items
4-37 Copyright © 2005, Oracle. All rights reserved.
yare sent, and not the entire PO.
Deploying and Running the Process
12
3
4-38 Copyright © 2005, Oracle. All rights reserved.
4
Summary
In this lesson, you should have learned how to:• Choose the appropriate JDeveloper BPEL
Designer templates• Orchestrate services in BPEL by:
4-39 Copyright © 2005, Oracle. All rights reserved.
– Invoking a synchronous service– Invoking an asynchronous service
• Describe how WS-Addressing is used to enable asynchronous service invocation
14
Practice 4: Invoking Synchronous and Asynchronous Services
4-40 Copyright © 2005, Oracle. All rights reserved.
Practice 4.1: Invoking a synchronous service
Practice 4.2: Invoking an asynchronous service
1
6Increasing Process Reliability Through Fault Handling and Exception Management6
Copyright © 2005, Oracle. All rights reserved.
Fault Handling and Exception Management
Objectives
After completing this lesson, you should be able to:• Provide a shared context for a subset of activities
through the use of the Scope activity• Define various handlers to influence process
b h i
6-2 Copyright © 2005, Oracle. All rights reserved.
behavior
Defining a Scope Structure
A BPEL scope:• Is implicit or appears in the <scope> element• Defines a set of nested activities• Provides its own associated:
6-3 Copyright © 2005, Oracle. All rights reserved.
– Fault handlers– Event handlers– Compensation handlers– Data variables
• Controls the behavior of a process• Can be nested within other scopes
2
Adding a Scope Structured Activity
Add Catch BranchScope variable
Add CatchAll BranchAdd OnMessage Branch
Expand or collapse the view 21
6-4 Copyright © 2005, Oracle. All rights reserved.
gAdd OnAlarm BranchAdd Compensation HandlerHide/Show fault handlers 3
Catch and CatchAll
A BPEL scope provides fault handlers by using:• A Catch branch (zero or more)
– Handles a specific (named) fault condition– Obtains error information in a fault variable
Fi t t hi diti i d
6-5 Copyright © 2005, Oracle. All rights reserved.
– First matching condition is processed• A CatchAll branch (optionally one)
– Processes any type of fault condition not handled by a Catch branch
– Provides attributes to name the branchNote: If a fault-handler is not present for any error condition, the default BPEL Process Manager fault-handling rules are applied.
Managing Faults
Nested scopes form a logical hierarchy:• For activities and fault handlers• That can be used to handle and propagate faults
Main scope
6-6 Copyright © 2005, Oracle. All rights reserved.
p
Innerscope
NegativeCredit
CatchAll
Invoke
Assign
WSDLNegativeCredit
InvalidSSN
InvokeRaised
Raised
DefinesCatch
Catch
Credit ratingservice
3
Adding a CatchAll Exception Branch
In the Scope activity, click the Add CatchAll Branch icon to create an exception branch known as a fault handler
6-7 Copyright © 2005, Oracle. All rights reserved.
handler.
Exception branch
Setting a Value for the Credit Rating
1
6-8 Copyright © 2005, Oracle. All rights reserved.
2
1
The credit rating value is set to 0.
Adding Comments to the Order
4
6-9 Copyright © 2005, Oracle. All rights reserved.
3
4
The CatchAll in the OrderBookingProcess
CatchAll
6-10 Copyright © 2005, Oracle. All rights reserved.
Deploying and Running the Process
1 2
6-11 Copyright © 2005, Oracle. All rights reserved.
3
4
Understanding BPEL Concepts: Pick and onAlarm
<pick>
Initiate service<invoke>
6-12 Copyright © 2005, Oracle. All rights reserved.
A Pick activity triggers either an onMessage or an onAlarm after invoking an
asynchronous service.BPEL Process
Wait for callback<onMessage>
Timeout in 1M<onAlarm>
Logic post
callback
Logic post
timeout
SelectManfacturing
5
Pick with an <onMessage> and <onAlarm>
<sequence name="main"><receive name="receiveInput" partnerLink="client"portType="client:Test" operation="initiate"variable="inputVariable" createInstance="yes"/>
<invoke name="Inv_SM"partnerLink="SelectManufacturing"portType="ns4:SelectManufacturing"operation="initiate"inputVariable="Inv_SM_initiate_InputVariable"/>
<pick name="Pick 1">
6-13 Copyright © 2005, Oracle. All rights reserved.
<pick name Pick_1 ><onMessage><receive name = "Receive_SM"partnerLink="SelectManufacturing" portType="ns4:SelectManufacturing"operation="onResult"variable="Receive_SM_onResult_InputVariable"createInstance="no"/>
</onMessage><onAlarm for="'PT3M1S'">
<sequence name="Sequence_5"><assign ... /> ...</sequence>
</onAlarm></pick>
Understanding Compensating Transactions
• ACID principles and XA transactions do not work for asynchronous services.
• Transactions can be managed for synchronous services provided that all invocations are synchronous
6-14 Copyright © 2005, Oracle. All rights reserved.
synchronous.• Use BPEL compensation handling:
– When the BPEL process encounters a failure– To undo the previously completed transactions
• Example: Travel agent needs to undo some booking operations for a customer in the event of some services offered being unavailable.
Compensating Transactions
TravelFlowBPEL Process
TravelFlow PortPTa
Airline1. Do
6. Compensate/UndoExplicit Invocation
UaDa
6-15 Copyright © 2005, Oracle. All rights reserved.
PTb
Rentalcar
Hotel
PTc
5. CompensateExplicit Invocation
4. No hotel available!
p
2. Do
3. Do
Exception! Undo!
UhDh
UrcDrc
6
Understanding the BPEL compensationHandler
Using a compensate handler activity requires:• Support for an undo operation in services invoked• Definition of a compensation handler for a scope• Triggering a compensation with a compensate
6-16 Copyright © 2005, Oracle. All rights reserved.
activity (commonly in another scope's fault handler)
• Completing activities in scope before it can be compensated
• Maintaining variable states in the server for a scope that can be compensated
Notes Only Page
6-17 Copyright © 2005, Oracle. All rights reserved.
Adding a Compensation Handler
6-18 Copyright © 2005, Oracle. All rights reserved.
Each scope can have one compensation handler.Similar to a fault handler, a compensation
handler can use arbitrary activities to implement the compensation logic.
7
Summary
In this lesson, you should have learned how to:• Provide a shared context for a subset of activities
through the use of the Scope activity• Define various handlers to influence process
b h i
6-19 Copyright © 2005, Oracle. All rights reserved.
behavior
Practice 6:Adding a Branch for Exception Handling
6-20 Copyright © 2005, Oracle. All rights reserved.
1
7Adding Transformation Services to BPEL 7Copyright © 2005, Oracle. All rights reserved.
Objectives
After completing this lesson, you should be able to:• Add transformation services• Configure mapping by using the XSLT Mapper• Test the transformation
7-2 Copyright © 2005, Oracle. All rights reserved.
Oracle BPEL Process Manager Transformation Services
Transformation services allow you to:• Convert one document format to another• Simplify copying data between large and complex
structures
7-3 Copyright © 2005, Oracle. All rights reserved.
POAcknowledgeBPEL process
POAcknowledge.xsdOrderBookingPO.xsd
XSLT Mapper
Transform.xsl
XSLTPurchaseOrder.xml POAcknowledge.xml
2
Adding Transformation Services
1. Drag a Transform activity to a BPEL service.2. Configure source, target, and XSLT mappings.
1 2Imported
XSD definitions
7-4 Copyright © 2005, Oracle. All rights reserved.
Importing the Schema for the Input (Purchase Order)
1 2
7-5 Copyright © 2005, Oracle. All rights reserved.
3
4
Importing the Schema for the Output (Purchase Order Acknowledgement)
1 2
7-6 Copyright © 2005, Oracle. All rights reserved.
3 4
3
Configuring the Transform Activity
2
1
7-7 Copyright © 2005, Oracle. All rights reserved.
2
3
Using the XSLT Mapper
Function categories
13
2
7-8 Copyright © 2005, Oracle. All rights reserved.
Advanced functionsCode snippetsConversion functionsCumulative functions Database functionsDate functionsLogical functionsMathematical functionsNode-set functionsPreferred componentsString functionsUser-defined extension functionsUser-defined named templateshttp://www.w3.org/1999/XSL/Transform
XSLT Mapper: Key Features
• Rich graphical view with a simple drag-and-drop technique
• Automatic two-way synchronization of graphical and source viewE t i f ti t f b ildi l
7-9 Copyright © 2005, Oracle. All rights reserved.
• Extensive function sets for building complex expressions
• Advanced testing and debugging tool with sample instance generator
• Automap, based on similar names and types, for increased productivity
4
XSLT Mapper: Extensive Function Set
• More than 100 built-in functions for creating complex expressions
• Support for user-defined Java extension functions• Support for user-defined XSLT templates• Built-in DVM and database
l k f ti
7-10 Copyright © 2005, Oracle. All rights reserved.
lookup functions
Creating the Mappings
7-11 Copyright © 2005, Oracle. All rights reserved.
Notes Only Page
7-12 Copyright © 2005, Oracle. All rights reserved.
5
XSLT Mapper: Array Handling
• Copy a source array to a target array by using the drag-and-drop technique.
• Merge two or more source arrays into one target array.C t N di i l t i l
7-13 Copyright © 2005, Oracle. All rights reserved.
• Convert an N-dimensional source array to a single dimension target array. This is the same as converting a hierarchical structure in the source to a flat structure in the target.
• Copy the Nth element in a source array to a target element.
XSLT Mapper: Conditional Mapping
• Conditionally map a target element by using the complex test expression and build default behavior with simple clicks.
• Build test expressions by using the drag-and-drop technique.
• Build complex XPath expressions by using the
7-14 Copyright © 2005, Oracle. All rights reserved.
• Build complex XPath expressions by using the XPath Expression Builder.
• Build nested and complex conditions.
XSLT Mapper: Automap
• Map complex structures by using the drag-and-drop technique.
• Map structures by using dictionaries.
• Modify automap
7-15 Copyright © 2005, Oracle. All rights reserved.
preferences automatically.• View the best match for an
unmapped target node.
6
Map Testing Tool
• Generate advanced sample instances with support for arrays and recursive elements.
• View the source XML instance and result XML instance side by side, and validate them against their schemas
7-16 Copyright © 2005, Oracle. All rights reserved.
their schemas.• Modify XSLT and rerun test without leaving the
tool.• Set breakpoints and debug XSLT by using the
built-in XSLT debugger.• Test maps on Oracle or Xalan XSLT processor.
Testing the Transformation1
7-17 Copyright © 2005, Oracle. All rights reserved.
2
3
Dictionary and Report Generation
• Generate an HTML report to obtain information about:– Mapped nodes– Mapping logic used– % complete
7-18 Copyright © 2005, Oracle. All rights reserved.
– % pending
• Generate dictionary from current mappings for future maps.
7
Summary
In this lesson, you should have learned how to:• Add transformation services• Configure mapping by using the XSLT Mapper• Test the transformation
7-19 Copyright © 2005, Oracle. All rights reserved.
Practice 7: Adding Transformation Services to BPEL
7-20 Copyright © 2005, Oracle. All rights reserved.
1
8Invoking a BPEL Service Through Adapters8
Copyright © 2005, Oracle. All rights reserved.
Adapters
Objectives
After completing this lesson, you should be able to:• Describe adapter services• Configure a partner link for a File adapter• Invoke an adapter service
8-2 Copyright © 2005, Oracle. All rights reserved.
Adapter Services
Siebel CRM
Mainframe
J2EE applications
BAMOracle AS
8-3 Copyright © 2005, Oracle. All rights reserved.
Database
COBOL file
Mainframe
Oracle APPSHRMS
BAM
BPELBPM
Portal
adapters
2
Oracle BPEL Process Manager
Adapter Framework
Is a lightweight implementation based on:• WSIF standards for outbound communication• J2CA standards for inbound communication
Outbound
8-4 Copyright © 2005, Oracle. All rights reserved.
Oracle Application Server Containers 10g for J2EE
BPEL engine
JCA activationagent
JMS
J2EE
JCAClient
EISJCA adapter
SOAP WSIFprovider
Inbound
Benefits of Adapters
Adapters:• Are standards-based, open, and flexible• Provide one set of adapters for integration with
Oracle Portal, Oracle InterConnect, and OC4J
8-5 Copyright © 2005, Oracle. All rights reserved.
• Integrate Oracle applications with EIS applications• Provide real-time bidirectional connectivity• Support SOA with loose coupling and extensibility • Provide scalability and high availability
OracleAS Adapter: Key Features
Design time Run time Standards support MANAGEMENTLife cycle
• EIS schemas that can be browsed,
• Supports synchronous
• Open Standards– WSDL
• Runs in the Application Server
Run time Standardssupport
DesignUI Life cycle
8-6 Copyright © 2005, Oracle. All rights reserved.
ca be b o sed,searched, extracted, and generated
• JDeveloper Adapter Wizard for technology adapters
• WSDL schemas for both outbound and inbound interactions
• WSIL browser for OEM adapters
sy c o ousoutbound two-way from Oracle AS to EIS
• Supports asynchronous outbound one-way from Oracle AS to EIS and inbound one-way from EIS to Oracle AS
• Translates between EIS native format to XML and back
• Supports multiple EIS connections
– WSDL– WSIF– WSIL– XSD– J2CA– JMS
•Architecture– SOA– EDA
pp cat o Se emiddle tier
–Runs in OC4J• Involves scalable
–Load balancing–Connection management
• Is managed via Application Server Control
3
OracleAS Adapters
Enterprise-strength infrastructure for connectivity to Enterprise Information Systems (EIS)
AdaptersDesign time
8-7 Copyright © 2005, Oracle. All rights reserved.
Oracle Application Server 10g
EIS nativeAPI
OracleAS adapters
J2CA
SOAPLegacy application
Oracle E-Business Suite
Package application
Technology
From EIS data toXML and back
BPEL
InterConnect
Portal
OracleAS Adapter Services for Outbound Two-Way Synchronous Communication
• Outbound from Oracle AS to EIS• Synchronous request–response• J2CA outbound interaction• Oracle InterConnect implemented
8-8 Copyright © 2005, Oracle. All rights reserved.
Adapter client
OC4J container
Oracle AS adapters
J2CA outbound request
EIS native API
Reply from EIS
J2CA outbound response
EIS
OracleAS Adapter Services for Outbound One-Way Asynchronous Communication
• Outbound from Oracle AS to EIS• Asynchronous request• J2CA outbound interaction• Oracle InterConnect subscribe
8-9 Copyright © 2005, Oracle. All rights reserved.
OC4J container
J2CA outbound interaction
requestEIS native
API
EIS
Adapter client
Oracle AS adapters
4
OracleAS Adapter Services for Inbound One-Way Asynchronous Communication
• Inbound from EIS to Oracle AS• Asynchronous publish• J2CA inbound interaction• Oracle InterConnect publish
8-10 Copyright © 2005, Oracle. All rights reserved.
Adapter client
OC4J container
Oracle AS adapters
J2CA outbound interaction
EIS native API
EIS
Oracle AS Adapter Integration with Oracle BPEL Process Manager
WSIF APIJ2CA activation agent
8-11 Copyright © 2005, Oracle. All rights reserved.
Adapter framework[WSIF provider]
J2CA 1.5 resourceadapter
J2CA 1.5 resourceadapter
Adapter framework[J2CA 1.5 container]
EIS EIS
OracleAS Adapter and Oracle BPEL Process Manager Integration
BPEL process
WSIFAPI
WSIFJCA
id
JCAresource
d tEIS
8-12 Copyright © 2005, Oracle. All rights reserved.
p provider adapter
Request (synchronous) or one-way (asynchronous)
Response (synchronous)
5
Adapter and Oracle BPEL Process Manager Outbound Architecture
JDeveloper
BPEL Designer/adapter wizard BPEL suitcase
Adapters WSDL:J2CA binding
8-13 Copyright © 2005, Oracle. All rights reserved.
OC4J container
Oracle AS adapters (J2CA 1.5 resource adapter)
EISnativeAPI
JNDI lookup and outbound interaction
Response
EIS
BPEL Process Manager
Adapter framework
[WSIF provider]
WS syncinvoke
WS syncresponse
Adapter and Oracle BPEL Process Manager Inbound Architecture
JDeveloper
BPEL Designer or
adapter wizard
BPEL suitcase
Adapters WSDL:Oracle-specific
binding
8-14 Copyright © 2005, Oracle. All rights reserved.
BPEL Process Manager
OC4J container
Oracle AS adapters (J2CA 1.5 resource adapter)
Adapter framework[pseudo JCA 1.5
container]
WS receive
EIS event(push or pull)
EIS
1. Start resource adapter.2. Activate endpoint. 3. Deactivate endpoint.
1. Create message endpoint.
2. Call onMessage().
Design Time of Technology Adapters for Oracle BPEL Process Manager Integration
JDeveloper BPEL Designer
BPEL S it
8-15 Copyright © 2005, Oracle. All rights reserved.
Adapter wizards
BPEL Suitcase
Adapter service WSDL
Deployment XML
6
Technology Adapters Integrated in JDeveloper
Adapter wizards are accessed by a partner link to:• Generate the WSDL that describes the service• Locate the generated WSDL with a WSIL Browser
8-16 Copyright © 2005, Oracle. All rights reserved.
Multiplefile formats
File and FTP Adapter
File and FTPadapter
FeaturesDesign time I/O
Parsing andformatting
8-17 Copyright © 2005, Oracle. All rights reserved.
Pattern matching
Binary
File*.XML
XSDformatting
Wizard-drivenmodeling
Scalable viaOC4J
connectionsand batching
Database Adapter
The Database adapter:• Enables querying of database tables from a BPEL
process by using any JDBC provider• Is based on Oracle TopLink technology for object-
l ti l i
8-18 Copyright © 2005, Oracle. All rights reserved.
relational mapping• Uses wizard-driven modeling to map between
relational and object schemas• Enables schemas to be expressed as XML schema
documents• Uses OC4J connection pool management and
supports JTA transactions
7
Database Adapter Implemented with TopLink
8-19 Copyright © 2005, Oracle. All rights reserved.
Oracle Applications Adapter
• Provides intuitive integration to Oracle Applications
• Supports all E-Business Suite 11i modules• Provides prebuilt interfaces to speed
i l t ti
8-20 Copyright © 2005, Oracle. All rights reserved.
implementation• Enables rapid development by using wizard-driven
modeling• Enables reuse of existing skills and involves
reduced training cycles, resulting in a lower total cost of ownership
Advanced Queuing (AQ) Adapter
• Enables sending or receiving messages from an Oracle database configured with the Advanced Queue (AQ) option
• Supports single or multiple consumer queuesL li bl t t ( t d
8-21 Copyright © 2005, Oracle. All rights reserved.
• Leverages reliable message transport (store and forward)
• Implements interface through the Java Message Service (JMS) API
8
JMS Adapter
• Supports any Java Message Service (JMS)–enabled environment
• Enables sending and receiving messages by using JMS queues and topicsS t b ilt i JMS API i O l A li ti
8-22 Copyright © 2005, Oracle. All rights reserved.
• Supports built-in JMS API in Oracle Application Server Containers for J2EE (OC4J)
• Provides access to lightweight, reliable, message services distributed in the middle tier of a Web application architecture
OEM Adapters
• Provides a glue layer between a BPEL process and the OEM services
• Integrates by using WSIF providers and bindings• Examples of top three OEM services:
iWay Software Ltd
8-23 Copyright © 2005, Oracle. All rights reserved.
– iWay Software Ltd.– Attunity for legacy applications– Fujitsu (CICS only)
• Other vendors who integrate the services (implicitly certified as JCA 1.5 adapters):– Neon Systems– Librados– Pervasive Software– GT Software
Design Time of OEM Adapters for Oracle BPEL Process Manager Integration
Oracle AS adapter
Application Explorer
Oracle ASrepository
WSIL servletAdapter
WSIL browser
BPEL Designer oradapter wizard
8-24 Copyright © 2005, Oracle. All rights reserved.
p o e repository(WSDL)
EIS
BPEL suitcase(repository)
Adapter service WSDL
Deployment XML
9
Oracle Application Explorer
8-25 Copyright © 2005, Oracle. All rights reserved.
Using the File Adapter: Example
Scenario: Invoking the batch OrderBooking service to read the purchase order from a file by using a File adapter
8-26 Copyright © 2005, Oracle. All rights reserved.
Selecting an Adapter Service
Define the adapterservice icon.
8-27 Copyright © 2005, Oracle. All rights reserved.
10
Configuring the File Adapter
2
1
8-28 Copyright © 2005, Oracle. All rights reserved.
Not supported for XML
3
4
Configuring the File Adapter
5
6
8-29 Copyright © 2005, Oracle. All rights reserved.
6
7
Creating the Partner Link for Calling the OrderBooking Process
1
2
8-30 Copyright © 2005, Oracle. All rights reserved.
2
11
Configuring the Receive Activity for the File Adapter
1
2
8-31 Copyright © 2005, Oracle. All rights reserved.
2
34
Invoking the OrderBooking Process
1
8-32 Copyright © 2005, Oracle. All rights reserved.
2
3
Configuring the Assign Activity for Input and Output
1 3
8-33 Copyright © 2005, Oracle. All rights reserved.
Note: Assign copies to the autogenerated variable.
2 4
12
Deploying and Running the Process
1 2 3
8-34 Copyright © 2005, Oracle. All rights reserved.
4
Summary
In this lesson, you should have learned how to:• Describe adapter services• Configure a partner link for a File adapter• Invoke an adapter service
8-35 Copyright © 2005, Oracle. All rights reserved.
Practice 8: Using a File Adapter to Read the Input Data From a File
8-36 Copyright © 2005, Oracle. All rights reserved.
1
9Accessing Adapter-Enabled Services from BPEL9
Copyright © 2005, Oracle. All rights reserved.
BPEL
Objectives
After completing this lesson, you should be able to:• Invoke a BPEL service through a File adapter for
creating and writing a file• Invoke a Database adapter as a service from BPEL
9-2 Copyright © 2005, Oracle. All rights reserved.
Invoking the File Adapter as a Service from BPEL
Invoke File adapter
Write
PartnerLink
9-3 Copyright © 2005, Oracle. All rights reserved.
• Data is stored in avariety of formats inthe file system.
• Writing a file is a one-way operation.
Variabledata
Invokeactivity
p
WSDL defines theoutput directoryand file name. Output file
2
Creating a Partner Link for the File Adapter
1
9-4 Copyright © 2005, Oracle. All rights reserved.
2
3
Creating a Partner Link for the File Adapter
4
Where to write the file
9-5 Copyright © 2005, Oracle. All rights reserved.
File name
Criteria for when to write
the file
Creating a Partner Link for the File Adapter
57
9-6 Copyright © 2005, Oracle. All rights reserved.
6
3
Designing the Write File Activities
1
32
9-7 Copyright © 2005, Oracle. All rights reserved.
4 5
Viewing the Write File Activities
The POAcknowledgeprocess now includes the file write operation
9-8 Copyright © 2005, Oracle. All rights reserved.
the file write operation.
Deploying and Running the Process
21
9-9 Copyright © 2005, Oracle. All rights reserved.
3
4
<?xml version="1.0" ?><POAcknowledge xmlns="http://www.thiscompany.com/ns/sales"><CustomerID xmlns="">Antilla
Deploying and Running the Process
5
4
9-10 Copyright © 2005, Oracle. All rights reserved.
Electronics</CustomerID><ID xmlns="">AS-0193</ID><ShippingAddress xmlns=""><Name>DeGossaaCalro</Name><Address><Street>12, Burhon Street</Street><City>Danzig</City><State>Godanzk</State><Zip>PO-20398</Zip><Country>Poland</Country></Address></ShippingAddress><BillingAddress xmlns=""><Name>Mrs Castro</Name><Address><Street>23, Uudemankatu</Street><City>Hyvinkaa</City><State>Finland</State><Zip>SF-05800</Zip><Country>Finland</Country></Address></BillingAddress><Items xmlns=""><ProductName>Grundi TV</ProductName><Quantity>4</Quantity><USPrice>900.00</USPrice><ShippingDate>2005-02-25</ShippingDate><PartNumber>239-FRH</PartNumber></Items><Ack xmlns=""><OrderDate>2005-01-10</OrderDate><OrderPrice>6100.00</OrderPrice><OrderStatus>Order Acknowleged </OrderStatus><SupplierName>SelectManufacturing</SupplierName><SupplierPrice>1000.00</SupplierPrice></Ack></POAcknowledge>
Deploying and Running the Process
6
9-11 Copyright © 2005, Oracle. All rights reserved.
7
Extending OrderBooking to Invoke POAcknowledge
9-12 Copyright © 2005, Oracle. All rights reserved.
5
Creating the Partner Link
9-13 Copyright © 2005, Oracle. All rights reserved.
Invoking the File Write Service
1
2
3
9-14 Copyright © 2005, Oracle. All rights reserved.
3
4
56
Assigning the Input
AssignFileWriteIn
9-15 Copyright © 2005, Oracle. All rights reserved.
6
Assigning the OutputAssignFileWriteComments
9-16 Copyright © 2005, Oracle. All rights reserved.
Deploying and Running the Process
13
4
9-17 Copyright © 2005, Oracle. All rights reserved.
2<?xml version="1.0" ?><POAcknowledge xmlns="http://www.thiscompany.com/ns/sales"><CustomerID xmlns="">Antilla Electronics</CustomerID><ID xmlns="">AS-0193</ID><ShippingAddress xmlns=""><Name>DeGossaa Calro</Name> <Address><Street>12,BurhonStreet</Street><City>Danzig</City><State>Godanzk</State><Zip>PO-20398</Zip><Country>Poland</Country>
5
Invoking a Database Adapter as a Service from BPEL
Invokeactivity PartnerLink DB adapter
9-18 Copyright © 2005, Oracle. All rights reserved.
Variabledata
activity p
Database Table
InsertUpdateDelete
WSDL exposes DB operations.
7
Creating the FulfillOrder BPEL Process by Using the Database Adapter Service
9-19 Copyright © 2005, Oracle. All rights reserved.
Creating a Partner Link for Writing to the Database
1 2
9-20 Copyright © 2005, Oracle. All rights reserved.
3
Creating a Partner Link for Writing to the Database
A partner link can be configured for:• Calling a stored procedure• Writing records to the database• Polling the database for new or changed records
9-21 Copyright © 2005, Oracle. All rights reserved.
4
8
Creating a Partner Link for Writing to the Database
5
9-22 Copyright © 2005, Oracle. All rights reserved.
Copy icon
6
Creating a Partner Link for Writing to the Database
7
9-23 Copyright © 2005, Oracle. All rights reserved.
8
9
Invoking the Database Write Service
9-24 Copyright © 2005, Oracle. All rights reserved.
9
Designing the Database Record Transformation
SourceMapping
1 2Target
9-25 Copyright © 2005, Oracle. All rights reserved.
Create the Mapping icon.
3
Designing the Database Record Transformation
4
9-26 Copyright © 2005, Oracle. All rights reserved.
5
Designing the Database Record Transformation
9-27 Copyright © 2005, Oracle. All rights reserved.
10
Deploying and Running the Process1
9-28 Copyright © 2005, Oracle. All rights reserved.
2
3
Deploying and Running the Process
4
9-29 Copyright © 2005, Oracle. All rights reserved.
5
Invoking the FulfillOrder Service from OrderBooking
OrderBooking FulfillOrder
9-30 Copyright © 2005, Oracle. All rights reserved.
11
Creating the Partner Link to Call FulfillOrder
OrderBooking
9-31 Copyright © 2005, Oracle. All rights reserved.
Invoking and Receiving the Input from FulfillOrder
9-32 Copyright © 2005, Oracle. All rights reserved.
Configuring the Assign for Input
AssignDBIn
9-33 Copyright © 2005, Oracle. All rights reserved.
12
Configuring the Assigns for OutputAssignDBWriteComments
9-34 Copyright © 2005, Oracle. All rights reserved.
Modifying the FulfillOrder Process for Exception Processing
FulfillOrder
9-35 Copyright © 2005, Oracle. All rights reserved.
Adding Database Exception Handling
9-36 Copyright © 2005, Oracle. All rights reserved.
The simple data types available for selection
13
Setting the Status to False
9-37 Copyright © 2005, Oracle. All rights reserved.
Adding a While Activity
This is the While activity.1
2
9-38 Copyright © 2005, Oracle. All rights reserved.
The Scope activity is inside the
While loop.
3
45
Adding an Exception Branch for the Scope Activity
The Add Catchall
Branch icon
1
9-39 Copyright © 2005, Oracle. All rights reserved.
2
3
14
Adding a Wait Activity
4
9-40 Copyright © 2005, Oracle. All rights reserved.
5
Deploying and Running the Processes
12
9-41 Copyright © 2005, Oracle. All rights reserved.
3
Deploying and Running the Processes
4
5
9-42 Copyright © 2005, Oracle. All rights reserved.
15
Undeploying Processes
To undeploy processes, perform the following steps:1. Click the link of the process to undeploy.2. Click the BPEL Processes tab, and then click the
Manage link.3. Scroll down and click Undeploy.
9-43 Copyright © 2005, Oracle. All rights reserved.
4. When asked if you want to mark all open instances for this process as stale, click OK.
5. Click Done.6. Click the Dashboard tab.
Repeat these steps until all the versions are undeployed.
Summary
In this lesson, you should have learned how to:• Invoke a BPEL service through a File adapter for
creating and writing a file• Invoke a Database adapter as a service from BPEL
9-44 Copyright © 2005, Oracle. All rights reserved.
Practice 9.1: Invoke the File Adapter as a Service from BPEL to Write a File
9-45 Copyright © 2005, Oracle. All rights reserved.
16
Practice 9.2: Extend OrderBooking to Invoke POAcknowledge
9-46 Copyright © 2005, Oracle. All rights reserved.
Practice 9.3: Invoke a Database Adapter as a Service from BPEL
9-47 Copyright © 2005, Oracle. All rights reserved.
Practice 9.4: Invoke the FulfillOrderService from OrderBooking
OrderBooking FulfillOrder
9-48 Copyright © 2005, Oracle. All rights reserved.