using wbi adapters with wbi server foundation - ibm · pdf fileusing wbi adapters with...
TRANSCRIPT
®
IBM Software Group
© 2005 IBM Corporation
Using WBI Adapters with WebSphere Process Choreographer
WebSphere Technical BriefingMay 2005
Peter Van SickelConsulting I/T SpecialistIBM Software Services for WebSphere
IBM Software Group
Agenda
WBI Adapters Overview
Adapter Development Tools
Adapter Interaction Patterns with WBISF
Using an Adapter in a WBISF Process Flow
Runtime Configuration
Adapter Monitoring
Summary
Where to get more information
®
IBM Software Group
© 2005 IBM Corporation
WBI Adapters Overview
IBM Software Group
WebSphere Business Integration Server Foundation:Connectivity Options
Web ServicesSOAP over HTTP, HTTPs, JMS
WBI Adapters – this is the focus of this presentation
J2EE ConnectorsIBM, 3rd party, custom
JDBCEJB, CMP
IBM Software Group
J2C and WBI Adapters
J2C 1.0 was unidirectional and synchronous only – not appropriate for many integration scenarios
J2C 1.5 is bidirectional, synchronous as well as asynchronous – this helps a lot, but…
J2C 1.5 still lacks:Standard way of dealing with XML recordsStandard support for EIS meta-data repositories and access APIs
IBM is extending the adapter framework to include J2C support
Adapters are being developed using J2C 1.5
IBM Software Group
Adapter Components
The Components of WBI AdaptersConnector – links an application to an integration server
Application Specific ComponentAdapter Framework
Development ToolsSystem ManagerConnector ConfiguratorBusiness Object Designer
Object Discovery Agent (ODA)Introspects application meta-data to generate business objects
IBM Software Group
What do WBI Adapters provide?
WBIServer
Foundation LotusDomino
IMS
Consistent framework for access to back-end systems and technologies
We are not concerned with connectivity, wire protocols, application APIs, or data transformation between domains
Encapsulate business functions as large-grained services
Consistent configuration, deployment, and administration
IBM Software Group
WBI Adapters – Key Technical Details
For WBISF: synchronous and asynchronous interaction patterns
JMS based
Format in WBI Server FoundationMessage defined by XSDService defined by WSDL
External to WBI Server FoundationAdapter runs anywhere, in its own JVM
BidirectionalWBI Server Foundation can initiate interaction with adapterEvent Notification
Adapter listens on application events and notifies WBI Server Foundation
WBI ServerFoundation
ExternalEvent
WebSphere MQQueue
Adapter
Application specific connectivity
JMSJMS
IBM Software Group
The Two Faces of an Adapter
Adapter can exchange data with the integration server (hub) Common Adapter Framework for interacting with the integration server
Adapter can exchange data with an applicationTechnology specific logic to interface with the application
IntegrationServerFacing
EnterpriseApplication
Facing
AdapterFramework
Application-SpecificComponent
Adapter
IBM Software Group
Adapters and Business Objects
A single adapter can process data going in both directions
A single adapter can handle many types of transactions (e.g. Orders, Customer data, etc.)
An adapter can use a single business object for multiple operations (e.g. Create, Update, Delete, Retrieve)
An adapter is driven from meta-data in business objects
Business object definitions are represented as XML Schemas
EnterpriseEnterpriseApplicationApplication
OrderOrder ItemItem
CustomerCustomer
IntegrationIntegrationServerServer
IBM Software Group
Adapter Deployment Options – Network Topology
IntegrationIntegrationServerServer
Client
Client
Client
ApplicationApplicationPlatformPlatform
Client
Client
Option 3
ApplicationApplicationPlatformPlatform
ClientClientOption 1Option 2
ApplicationApplicationPlatformPlatform
Client
Client
Option 4
ApplicationApplicationPlatformPlatform
Internet HTTP/S
Use WBI ConnectIn all cases, the adapter agent runs in its own JVM.
IBM Software Group
WebSphere Business Integration Adapters
Application
Technology / Data Handlers
Mainframe• CICS• IMS Transaction
Manager
• Ariba Buyer• Clarify CRM• eMatrix• i2• i2 Active Data Warehouse• IndusConnect Framework• Maximo MEA• Siebel eBusiness Applications
• e-mail• COM• CORBA• Exchange• FIX Protocol• Healthcare Data Protocols• iSeries
TCP/IP
• MetaSolv Applications• mySAP.com• NightFire Applications• Oracle Applications• PeopleSoft• Portal Infranet• QAD MFG/PRO• Spirent Applications
• Telcordia Applications• WebSphere Commerce• Centricity Gateway • ESRI Spatial Databases• JD Edwards OneWorld• Manugistics • SAP Exchange Infrastructure • SunGard FRONT ARENA
• JDBC• JMS• JText• Lotus Domino• SWIFT• XML• Web Services• WebSphere MQ
• WebSphere BI Message Broker• WebSphere MQ Workflow
Data Handler for Complex Data• Data Handler for XML• Data Handler for EDI• ACORD XML • HTTP • Enterprise Java Bean
• ADABAS• Adapter for VSAM• DB2 Databases
• IMS Database Manager• Natural• IDMS Database
http://www.ibm.com/software/integration/wbiadapters/
IBM Software Group
Value of WBI AdaptersUse adapters to expedite and simplify integration of packaged and custom legacy applications that support your business
Ada
pter
s
App
licat
ions
Speed time to value when integrating business applications
Reduce risk of integration projects
Lower development costs
Reuse applications in flexible solutions
Broad portfolio with extensive functionality
Support multiple application versions
Support multiple servers
IBM Software Group
Are WBI Adapters ‘Services’?
Let’s revisit our definition of a ‘Service’
A well-defined business function
Can be invoked from an application program
Invoked through common communication protocols, providing interoperability
Provides contract between service requestors and service providers
Accesses business data, or facilitates a change in business data, from one valid and consistent state to another
®
IBM Software Group
© 2005 IBM Corporation
Adapter Development Tools
IBM Software Group
Adapter Development Overview
Create an Integration Component Library (ICL)
Define the business objectsDirectly or use an Object Discovery Agent (very handy)
Define the connector configuration
Export the service definition for import into Studio IE
Configure the runtimeMessage provider, application specific configuration
Test the adapter independently
IBM Software Group
Products that you need
Adapter Framework v2.6
Specific Adapters
WebSphere MQ 5.3 CSD 05 or greater
For the sample Order Fulfillment scenario:JText 5.6, JDBC 5.6, XML Data Handler 2.6DB2 8.2.x
WebSphere Studio Application Developer 5.1.1.x
IBM Software Group
Our Order Fulfillment Scenario
Open
open()
purge()
add line item()
Completed
[== 0]
assign()
pack item()
Customer
Cancelled
cancel()Marketer
submit()Submitted
Packer
line items.sum.left
ship()
[> 0]
Order Fulfillment
Enterprise ResourcePlanning (ERP)
Order Entry
BatchOrder Entry
Legacy BillingSystem
IBM Software Group
WebSphere BI Adapter Tools
System Manager PerspectiveConnector ConfiguratorBusiness Object Designer
IBM Software Group
Connector Configurator
IBM Software Group
Business Object Designer
IBM Software Group
Object Discovery Agent
IBM Software Group
WSAD Integration Edition:Adapter Deployment
System Manager Perspectiveis added to Integration Edition during WBI Adapter install
Launches WBI Tools
Exports WBI artifacts generated by the WBI Tools as JMS Services to the Business Integration Perspective
Export
IBM Software Group
Development steps: review
Create an Integration Component Library (ICL)
Define the business objectsDirectly or use an Object Discovery Agent (very handy)
Define the connector configuration
Export the service definition for import into Studio IE
Configure the runtimeMessage provider, application specific configuration
Test the adapter independently
®
IBM Software Group
© 2005 IBM Corporation
Adapter Interaction Patterns with WBISF
IBM Software Group
Adapter Runtime Interaction PatternsOne-way from Integration Server (HubOneWay)
Asynchronous from Integration Server to Application
Integration Server Initiated Request-Response (HubRequest) Pseudo-synchronous from Integration Server to Application
Application Event Notification (AgentDelivery)Asynchronous from Application to Integration Server
Application-Initiated Synchronous Processing (AgentRequest)Pseudo-synchronous from Application to Integration Server
Conn
ector
Adap
ter
Fram
ewor
k
WebSphere BI Adapter
EnterpriseInformation
SystemIntegration
Server
Notification
One-way
Request-response
Request-response
IBM Software Group
Integration Server Initiated: One-Way
Typical Usage ScenarioAn order fulfillment BPEL process needs to send an invoice to a legacy billing system that uses flat file records with the fixed-width record format.
Example: JText AdapterBPEL process makes an asynchronous call to the adapterThe adapter writes to the flat fileIf there's an error in writing the file, it's placed in a fault queue
IBM Software Group
Integration Server Initiated: One-Way
Adap
terBPEL Process
WBI Server Foundation
Adap
ter
Fram
ewor
k
Adapter
Create
Application
5
4
23
Queue
1
RequestQ
1. BPEL process invokes a service with JMS bindings (JMSReplyTo is left blank).
2. Framework picks up the message.
3. Framework maps the message to a BO.
4. Framework calls the Adapter passing in the BO.
5. Adapter processing the BO.
IBM Software Group
Integration Server Initiated: Request-Response
A typical usage scenarioA BPEL process controlling “order fulfillment” needs to make “create order” request to an Enterprise Resource Planning (ERP) system. Needs confirmation of the create and order identifier.During processing order fulfillment BPEL needs to retrieve order information from the ERP system.The details regarding the order are managed by a packaged ERP system.
Example: ERP system adapter (for any of several ERP system vendors)BPEL process calls the adapter to create the order. Adapter returns order ID.BPEL process calls the adapter to retrieve order information.
IBM Software Group
Adapter
Adap
ter
WBI Server Foundation
Adap
ter
Fram
ewor
k
Retrieve
Application
54
2 3Queue
1
69 87
BPEL Process RequestQ
TempReplyQ
Hub Initiated Request-Response
1. BPEL process invokes a service with JMS bindings (JMSReplyTo is specified).
2. Framework picks up the message.
3. Framework maps the message to an action (verb) and business object (BO).
4. Framework calls the Adapter passing in the verb and the BO.
5. Adapter passes the BO to application, application returns response to Adapter.
6. The response BO is returned to the Framework.
7. Framework maps the response to an XML message.
8. Framework posts message on JMSReplyTo queue.
9. BPEL process receives response (process instance is waiting on a blocking JMS call –no Message Driven Bean!).
IBM Software Group
Adapter Initiated One-Way
A typical usage scenarioAn order fulfillment BPEL process needs to be notified when a batch of new orders shows up in a collection of files that get transferred to a well known directory in a file system on a specific machine.The batch order entry files are XML formatted.
Example: Use a JText adapter with XML data handlerAdapter monitors the directory where the files are transferred.When the files appear:
The adapter notifies the WBISF server and a BPEL process is instantiated to begin the order fulfillment process.
IBM Software Group
Adap
terBPEL Process
MDB
WBI Server Foundation
Adap
ter
Fram
ewor
k
Adapter
Event
Application
1
2
43
6Queue
5
DeliveryQ
Adapter Initiated One-Way
5. MDB picks up the message.
6. MDB calls the process Session Bean1. Adapter polls and detects event.
2. Adapter sends Business Object (BO) corresponding to the event.
3. Adapter maps BO to an XML message.
4. Adapter puts XML message on queue (JMSReplyTo is left blank).
IBM Software Group
Adapter Initiated Request-Response
A typical usage scenarioReal-time pricing look-up originating from ERP application
Example: ERP system adapter (for any of several ERP system vendors)ERP application makes a synchronous call to a BPEL process through a native RFC (Remote Function Call) call to the adapterBPEL process
Uses an MDB to wait for requestsThe MDB invokes the process session EJB
– Retrieves the customer contract from one system– Use that to retrieve the price from another system (calculated real-time with the
item, quantity, lead-time and contract information)The MDB returns a synchronous response (post on a queue) to ERP application with the price via the adapter.
IBM Software Group
Adap
terBPEL Process
MDB
WBI Server Foundation
Adap
ter
Fram
ewor
k
Adapter
Event
Application
1243
6
Queue5
78
9 10
SynchRequestQ
SynchResponseQ
Adapter Initiated Request-Response
1. Adapter polls and detects event.
2. Adapter returns BO corresponding to the event.
3. Adapter maps BO XML message.
4. Framework puts XML message on queue (no JMSReplyTo is specified, adapters response queue is used).
5. MDB picks up the message.
6. MDB calls Process Session Bean to process the message and gets a response back.
7. MDB puts response message on to SynchResponsequeue for the adapter.
8. Framework picks up the XML message.9. Framework transforms it to a BO.10. Framework passes BO to Adapter which passes it to
Application.
®
IBM Software Group
© 2005 IBM Corporation
Using an Adapter in a WBISF Process Flow
IBM Software Group
Deployment:Integration Server Initiated Services
Select the *.Services.wsdl fileUse the Deploy Wizard to deploy one of the hub initiated operations as EJBSelect “Hub initiated” Port name
Note: in WBI terminology, Hub means WBI Server Foundation
IBM Software Group
Modeling:BPEL Process calls an Integration Server Initiated Service
12
IBM Software Group
Modeling:BPEL Process with Adapter Initiated Services
IBM Software Group
Deployment:BPEL Process with Adapter Initiated Services
... This generates a new EJB port / binding / service for the interface to the process:
IBM Software Group
Deployment:BPEL Process with Adapter Initiated Services
We have now...
A Queue that gets messages of type AgentRequest from the agentA WSDL Description which describes those messages (AgentRequest)
As well as the binding and the service location (port)
A Process that is invoked with messages of type AgentRequestUsing EJB binding and EJB port
AgentRequest Messages
RMI/IIOP ?
IBM Software Group
Deployment:BPEL Process with Adapter Initiated Services
Select the process Session EJB’s *Services.WSDL fileGenerated in the previous step
Use the Deploy Wizard to create an MDBOn Deployment page
Specify Use and existing portOn Inbound Service Files page
Select the adapter’s *Services.wsdl – generated by the WBI ToolsSelect the appropriate “Adapter initiated” Port name
IBM Software Group
Deployment:BPEL Process with Adapter Initiated Services
Results of Generate Deploy Code
In this case, we get an MDB
AgentRequest Messages
RMI/IIOP MDB
IBM Software Group
Configure EJBs/MDBs
Set JNDI References to:Queue Connection FactoryQueues
Set ListenerPort name in the generated MDBs
®
IBM Software Group
© 2005 IBM Corporation
Runtime Configuration
IBM Software Group
Create and Setup WebSphere JMS Queues
Use WebSphere Admin Console (or a wsadmin script) to:Define the JNDI for of the Queues and the Queue connection Factories (Queue Manager)Configure the Listener Ports for the MDBs
®
IBM Software Group
© 2005 IBM Corporation
Adapter Monitoring
IBM Software Group
Adapter Monitor Perspective
Adapter Monitor allows you to:Monitor adapter’s stateChange adapter’s stateExamine fault queuesBrowse fault queue eventsDelete and resubmit events
Supports adapters deployed with:
WebSphere Application ServerWBI Message BrokerWBI Server Foundation
IBM Software Group
Adapters Management and Monitoring in WebSphere Business Integration Server Foundation
WebSphere Business Integration Adapter Service
Shows the available commands Select an adapterPress a button to issue a command Message panel shows the status
®
IBM Software Group
© 2005 IBM Corporation
Summary
IBM Software Group
WBI Adapter Deployment withWebSphere Business Integration Server Foundation
Adapter runs as separate process
Adapter operations exposed by Studio-IE as JMS services described by generated WSDL
Business Objects described as XML schemas
Business Objects exchanged as XML messages (JMS binding) between server and adapter
Message Driven Beans for event delivery
Monitoring and management via Administration Console or Adapter Monitor
WebSphereBI Server Foundation
EnterpriseApplication
EJBs / MDBs
ApplicationComponent
Adapter Framework
Application SpecificComponent
JMS
IBM Software Group
Back to our Order Fulfillment scenario
Open
open()
purge()
add line item()
Completed
[== 0]
assign()
pack item()
Customer
Cancelled
cancel()Marketer
submit()Submitted
Packer
line items.sum.left
ship()
[> 0]
Order Fulfillment
Enterprise ResourcePlanning (ERP)
Order Entry
BatchOrder Entry
Legacy BillingSystem
Managers,Analysts,Developers
Modeling,Development,Monitoring
IBM Software Group
Business Integration: A multi-tiered view
Receive Order
Check Credit Confirm
Order
Verify Inventory
Determine Shipper Pack and
ShipMail Invoice
Run Production
Determine Parts Needed
Check Part A Availability Reserve
Inventories
Check Part B Availability
Sub-Process
Main Process
Process Management -Business Process
• Business Manager View• Focused on complex high-level business
process flows• Can have long-duration activities • Likely to involve human interaction with
process flows
Process Management -Sub-Process
• Business Analyst and System Architect view
• Focused on detailed micro-level hybrid data & info process flows
• Short and moderate duration activities• Blended App-to-App and B2B services
Data Access, Transport, Transformation, RoutingApplication Interaction
• Technical Manager view• Focused on technical interactions• Relatively simple sequences,
transactional units of work• IT & organizational infrastructure
Warehouse App
Inventory Sourcing
App
Data Object
•Transport•Transform•Route
Check for Part B at Warehouses
Determine Least-Cost Sourcing
Data Object
•Transport•Transform•Route
Data Object
•Transport•Transform•Route
Basic Interaction
IBM Software Group
For more information…WebSphere Business Integration Server Foundation
http://www-306.ibm.com/software/integration/wbisf/
WebSphere Business Integration Server Foundation InfoCenterhttp://publib.boulder.ibm.com/infocenter/ws51help/index.jsp
WebSphere Studio Application Developer Integration Editionhttp://www-306.ibm.com/software/integration/wsadie/
WebSphere Studio Application Developer Integration Edition InfoCenterhttp://publib.boulder.ibm.com/infocenter/adiehelp/index.jsp
WebSphere Business Integration Adaptershttp://www.ibm.com/software/integration/wbiadapters/
WebSphere Business Integration Adapters InfoCenterhttp://www.ibm.com/software/integration/wbiadapters/library/infocenter/
IBM WebSphere Developer Technical Journal:Using WebSphere Business Integration Adapters with
WebSphere Application Server Enterprisehttp://www-106.ibm.com/developerworks/websphere/techjournal/0308_charters/charters.html
http://www-106.ibm.com/developerworks/websphere/techjournal/0310_przybylski/przybylski.htmlhttp://www-106.ibm.com/developerworks/websphere/techjournal/0401_sundaramurthy/sundaramurthy.html