2.5 P - BPEL Business Flow Manager in WPS - quiara

watermelonroachdaleInternet και Εφαρμογές Web

30 Ιουλ 2012 (πριν από 5 χρόνια και 17 μέρες)

585 εμφανίσεις

© 2007 IBM Corporation

SOA on your terms and our expertise

Software | WebSphere Process Integration 6.0.2 STEW

WebSphere Process Server 6.0.2



BPEL Business Flow Manager

SOA on your terms and our expertise

Software | WebSphere Process Integration 6.0.2 STEW

© 2007 IBM Corporation

2

Objectives

What's new in Business Flow Manager 6.0.2?

Introduction to


Server controlled page flow


Queries based on business data


Information Integration for BPEL (II4BPEL)


Dynamic invocation of sub
-
processes


Extended support for custom properties


Access to current fault in fault handler




SOA on your terms and our expertise

Software | WebSphere Process Integration 6.0.2 STEW

© 2007 IBM Corporation

4

Business

State

Machines

Elements of WebSphere Process Server

Supports all aspects of process integration

SOA Core

Service Component

Architecture

Business

Objects

Common Event

Infrastructure

Interface

Maps

Business

Object
Maps

Relation
-
ships

Dynamic

Service

Selection

Supporting

Services

Mediation Flows

(ESB)

Business

Rules

z/OS


WebSphere Application Server ND (J2EE Runtime)

Human

Tasks

Business

Processes

Service

Components

Business Process
Choreographer
(BPC)

Business Flow
Manager (BFM)

Human Task
Manager (HTM)

+

=

SOA on your terms and our expertise

Software | WebSphere Process Integration 6.0.2 STEW

© 2007 IBM Corporation

5

Example BPEL Process

2 of 2

SOA on your terms and our expertise

Software | WebSphere Process Integration 6.0.2 STEW

© 2007 IBM Corporation

6

Creating WS
-
BPEL …


BPEL is described as an XML Document …


Not

meant to be particularly human readable!




<sequence>


<assign>


<copy>


<from variable="PO" part="customerInfo"/>


<to variable="shippingRequest"


part="customerInfo"/>


</copy>


</assign>



<invoke partnerLink="shipping"


portType="lns:shippingPT"


operation="requestShipping"


inputVariable="shippingRequest"


outputVariable="shippingInfo">

More …


SOA on your terms and our expertise

Software | WebSphere Process Integration 6.0.2 STEW

© 2007 IBM Corporation

7

Agenda


Server controlled page flow


Queries based on business data


Information Integration for BPEL (II4BPEL)


Dynamic invocation of sub
-
processes


Extended support for custom properties


Access to current fault in fault handler



SOA on your terms and our expertise

Software | WebSphere Process Integration 6.0.2 STEW

© 2007 IBM Corporation

8

Server controlled Page Flow (aka Single Person Workflow)





A common pattern is workflows
controlling the flow of UI
interactions
with a single person.


The business process specifies a series of human tasks to be performed by
the same person.


The business process controls and drives these tasks providing the person
with a flow of UIs.


The UIs presented to that person are the UI definitions associated with these
human tasks.


Between the human activities, other activities can be specified



Examples of processes interacting with single persons


Book order process

Enter shipping & payment, gift
-
wrap, place order


SOA on your terms and our expertise

Software | WebSphere Process Integration 6.0.2 STEW

© 2007 IBM Corporation

9

Server controlled Page Flow




To enable clients to transition from one user facing
activity (human task) of a
process to the subsequent,

the
completeAndClaimSuccessor
API

is provided.


Allows to complete an inline human task activity and claim the succeeding activity for the same person
in one go.


Lets the server handle the required logic, instead of complex logic on the client side requiring multiple
interactions with the server.


WPS

claim
()

completeAndClaimSuccessor()

completeAndClaimSuccessor()

completeAndClaimSuccessor()| complete()

BusinessFlowManagerService

operations

completeAndClaimSuccessor()

User / Client

Page 1

Page 2

Tasklist

Page 3

Page 4

SOA on your terms and our expertise

Software | WebSphere Process Integration 6.0.2 STEW

© 2007 IBM Corporation

10

Agenda


Server controlled page flow


Queries based on business data



Information Integration for BPEL (II4BPEL)


Dynamic invocation of sub
-
processes


Extended support for custom properties


Access to current fault in fault handler



SOA on your terms and our expertise

Software | WebSphere Process Integration 6.0.2 STEW

© 2007 IBM Corporation

11

Queries based on Business Data




User defined queries can be based on business data associated with a
business process.

For example,


Include business data like
Customer

or
Contact#.











Or, retrieve process instances for customer
Sarah Jones

only.



In WMQWF, this feature is known as
Global Key Data Container
.


Benefit:


Get full context over all existing processes


keep track of inter
-
process
dependencies


Ease of use
-

No custom code required

SOA on your terms and our expertise

Software | WebSphere Process Integration 6.0.2 STEW

© 2007 IBM Corporation

12

Queries based on Business Data




Query properties

can be specified for
process
-
level variables

storing business
data
.


BPEL extension
queryProperties

can be defined as sub
-
element for process
-
level BPEL
variable
.


A query property is specified using a BPEL
property

or an inline definition of a property.


The type

of a query property may be of built
-
in XML schema simple type or user
-
defined simple
type based on a built
-
in XML schema type
.





The
query()
method of the generic BPC API allows using query properties via
the database view
QUERY_PROPERTY
.


Database view
QUERY_PROPERTY

can be used in select clause, where clause and/or order
-
by
clause of the
query()

API.


SOA on your terms and our expertise

Software | WebSphere Process Integration 6.0.2 STEW

© 2007 IBM Corporation

13

Queries based on Business Data



SOA on your terms and our expertise

Select variable that stores

business data to be used in queries

1

Add / create query properties

for selected variable

2

SOA on your terms and our expertise

Software | WebSphere Process Integration 6.0.2 STEW

© 2007 IBM Corporation

14

Agenda


Server controlled page flow


Queries based on business data


Information Integration for BPEL (II4BPEL)


Dynamic invocation of sub
-
processes


Extended support for custom properties


Access to current fault in fault handler



SOA on your terms and our expertise

Software | WebSphere Process Integration 6.0.2 STEW

© 2007 IBM Corporation

15

II4BPEL
-

Information Service Activity


Direct integration of information management services (SQL,
ETL, Federation) with BPEL business processes


Access to


Information Server


Access via WebSphere




Information Server Director


Full SQL: Direct access to





relational database systems



Benefits:


Simplified, faster process development, improved flexibility and
performance


Out
-
of
-
box integration
-


direct data access w/o java coding


powerful cross
-
product scenarios

New
palette
item

SOA on your terms and our expertise

Software | WebSphere Process Integration 6.0.2 STEW

© 2007 IBM Corporation

16



Processes

Service Integration

Information

Services

Transformation Maps

Data Quality Routines

Data Integration Flows

Federation

Information Service Activity … Cross
-
Product Integration


Information Server


Including discovery of operations and
invocation


Extract
-
Transform
-
Load (ETL) / Workflow
scenarios


Federated access to heterogeneous
content sources


Full SQL: Direct access to relational
database systems



Inline SQL statements (“SQL snippets”)
allowing direct access to federated data
and SQL routines


Set References
to relational tables


avoiding copies


Late
-
binding of relation
database
systems and relational tables used by
SQL statements (Data Sources)

SOA on your terms and our expertise

Software | WebSphere Process Integration 6.0.2 STEW

© 2007 IBM Corporation

18

Information Service Activity


Information Service

activity can be part of any BPEL business
process.


BPEL Variables hold configuration data (data sources and set
references) and is input to Information Service activity


Direct mapping of input and output parameters to BPEL
variables


Specify details for
Information Service

activities

New
palette
item

SOA on your terms and our expertise

Software | WebSphere Process Integration 6.0.2 STEW

© 2007 IBM Corporation

19

Agenda


Server controlled page flow


Queries based on business data


Information Integration for BPEL (II4BPEL)


Dynamic invocation of sub
-
processes


Extended support for custom properties


Access to current fault in fault handler



SOA on your terms and our expertise

Software | WebSphere Process Integration 6.0.2 STEW

© 2007 IBM Corporation

20

Dynamic Invocation of Sub
-
processes




Dynamic determination of the sub
-
process to be invoked using its name


Sub
-
process is unknown at authoring time, cannot be statically provided.


Identify sub
-
process to be called during runtime providing its name.


Lookup service endpoint for currently valid version of sub
-
process.


Invoke service endpoint.



A Java snippet method (for Java snippets) and an XPath extension
function (for Assign activities) are provided to retrieve the service
reference of a sub
-
process:


getServiceRefForProcessTemplate(
processTemplateName
)

returns the service reference for the specified template; this service reference is to be
assigned to a partner link for invocation eventually.



This capability is also known from WMQWF.


Benefits:


More dynamicity & reuse


Flexible process nesting


Versioning of BPEL sub processes

SOA on your terms and our expertise

Software | WebSphere Process Integration 6.0.2 STEW

© 2007 IBM Corporation

21

Dynamic Invocation of Sub
-
processes



When defining a business process in WID...

1.
Identify variable that holds the
process template name of the sub
-
process to be invoked.

2.
Retrieve service reference for sub
-
process, and assign service reference to partner link of the
invoke activity that will eventually invoke the sub
-
process.


Via
Java Snippet



using Java method
getServiceRefForProcessTemplate







Via
Assign activity



using XPath extension function
wpc:getServiceRefForProcessTemplate








3.
Provide invoke activity that uses the partner link the service reference has been assigned to
previously.

serviceReference = getServiceRefForProcessTemplate(


Input.getString(“template_name”),


“http://www.sample.com/DynamicProcessCallProcess”,


“portType”);

setServiceRefToPartnerLink(“subprocess_partnerlink”, serviceReference)

SOA on your terms and our expertise

Software | WebSphere Process Integration 6.0.2 STEW

© 2007 IBM Corporation

22

Agenda


Server controlled page flow


Queries based on business data


Information Integration for BPEL (II4BPEL)


Dynamic invocation of sub
-
processes


Extended support for custom properties


Access to current fault in fault handler



SOA on your terms and our expertise

Software | WebSphere Process Integration 6.0.2 STEW

© 2007 IBM Corporation

23

Extended Support for Custom Properties




Enhanced support for
process
-
level

custom properties



APIs to retrieve custom properties of a process template.



Queries can be based on custom properties specified for a process template using database view
PROCESS_TEMPL_ATTRIBUTE.



Extended support for custom properties on
activity level



APIs to set and get custom properties of an activity instance

even if the activity has not been reached by process navigation yet.



Interfaces to allow likewise from within a business process, i.e., as part of its logic.


Java snippet methods to get/set activity level custom properties


XPath extension function to get activity level custom properties


Benefits:


add activity custom properties for activities during process life time, even before activity has
been navigated/started


more context information available at runtime


additional way to attach properties to activities and filter on those properties


Note: Not supported for structuring activities (e.g. flow, sequence) and BPEL Event handler


SOA on your terms and our expertise

Software | WebSphere Process Integration 6.0.2 STEW

© 2007 IBM Corporation

24

Agenda


Server controlled page flow


Queries based on business data


Information Integration for BPEL (II4BPEL)


Dynamic invocation of sub
-
processes


Extended support for custom properties


Access to current fault in fault handler



SOA on your terms and our expertise

Software | WebSphere Process Integration 6.0.2 STEW

© 2007 IBM Corporation

25

Error Handling …


Similar to ‘Try/Catch’
mechanism

SOA on your terms and our expertise

Software | WebSphere Process Integration 6.0.2 STEW

© 2007 IBM Corporation

26

Access to Current Fault in Fault Handler




To allow accessing the current fault to be handled, an additional Java
snippet method is provided


getCurrentFaultAsException()
:



Returns fault data, e.g., fault name, the actual exception, its nature.



Exposed to Java code snippets in fault handlers.



Typical use cases:



Analysis of the current fault as part of the implementation of a
catchAll

fault handler.



Handling of
bpc:runtimeFailure



this fault wraps unexpected failures thrown by
the infrastructure, or exceptions thrown by Java code snippets.



Examples:



For problem analysis purpose, details of a fault are to be recorded in addition to the
automatic handling of the fault by the fault handler.



Instead of providing specific fault handlers (
<catch>
) for each fault, a common fault
handler (
<catchAll>
) is handling them all. Within that fault handler, the current fault is
analyzed to distinguish failure situations.

SOA on your terms and our expertise

Software | WebSphere Process Integration 6.0.2 STEW

© 2007 IBM Corporation

27

Access to Current Fault in Fault Handler




Signature of the method to access the current fault:







Example of how to use this method to log a fault in the systemOut.log:



/**


* @returns


* The Java exception object for the current fault. If this method is called


* from a snippet or condition outside a fault handler, null is returned.


*/

public BpelException
getCurrentFaultAsException
();

BpelException exception =
getCurrentFaultAsException
();

System.out.println("Fault " +
exception.getFaultName
() + " has been caught");

System.out.println(" Detailed Information is: ");

exception.printStackTrace
( System.out);

SOA on your terms and our expertise

Software | WebSphere Process Integration 6.0.2 STEW

© 2007 IBM Corporation

28

Summary

BFM in WPS 6.0.2 adds important features and functions

Highlights are



Server controlled page flow


Queries based on business data


Information Integration for BPEL (II4BPEL)


Dynamic invocation of sub
-
processes


Extended support for custom properties


Access to current fault in fault handler

SOA on your terms and our expertise

Software | WebSphere Process Integration 6.0.2 STEW

© 2007 IBM Corporation

29

Appendix: Links


Announcement Letter


http://www
-
306.ibm.com/fcgi
-
bin/common/ssi/ssialias?infotype=an&subtype=ca&appname=Demonstration&htmlfid=897/
ENUS206
-
244



Detailed lab chart deck on BPC 6.0.2 technical updates


http://w3.webahead.ibm.com/w3ki/display/WPS/Home


Technotes on WID


http://www.ibm.com/software/integration/wid/support/


Technotes on WPS


http://www.ibm.com/software/integration/wps/support/


Business Process Choreographer samples


http://publib.boulder.ibm.com/bpcsamp/index.html

SOA on your terms and our expertise

Software | WebSphere Process Integration 6.0.2 STEW

© 2007 IBM Corporation

30


Thank You

Merci

Grazie

Gracias

Obrigado

Danke

Japanese

English

French

Russian

German

Italian

Spanish

Brazilian Portuguese

Arabic

Traditional Chinese

Simplified Chinese

Thai