so-adf

74
SO-ADF ODTUG Kaleidoscope 2010 Tuesday, 29 th June Lucas Jellema AMIS, The Netherlands

Upload: lucas-jellema

Post on 07-Dec-2014

3.393 views

Category:

Technology


0 download

DESCRIPTION

 

TRANSCRIPT

Page 1: so-aDF

SO-ADF

ODTUG Kaleidoscope 2010

Tuesday, 29th June

Lucas Jellema AMIS, The Netherlands

Page 2: so-aDF

Overview• Position and Role of ADF and SOA Suite

• It’s a case of St Matthews Hospital

• ADF Application leveraging SOA Composite Applications

• ADF Faces provides UI for Human Task

• Leverage the ADF BAM Data Control

• ADF BC feeding business events into EDN

• ADF BC - the new Database Adapter?

– providing advanced database access through SDO

• Some SOA Concepts in ADF application development

Page 3: so-aDF

Purpose in life

• ADF: provide user interface for humans to perform tasks that implement process steps

– The front end to many, heterogeneous back end systems including database, cms, dwh/bi, workflow

• SOA (Suite): provide a well defined service interface on processes & integration layers

– Run the encapsulated implementation underneath the service interface

– Promote reuse & flexibility in the moving parts

– SOA == BAD (Business Agility through Decoupling)

Page 4: so-aDF

Oracle Fusion MiddlewareADF and SOA

Page 5: so-aDF

ADF Model

RDBMS

EJB & JPA(EclipseLink)

ADF BC

WebService Content Repository

BAMServer

POJO

SOA Suite

MobileADF Faces

Rich Client

JSP, Servlet

Web Service

Desktop

PortletView

Business Services

Enterprise Resources

Page 6: so-aDF

EDN

Task UI

SDO Entity

Page 7: so-aDF

Some material used from the book

• Shipping before OOW

– End of August

• On SOA and SOA Suite

• Chapters on

– ADF

– interaction betweenADF and SOA Suite

– Applying SOA concepts to ADF baseddevelopment

Page 8: so-aDF

St Matthews Hospital Center

Page 9: so-aDF

Overview• Position and Role of ADF and SOA Suite

• It’s a case of St Matthews Hospital

• ADF Application leveraging SOA Composite Applications

• ADF Faces provides UI for Human Task

• Leverage the ADF BAM Data Control

• ADF BC feeding business events into EDN

• ADF BC - the new Database Adapter?

– providing advanced database access through SDO

• Some SOA Concepts in ADF application development

Page 10: so-aDF

St Matthews On Line:Request Appointment for Patient

• ADF Faces Web Application for GPs to request a new appointment for a patient

– Invokes the SOA Composite application PatientAppointmentService as WebService

– Response: appointment identifier

• Additionally:

– Request status of appointment (date/time, instructions)

– Cancel apppointment

Page 11: so-aDF

SOA Composite applicationPatientAppointmentService

Page 12: so-aDF

getTask… claim okrequest… cancel statusfind…PatientsVw

ADF Model

RDBMS

EJB & JPA(EclipseLink)

ADF BC

WebService-RESTful-SOAP-SCA Composite

Content Repository

BAMServer

POJO

Human Task(SOA Suite Workflow Services)

Mobile-ADF Faces Mobile-Native Mobile Client

ADF Faces

Rich Client

JSP, Servlet

Web Service-RESTful-SOAP-Portlet

Desktop-Swing-MS Office

PatientAppointmentServiceData Control

PatientsServiceData Control

“anything Java can access”

ScheduleAppointmentTaskData Control

Page 13: so-aDF
Page 14: so-aDF
Page 15: so-aDF
Page 16: so-aDF

Alternative ways to call SOA Composite’s services from ADF

Instead of calling an XML/HTTP/SOAP based WebService

• An ADF Application could use the ADF Binding

– Via RMI, exchanging XML messages

• Or the EJB Binding

– Via RMI, exchanging (serialized) Java objects

• Note: the ADF Binding and the EJB Binding need to have been explicitly exposed

Page 17: so-aDF

ADF applications with Data Controls consuming Web Services

• WebService Data Control

• WebService Proxy (POJO) published as Data Control

• WebServiceProxy wrappedby ADF BC

– Override doDML, doSelect,…

ADF Model

EJB & JPA(EclipseLink)

ADF BC

WebService-RESTful-SOAP-SCA Composite

POJO

POJO

Page 18: so-aDF

Overview• Position and Role of ADF and SOA Suite

• It’s a case of St Matthews Hospital

• ADF Application leveraging SOA Composite Applications

• ADF Faces provides UI for Human Task

• Leverage the ADF BAM Data Control

• ADF BC feeding business events into EDN

• ADF BC - the new Database Adapter?

– providing advanced database access through SDO

• Some SOA Concepts in ADF application development

Page 19: so-aDF

ADF Faces provides User Interface for Human Tasks in SOA Suite

• Human Task is an asynchronous service

– Task details and data payload are the request

– The task outcome and the enriched payload are the response

• The execution of the service is ‘the ghost in the machine’: a human operator

– Who needs a user interface

• The UI is implemented in ADF Faces

Page 20: so-aDF

The SchedulerService• When an Appointment is requested for a patient

– The PatientAppointmentService is initiated and hits the ‘ScheduleAppointment’ human task

– The task is assigned and appears in the WorklistApplication; the assignees are notified

• When an assignee opens the task in the worklistapplication, the special Task UI opens

– Worklist application embeds the task flow

Page 21: so-aDF

Default Task Form for Human Task• For human tasks in SOA Composite applications

– A default Task Form can be generated

– With buttons for the supported outcomes

– And Form elements for the payload• Read only and updatable

Page 22: so-aDF

Specialized Task Flows

• Alternatively: a specialized task flow can becreated for the humantask

Page 23: so-aDF

Create ADF Task Flow based on Human Task definition

Page 24: so-aDF

Add Task action binding to page

Page 25: so-aDF

Configure Task Flow for Human Task component in FMW EM

Page 26: so-aDF
Page 27: so-aDF

ADF Faces Web Application X

TaskForm CTaskForm D

SOA Suite

Workflow

ServicesIFRAME

ADF Faces Web Application Y

TaskForm ATaskForm B

Page 28: so-aDF

Overview• Position and Role of ADF and SOA Suite

• It’s a case of St Matthews Hospital

• ADF Application leveraging SOA Composite Applications

• ADF Faces provides UI for Human Task

• Leverage the ADF BAM Data Control

• ADF BC feeding business events into EDN

• ADF BC - the new Database Adapter?

– providing advanced database access through SDO

• Some SOA Concepts in ADF application development

Page 29: so-aDF

Introducing Business Activity Monitoring

• Operational Business Intelligence

• Data fed in from many sources:

– RFID sensors, BPEL, Database Triggers, RSS, ODI

• Real Time insight

• Dashboard

• Live updates

• Looking for threshold crossing, exceptions, trends, missing events

• Display visually and turn into alerts & notifications

Page 30: so-aDF

Introducing Business Activity Monitoring

ADF Application

Page 31: so-aDF

Embedding real time displays based on BAM Data Control

• Configure connection to BAM Server

• Create BAM Data Control

– Based on Data Objects inActive Data Cache

• Drag & Drop Data Control’scollections & attributes toADF Faces pages

– Just like ADF BC Data Control

– However: BAM Data Control is active

Page 32: so-aDF
Page 33: so-aDF

Configuring a ADF Faces 11g Graph based on a BAM Data Control

Page 34: so-aDF

Live & Real Time dashboard in regular ADF Web Application

• Active Data Service (‘server push’) will pick changes in the BAM Data Control

– Underlying BAM ADC Data Object

• And push them tothe chart (or table)in the ADF page

Page 35: so-aDF

Overview• Position and Role of ADF and SOA Suite

• It’s a case of St Matthews Hospital

• ADF Application leveraging SOA Composite Applications

• ADF Faces provides UI for Human Task

• Leverage the ADF BAM Data Control

• ADF BC feeding business events into EDN

• ADF BC - the new Database Adapter?

– providing advanced database access through SDO

• Some SOA Concepts in ADF application development

Page 36: so-aDF

Event Driven Architecture

Dealer

Order

Event Pool

Sales Desk

Marketing

Customer Relations

Shipping

Page 37: so-aDF

Producer

EventDeliveryNetwork

Consumer

Consumer

Examples of events:

-User clicked on button

-Field was changed

-Record in table is being updated

-Result of query has changed

-Tom posted message on forum

-Order was dispatched

-Customer has changed address

- Patient has died or moved

Examples of event consumers:

-Server side actionListener

-clientListener, onValidateItem triggger

-Database table trigger

-Change Notification Handler

-Activity Stream

-Complex Event Processor

-Synch CRM BPEL process

- SOA Composite application

Page 38: so-aDF

ADF Faces Web ApplicationPatientAdministration

PATIENTS

Application ModulePatientsService

Entity ObjectPatient

View ObjectPatientsVw

ADF Business

Components

Page 39: so-aDF

ADF Application for Patient Administration

• One Business Event defined at St. Matthews is the ‘Patient has moved’ event

• Any application, process or service that (first) registers or detects that event should publish it

• The Patient Administration application is one point of origination for this business event

– And therefore should publish it to the EDN

• ADF Business Components has an easy integration with EDN

Page 40: so-aDF

ADF Faces Web ApplicationPatientAdministration

SOA Suite

EDN

PATIENTS

Application ModulePatientsService

Entity ObjectPatient

View ObjectPatientsVw

ADF Business

Components

PatientHasMoved

Page 41: so-aDF

Configure ADF BC Entity Objects

Page 42: so-aDF

Define the Business Events

Page 43: so-aDF

Consume Event in SOA Suite

Page 44: so-aDF

And…. Action!!

Page 45: so-aDF

ADF consuming EDN events

Steps:

• EDN events published on JMS

• ADF Faces application has registered as listener on the JMS queue

– An application scope bean collects events in ‘active data collection’

• ADF Faces page contains Active Table based on the ‘active data collection’

– New EDN events are pushed to the ADF Faces UI

Page 46: so-aDF

Much more on events…

Page 47: so-aDF

Overview• Position and Role of ADF and SOA Suite

• It’s a case of St Matthews Hospital

• ADF Application leveraging SOA Composite Applications

• ADF Faces provides UI for Human Task

• Leverage the ADF BAM Data Control

• ADF BC feeding business events into EDN

• ADF BC - the new Database Adapter?

– providing advanced database access through SDO

• Some SOA Concepts in ADF application development

Page 48: so-aDF

ADF BC providing Data Access service to BPEL processes

• SOA Suite communicates with database through Database Adapter (or AQ Adapter)

– SQL (select, DML), PL/SQL and polling

• Alternatively, Service Data Objects and a Data Access Service can be used

– XML and HTTP based

– Stateful dataset & two-way synchronization

Page 49: so-aDF

DBAdapter

ADF Faces Web ApplicationPatientAdministration

SOA Suite

EDN

PATIENTS

Application ModulePatientsService

Entity ObjectPatient

View ObjectPatientsVw

(SDO) Web Service

PatientsService

ADF Business

Components

Page 50: so-aDF

ADF BC, SDO and BPEL

• ADF BC Application Module can be exposed as Service Interface that is SDO enabled

• The SOA Suite ADF BC binding adapter connects to the SDO Service Interface

• BPEL Variables can be based on SDO Entity

– BPEL activity Create Entity does Insert

– BPEL activity Bind Entity does retrieve

– Assign in BPEL results in call to update on SDO

Page 51: so-aDF

Expose ADF BC Service Interface

Page 52: so-aDF

Test SDO enabled Service Interface

Page 53: so-aDF

Using the ADF-BC Binding Adapter

Page 54: so-aDF

Create SDO Entity based variable in BPEL process

Page 55: so-aDF

Replace call to Insert Database Adapter option with Create Entity

Page 56: so-aDF
Page 57: so-aDF

BPEL activity Bind Entity does ‘select * into BPEL variable’

Page 58: so-aDF

What SDO will do for us

• When the Entity Variable has been Created or Bound

• Then a link persists between the SDO Service and the BPEL variable

– When the BPEL variable is manipulated, the SDO Service is notified

– When the SDO is changed, the BPEL variable is synchronized

• For example when the ADF BC ViewObject or a database trigger does enrichment/conversion

Page 59: so-aDF

PATIENTS

Application ModulePatientsService

Entity ObjectPatient

View ObjectPatientsVw

(SDO) Web Service

PatientsService

ADF Business

Components

ADF Faces Web ApplicationOtherPatientAdministration

Application ModuleSpecialPatientsService

Entity ObjectPatient

View ObjectPatientsVw

ADF BusinessComponents

ADF Faces Web Application

PatientAdministration

?

Page 60: so-aDF

Service Enabled Entity Objects

• ADF BC supports Service Enabled Entity Objects based on ViewObjects in Service Interface of Application Module

• ADF takes care of turning local operations on ViewObject into WebService call to remote ADF service provider

• The consuming application uses ADF BC as always –with some limitations

– No joins in ViewObjects based on service enabled entities

– Separate transactions for service enabled and local entities

Page 61: so-aDF

Creating a Service Enabled Entity Object

Page 62: so-aDF

Overview• Position and Role of ADF and SOA Suite

• It’s a case of St Matthews Hospital

• ADF Application leveraging SOA Composite Applications

• ADF Faces provides UI for Human Task

• Leverage the ADF BAM Data Control

• ADF BC feeding business events into EDN

• ADF BC - the new Database Adapter?

– providing advanced database access through SDO

• Some SOA Concepts in ADF application development

Page 63: so-aDF

SOA and UI – Different Worlds?

• Some services require or interact with a user interface. For instance: BPEL process containing Human Tasks.

• Taking it one step further: some user interfaces can be treated/offered/used like services!

Page 64: so-aDF

UI Application can be a Service too• Applications can be exposed as a collection of UI

services - user interface components based on data and (data)services

• For example in the form of "portlets" that can be consumed by a Portal product in a mash up

Data

Page 65: so-aDF

Remember the SOA Concepts?

• Services with standardized Contracts

• Producers and Consumers

• Cross-platform/technology

• Independent development/management of components

• Decoupling

• Events

Page 66: so-aDF

Applying SOA Concepts to UI:WSRP Portlets

• WSRP Standard: WebService for Remote Portlet

– Exposed by Portlet Container (or Provider)

– Portlet renders its own UI/the content (HTML)

– Contract includes (input) parameters (String or String[]) and events (out, simple payload)

• Called by Portal/Portlet consumer

• Portlets can deal with data manipulation, events, navigation, AJAX and partial refresh

Page 67: so-aDF

Portlet and Decoupling

• Just like normal web services

– Portlets can be located anywhere(we only need URL for endpoint)

– Portlets can be implemented in any technology – as long as the standards are followed

– The implementation of Portlets can change• as long as the contract (parameters/events) is safe

• Ideally the Portlet uses (style) classes and allows the consumer to apply the stylesheet

Page 68: so-aDF

Drawing the Analogy

Traditional SOA Components:• Application ( = Consumer)

• Webservices ( = Service + Contract)

• Enterprise Service Bus ( = Service Provider)

• Queues (= Events and Event Listeners)

WSRP Portlet Components:• Portal ( = Consumer)

• WRSP Portlets ( = Service + Contract)

• Portlet Providers ( = Service Provider)

• Produces events for Portal (= Events and Event Listeners)

Page 69: so-aDF

ADF Task Flows• With Oracle ADF (underlying UI technology of

WebCenter) comes an alternative way to develop UI Services: ADF Task Flows

• ADF Task flows are Portlet-like in many respects: stand alone, independently developable, reusable UI component

• Task Flow = one or multistep view, internal business logic, navigation flow, beans, …

– Communication from and to Task Flows through (contextual) events

Page 70: so-aDF

Task Flow Contract

• Like Portlets, ADF Task Flows adhere to a Contract (native ADF).

Input:Parameters (initial)EventsNavigation commands

Output(Changed) ParametersEventsNavigation events

Page 71: so-aDF

Comparing UI Service technologiesPortlet

• Remote

• Cross Technology

• Standards based

• Processing overhead– Slower page rendering

• Design Time and Run Time decoupling– Remote provider has to be up

• Needs portlet consumption framework, e.g. WebCenter– And portlet publication

Task Flow

• Local, native, ADF only

• Shared– Data Controls

– Transaction context

– Skin/Style

– Client side JavaScript & UI

• Rich Contract– Complex parameters

– Events out and in

• With complex payload

– Navigation influence

• Support for customization

Page 72: so-aDF

Development with Portlets & Task Flows

• The use of Portlets and Task Flows allows for a decoupled way of developing applications

– Teams agree on a contract

– And both work their merry way based on the contract – in fairly insulated manner

• Reuse is possible based on that contract

• Maintenance of Portlet and Task Flow can be independent of consuming applications

– Note: task flow is integrated at design time

Page 73: so-aDF

74

Summary and Conclusion

• ADF applications can make use of the WebServices exposed by SOA applications

• SOA Composites rely on ADF for

– ADF Faces to provide the UI for Human Tasks

– ADF BC to provide Data(base) access services

• ADF can also: publish events to EDN, expose BAM data, implements Admin UIs for SOA Suite

• Some SOA concepts are best practices in ADF application development too

Page 74: so-aDF

Resources• Presentation and demos are on our blog

– http://technology.amis.nl/blog

• Contact me at:[email protected]