Integration Between Java and Oracle BPEL Process Manager by variablepitch339

VIEWS: 22 PAGES: 45

									               

Integration Between Java and Oracle BPEL Process Manager: What Every Java Developer Should Know About BPEL
Lucas Jellema ( Oracle ACE) Oracle Open World 2006 Monday 23rd October
 

1

Integration Between Java and Oracle BPEL Process Manager: What Every Java Developer Should Know About BPEL

Overview
               

 Introduction of Service Oriented Architecture and BPEL (Business Process Execution Language)  Interaction between Oracle BPEL PM & Java
 Calling BPEL Services from Java Applications  Invoking Java based Services from a BPEL Process  Customize the Oracle BPEL PM Infrastructure
• Identity Service, Dynamic Task Assignment,..

 Enhance the User Interface – looks and functionality
• Process instance access beyond the Console • Custom Task & Workflow Applications

 Demonstrations!  Conclusions
 

2

Integration Between Java and Oracle BPEL Process Manager: What Every Java Developer Should Know About BPEL

The SOA principles
               

 Attitude, Way of thinking
 No individual, stand-alone applications  Instead:
• Implementations of business processes • composition of services • Optional: execution in a container

 Reuse of services
 Loosely coupled  Standardized interfaces  Central management facilities
 

3

Integration Between Java and Oracle BPEL Process Manager: What Every Java Developer Should Know About BPEL

Services in various shapes
               

 Library (dll, jar)  EJB  URL  RSS feed  Portlet  SOAP WebService  Database View  ….

If it exposes a clear, standardized interface

 

4

Integration Between Java and Oracle BPEL Process Manager: What Every Java Developer Should Know About BPEL

Timemachine….?
               

Are we back in 2000 => 1995 => 19990 => …..? What is new? Why is this such a hype?
 

5

Integration Between Java and Oracle BPEL Process Manager: What Every Java Developer Should Know About BPEL

SOA in 2006
               

Standards!

 Industry-wide, supported by major vendors and governing bodies
 

6

Integration Between Java and Oracle BPEL Process Manager: What Every Java Developer Should Know About BPEL

SOA in 2006: Standards
               

 XML  Interfaces & protocols
 From CORBA, DCOM, RMI to JMS, JCA and most importantly SOAP Web Services  Internet & HTTP

 Cross Technology Bridges
 Apache WSIF, SOAP WebServices, Adapters in MOM, ESB and BPEL

 Formal service specification using WSDL  Tool and Programming-language support
 IDEs, Frameworks, Libraries, Browsers

 Infrastructures
 BPEL Container, Enterprise Service Bus, Web Service Management , Rule Engines
 

7

Integration Between Java and Oracle BPEL Process Manager: What Every Java Developer Should Know About BPEL

Service Oriented Architecture Benefits
               

 Money
 Lower IT development costs due to high level of reuse  Cost reduction through less manual action in business process execution

 Time
 Shorter time to market of business processes  Quicker execution of business processes

 Quality
 Higher quality systems through reuse of proven components and services  Better process execution because of better interfaces and reduced humanual intervention
 

8

Integration Between Java and Oracle BPEL Process Manager: What Every Java Developer Should Know About BPEL

Overview
               

 Introduction of Service Oriented Architecture and BPEL (Business Process Execution Language)  Interaction between Oracle BPEL PM & Java

 Calling BPEL Services from Java Applications
 Invoking Java based Services from a BPEL Process  Customize the Oracle BPEL PM Infrastructure
• Identity Service, Dynamic Task Assignment,..

 Enhance the User Interface – looks and functionality
• • Process instance access beyond the Console Custom Task & Workflow Applications

 Demonstrations!  Conclusions
 

9

Integration Between Java and Oracle BPEL Process Manager: What Every Java Developer Should Know About BPEL

Java application is looking for a 360 degrees customer view
               

JCA
Files

Java Application

CRM CRM OLD
EJB

CRE DIT FINAN CIAL
Socio Sys
PL/SQL
 

SOAP

ORDERS

Oracle EBS API

10

Integration Between Java and Oracle BPEL Process Manager: What Every Java Developer Should Know About BPEL

Challenges
               

 The number of technologies to interface with
 Skills required  Complexity of resulting code

 The number of data structures and formats  The very real danger of changes
 Moving service endpoints  Changing Service APIs

 Reusing the “360 degrees Customer profile” service  Monitor (trace, audit, debug) service execution
 

11

Integration Between Java and Oracle BPEL Process Manager: What Every Java Developer Should Know About BPEL

SOA-style approach: Create a BPEL Service as intermediary
               

JCA Files

Java Application

CRM CRM OLD
EJB

CRE DIT FINAN CIAL
Socio Sys
PL/SQL
Oracle EBS API

SOAP

ORDERS

 Note: could also be done using an Enterprise Service Bus!
 

12

Integration Between Java and Oracle BPEL Process Manager: What Every Java Developer Should Know About BPEL

Calling BPEL Service from Java
               

 Calling a SOAP WebService
 For example using Apache AXIS, JAX-RPC

 Calling a remote Enterprise Java Bean (Session Bean) from another JVM
 Generic Java API

 Making a local (intra JVM) call using the local interface
 Generic Java API

 

13

Integration Between Java and Oracle BPEL Process Manager: What Every Java Developer Should Know About BPEL

The BPEL CustomerProfileService
               

JCA

CRM

Files

CRM OLD
EJB

CRE DIT FINAN CIAL Socio Sys

ORDERS
PL/SQL

SOAP

Oracle EBS API

 

14

Integration Between Java and Oracle BPEL Process Manager: What Every Java Developer Should Know About BPEL

Calling BPEL Service from a Java Application using RMI and BPEL Session Bean
               

 Java Application is local client
 That invokes a (remote) service
• possibly In a different JVM

Oracle BPEL PM Server RMI Port
IDeliveryService Session Bean

... invoke BPEL Service; ...

Java Application

Application Server

Local JVM
 

18

Integration Between Java and Oracle BPEL Process Manager: What Every Java Developer Should Know About BPEL

Java Application Calling BPEL Service
               

 

19

Integration Between Java and Oracle BPEL Process Manager: What Every Java Developer Should Know About BPEL

Java Application Calling BPEL Service (2)
               

Oracle BPEL PM Server IDeliveryService Session Bean RMI Port

 

20

Integration Between Java and Oracle BPEL Process Manager: What Every Java Developer Should Know About BPEL

Putting a Faces on a BPEL Service
               

 Create a Java Client GUI or a Java Web Application that exposes the BPEL Service  Using Java Server Faces – ADF Faces in Oracle JDeveloper 10.1.3
 Create BPEL WebService DataControl from WSDL  Create new JSF JSP page  Drag & Drop UI Components based on DataControl  Run

 

21

Integration Between Java and Oracle BPEL Process Manager: What Every Java Developer Should Know About BPEL

Overview
               

 Introduction of Service Oriented Architecture and BPEL (Business Process Execution Language)  Interaction between Oracle BPEL PM & Java
 Calling BPEL Services from Java Applications

 Invoking Java based Services from a BPEL Process Do not ask what BPEL can  Customize the Oracle BPEL PM Infrastructure do for you: ask • Identity Service, Dynamic Task Assignment,.. what you  Enhance the User Interface – do for BPEL! can looks and functionality
• • Process instance access beyond the Console Custom Task & Workflow Applications

 Demonstrations!  Conclusions
 

22

Integration Between Java and Oracle BPEL Process Manager: What Every Java Developer Should Know About BPEL

Calling Services from a BPEL Process
               

 A BPEL Process is typically a combination of
 XML data manipulation  Simple flow logic Loop, Decision Point, Wait,…  Service Calls CRM
JCA

Files

 Services can be
 implemented in virtually any technology  invoked through a substantial number of protocols and adapters
FINAN CIAL Socio Sys
PL/SQL
Oracle EBS API

CRM OLD
EJB

CRE DIT

ORDERS

SOAP

• HTTP, EJB, JCA, JMS, Oracle Apps, Email, FTP, File, Fax, SMS, Java (WSIF), …
 

23

Integration Between Java and Oracle BPEL Process Manager: What Every Java Developer Should Know About BPEL

Implement Business Process in a SOA
               

 We will see a shift from „developing applications‟ to „implementing business processes‟  Business processes are implemented as a chain of service calls with some orchestration on top  Services do most of the actual work
 Providing and processing data from enterprise stores  Calculations, Validations and Conversions  Reporting and Interacting

 A large portion of the functionality required by business processes is already available
 In existing (legacy) applications  In a plethora of technologies, including Java

 Exposing existing functionality as reusable service is key
 

24

Integration Between Java and Oracle BPEL Process Manager: What Every Java Developer Should Know About BPEL

SOA and Java Services
               

 Reusable functionality implemented in Java can have one or more of several interface styles
    public method on POJO Servlet EJB SOAP WS

 A BPEL Process can invoke each of these interface styles  A BPEL Process can act as wrapper for Java based Services
 Service (URL and Protocol) Virtualization
 

25

Integration Between Java and Oracle BPEL Process Manager: What Every Java Developer Should Know About BPEL

Calling Java Services from a BPEL Process
               

 Call a SOAP WebService
 And wrap the Java service as a WebService

 Call a Java Service wrapped with a WSIF binding
 For either EJB, Servlet/Http and plain (local) Java

 Use exec tag to execute (local) Java code
 <bpelx:exec> to execute a snippet of Java code  The snippet can invoke Entity and Session EJBs  Not part of BPEL standard

 

26

Integration Between Java and Oracle BPEL Process Manager: What Every Java Developer Should Know About BPEL

Calling the Java Service through WSIF JavaBinding
               

 POJO PriceCalculator

 BPEL Process GetPriceQuote
 Needs to call PriceCalculator for getting the base price  May add some discounting logic…

 

27

Integration Between Java and Oracle BPEL Process Manager: What Every Java Developer Should Know About BPEL

The WSIF-WSDL file for the PriceCalculator
               

 Describes the Service details for consumers
 What:

 Where:

 Mapping WSDL/Java:

 

28

Integration Between Java and Oracle BPEL Process Manager: What Every Java Developer Should Know About BPEL

Include PriceCalculatorService in the BPEL GetPriceQuote Process
               

 Create PartnerLink
 Browse for WSIF WSDL

 From here on there is no difference between Java & WSIF based services and other services

 Note: the Java Classes need to be available on the BPEL PM Server
 

29

Integration Between Java and Oracle BPEL Process Manager: What Every Java Developer Should Know About BPEL

Running the GetPriceQuote BPEL Process
               

 

30

Integration Between Java and Oracle BPEL Process Manager: What Every Java Developer Should Know About BPEL

Overview
               

 Introduction of Service Oriented Architecture and BPEL (Business Process Execution Language)  Interaction between Oracle BPEL PM & Java
 Calling BPEL Services from Java Applications  Invoking Java based Services from a BPEL Process

 Customize the Oracle BPEL PM Infrastructure
• Identity Service, Dynamic Task Assignment,..  Enhance the User Interface – looks and functionality
• • Process instance access beyond the Console Custom Task & Workflow Applications

 Demonstrations!  Conclusions
 

31

Integration Between Java and Oracle BPEL Process Manager: What Every Java Developer Should Know About BPEL

Customize the Oracle BPEL PM Infrastructure
               

 Oracle BPEL PM has many extension points for its plumbing infrastructure
 These allow you to plug-in custom developed services complementing or overriding standard functionality  Developed in Java, implementing Services prescribed Application Server interfaces Systems  Configure in Oracle BPM \bpel\services\config\.... People .xml files
Human Workflow Notification Services (Mail, Wireless) Identity Services (OID, LDAP, JAZN)

Java Services

Enterprise Data Hub Data Virtualization, Data Synchronization

 

32

Integration Between Java and Oracle BPEL Process Manager: What Every Java Developer Should Know About BPEL

Customize the Oracle BPEL PM Infrastructure
               

 Dynamic Task Assignment
 Standard: Least Busy, Most Productive, Round Robin  For example: assign tasks to users based on specific information like „who is expert in the subject‟  Configure in wf-dynamic-assign-cfg.xml

 Custom Identity Service
 Standard: JAZN, LDAP  For example: Custom service for Users & Roles defined in our own database schema and structure  Also see sample: samples\hw\isplugin\db  Configure in \bpel\system\services\config\is_config.xml
 

33

Integration Between Java and Oracle BPEL Process Manager: What Every Java Developer Should Know About BPEL

Custom Dynamic Task Assignment Service
               

public class DynamicUser implements IDynamicUserAssignmentFunction { ... public synchronized String getUserAssignment(List usernames, String realm, String[] parameters) throws DynamicAssignmentException { List<String> candidates; candidates = getUsersForTopic(parameters[1]); if (candidates.size() == 0) { candidates = getUsersForTopic("others"); // the final hope is jstein! if (candidates.size() == 0) { candidates.add("jstein"); } } Random generator = new Random(); int randomIndex = generator.nextInt( candidates.size() ); return candidates.get(randomIndex); } ...
 

34

Integration Between Java and Oracle BPEL Process Manager: What Every Java Developer Should Know About BPEL

Overview
               

 Introduction of Service Oriented Architecture and BPEL (Business Process Execution Language)  Interaction between Oracle BPEL PM & Java
 Calling BPEL Services from Java Applications  Invoking Java based Services from a BPEL Process  Customize the Oracle BPEL PM Infrastructure
• Identity Service, Dynamic Task Assignment,..

 Enhance the User Interface – looks and functionality
• Process instance access beyond the Console • Custom Task & Workflow Applications

 Demonstrations!  Conclusions
 

35

Integration Between Java and Oracle BPEL Process Manager: What Every Java Developer Should Know About BPEL

BPEL Processes and Human Workflow
               

 Many Business Processes require a form of humanual activities
 choose, approve, confer, communicate

 BPEL Processes often contain such humanual steps
 in addition to automated service calls

 A User Interface is typically required for the human workflow steps
 Email to notify  Worklist to presents the outstanding tasks  (Web) User Interface to inspect the task details, perform the required operations and complete the task

 Java Web Applications are very well suited for providing this Humanual Task User Interface
 

36

Integration Between Java and Oracle BPEL Process Manager: What Every Java Developer Should Know About BPEL

Workflow and Standard Worklist Application
               

Eclipse, JDeveloper BPEL Designer Task Metadata

Supervisor Work Assignee Process Owner

Update Task

Worklist Application

WSDL Contract

Component Services
Task Management Service (Task data, forms, Attachments) Task Routing Service (Assignment, Dispatching) Identity Service (Users, Roles)

Assign Tasks

Human Workflow Service

Task Complete

Worklist Service (Task Query, Reporting )

BPEL Process

User Metadata Service (Rules, work queues )

Notification Service (Email & wireless)

 

37

Integration Between Java and Oracle BPEL Process Manager: What Every Java Developer Should Know About BPEL

Composing a more complex BPEL Process: The ProcessOrder Service
               

 The ProcessOrder service
1
2

3 4 5
6

 takes an order for a specific customer  gets a price quote from the GetPriceQuote service  gets the customer profile from the CustomerProfileService  awards a discount depending on the CustomerStatus  processes the order straight into the Orders Database  returns the total price for the order

 

38

Integration Between Java and Oracle BPEL Process Manager: What Every Java Developer Should Know About BPEL

The ProcessOrder Service
               

ProcessOrder

2
5

GetPriceQuote

orders

3 3 1 6
4
CRM CRM OLD

2

Customer ProfileService

5
CRE DIT FINAN CIAL Socio Sys ORDERS

 

39

Integration Between Java and Oracle BPEL Process Manager: What Every Java Developer Should Know About BPEL

Workflow extension of the ProcessOrder Service
               

 If order total is over 10k and the customer status is GOLD, let‟s try to negotiate a deal
 Start workflow in which a human needs to negotiate a deal, update the total price and complete the workflow  An email is sent for notification of the employee to start working on the deal-task  A Java Web UI is used to present the task details and allow update of Total Price and Task Status  When the Workflow completes, the ProcessOrder process resumes, possibly with an updated TotalPrice

 

40

Integration Between Java and Oracle BPEL Process Manager: What Every Java Developer Should Know About BPEL

ProcessOrder BPEL Process with Workflow
               

 

41

Integration Between Java and Oracle BPEL Process Manager: What Every Java Developer Should Know About BPEL

Very slightly modified Generic Oracle BPEL PM Worklist Application
               

 

42

Integration Between Java and Oracle BPEL Process Manager: What Every Java Developer Should Know About BPEL

Programmatic access to BPEL Workflow
               

 Our Java Application can implement the interface for (human) workflow activities in BPEL processes
 Java GUI (Swing), Java Web App, Java WebService can invoke the WorkList Service

Oracle BPEL PM Server RMI Port
IDeliveryService Session Bean

... - Invoke remote WorkList Service; - Get Tasks - Execute Task and Update Worklist ...

Java Application

Application Server

Local JVM
 

43

Integration Between Java and Oracle BPEL Process Manager: What Every Java Developer Should Know About BPEL

Programmatically Accessing the WorkList Service
               

 

44

Integration Between Java and Oracle BPEL Process Manager: What Every Java Developer Should Know About BPEL

Programmatically Accessing the WorkList Service
               

 

45

Integration Between Java and Oracle BPEL Process Manager: What Every Java Developer Should Know About BPEL

Overview
               

 Introduction of Service Oriented Architecture and BPEL (Business Process Execution Language)  Interaction between Oracle BPEL PM & Java
 Calling BPEL Services from Java Applications  Invoking Java based Services from a BPEL Process  Customize the Oracle BPEL PM Infrastructure
• Identity Service, Dynamic Task Assignment,..

 Enhance the User Interface – looks and functionality
• Process instance access beyond the Console • Custom Task & Workflow Applications

 Demonstrations!

 Conclusions
 

46

Integration Between Java and Oracle BPEL Process Manager: What Every Java Developer Should Know About BPEL

Conclusions
               

 SOA in general and BPEL in particular promote reuse, loosely coupling, business agility  Java Applications can easily invoke BPEL Services
 Through RMI or SOAP WS

 BPEL Process and call Java based services
 Through WSIF (POJO, EJB, Http/Servlet) or SOAP WS

 Java Applications can provide the User Interface for Humanual steps in BPEL Processes  Java and BPEL – a good team!
 

47

Integration Between Java and Oracle BPEL Process Manager: What Every Java Developer Should Know About BPEL

More information?
               

 Today‟s presentations – and many articles on Java/J2EE, BPEL and Service Oriented Architecture
 as well as the Oracle Database and Development Technology

 On:

http://technology.amis.nl/blog

 

48

Integration Between Java and Oracle BPEL Process Manager: What Every Java Developer Should Know About BPEL


								
To top