32
Enhancing a BPEL4WS Engine Enhancing a BPEL4WS Engine Supporting the Execution Supporting the Execution of Flexible WS-flows of Flexible WS-flows According to the ReFFlow Model According to the ReFFlow Model Alejandro Houspanossian Advisor: Prof. Dr. Mariano Cilia April 2006 Tandil, Argentina

Alejandro Houspanossian Advisor: Prof. Dr. Mariano Cilia April 2006 Tandil, Argentina

  • Upload
    alima

  • View
    42

  • Download
    0

Embed Size (px)

DESCRIPTION

Enhancing a BPEL4WS Engine Supporting the Execution of Flexible WS-flows According to the ReFFlow Model. Alejandro Houspanossian Advisor: Prof. Dr. Mariano Cilia April 2006 Tandil, Argentina. Agenda. Introduction Systems Integration and Workflow Technology - PowerPoint PPT Presentation

Citation preview

Page 1: Alejandro Houspanossian  Advisor: Prof. Dr. Mariano Cilia April 2006 Tandil, Argentina

Enhancing a BPEL4WS Engine Enhancing a BPEL4WS Engine Supporting the ExecutionSupporting the Execution

of Flexible WS-flows of Flexible WS-flows According to the ReFFlow ModelAccording to the ReFFlow Model

Alejandro Houspanossian

Advisor: Prof. Dr. Mariano Cilia

April 2006

Tandil, Argentina

Page 2: Alejandro Houspanossian  Advisor: Prof. Dr. Mariano Cilia April 2006 Tandil, Argentina

A. Houspanossian

Enhancing a BPEL Engine - April '06 2

AgendaAgenda

• Introduction – Systems Integration and Workflow Technology

– Context: The BPEL model, BPEL engines, etc.

– Motivation & Goals

• Enhancement Analysis– ActiveBPEL: An Open Source BPEL Engine

– Adopting Open Source Software

– Our Extensions

• Enhancing ActiveBPEL

• Conclusions & Future Work

Page 3: Alejandro Houspanossian  Advisor: Prof. Dr. Mariano Cilia April 2006 Tandil, Argentina

A. Houspanossian

Enhancing a BPEL Engine - April '06 3

IntroductionIntroduction

• Support for Automated Business Processes– (Automated trading relationships)– Coordination of heterogeneous and distributed systems

• (of different companies)

• Coordination (Orchestration)– Workflow Technology

• Workflow description languages– 2 level programming model

• Workflow engines

• Systems Integration– Service Oriented Architectures (SOAs)

• Web services (WSs)

Page 4: Alejandro Houspanossian  Advisor: Prof. Dr. Mariano Cilia April 2006 Tandil, Argentina

A. Houspanossian

Enhancing a BPEL Engine - April '06 4

• Business Process Execution Language for Web Services: BPEL(4WS) – Workflows + Web Services– Standard technology

• Supported by IBM, MS, SAP, BEA (and others) • (Open) Specification (v1.1) released on 2003

• Business processes – are defined as compositions of Web Services (WS-flows)

• Using the BPEL Language (XML-based)

– and then deployed into and executed by • BPEL Engines

• Applications: Document Processing, Groupware, Healthcare Systems, Supply Chain Management, etc.– Enterprise Application Integration– Business-to-Business Interactions

Our Context: BPEL(4WS)Our Context: BPEL(4WS)

Page 5: Alejandro Houspanossian  Advisor: Prof. Dr. Mariano Cilia April 2006 Tandil, Argentina

A. Houspanossian

Enhancing a BPEL Engine - April '06 5

The BPEL Model: an ExampleThe BPEL Model: an Example

<process name="loanApprovalProcess" ...><flow> <links .../> <receive name="receive1" createInstance="yes" portType="apns:loanApprovalPT" ... </receive> <invoke name="invokeapprover"

portType="apns:loanApprovalPT">

</invoke> <invoke name="invokeAssessor" portType="asns:riskAssessmentPT"> ... </invoke> <reply name="reply" portType="apns:loanApprovalPT" ... </reply> <assign name="assign"> ... </assign> </flow></process>

BPEL-Compliant Engine

Page 6: Alejandro Houspanossian  Advisor: Prof. Dr. Mariano Cilia April 2006 Tandil, Argentina

A. Houspanossian

Enhancing a BPEL Engine - April '06 6

• Business processes are long running processes– execution can take days, weeks or months…

• Once deployed, processes cannot adapt– WS failures

– Changing business requirements

• BUT no run time flexibility is provided– BPEL does not provide such constructs

– Which is required in today’s business context

This is the issue we address in this work

Problems with BPEL WS-flowsProblems with BPEL WS-flows

Page 7: Alejandro Houspanossian  Advisor: Prof. Dr. Mariano Cilia April 2006 Tandil, Argentina

A. Houspanossian

Enhancing a BPEL Engine - April '06 7

Motivation & GoalMotivation & Goal

• The ReFFlow Project (@ TU Darmstadt, Germany):

– Dimka Karastoyanova’s Doctoral Dissertation

– Research project in the field of e-commerce and B2B

– An enhanced BPEL model is proposed

• an enhanced BPEL Engine is required …

• Goal of this Work

– Propose and provide an enhanced BPEL engine to support the execution of WS-flows defined according to the ReFFlow Model

Page 8: Alejandro Houspanossian  Advisor: Prof. Dr. Mariano Cilia April 2006 Tandil, Argentina

A. Houspanossian

Enhancing a BPEL Engine - April '06 8

Alternative ApproachesAlternative Approaches

• Develop a BPEL engine from scratch– Workflow engines are complex systems

– Its development is (time-)expensive

• Enhance an existing BPEL engine– Many existing BPEL engines

• Some of them are Open-Source

– Trend towards open-source software (OSS)

• academic, governmental and even industrial projects

• can be modified and extended as desired

• reuse !!

Page 9: Alejandro Houspanossian  Advisor: Prof. Dr. Mariano Cilia April 2006 Tandil, Argentina

A. Houspanossian

Enhancing a BPEL Engine - April '06 9

Enhancing a BPEL engineEnhancing a BPEL engine

• Which engine to enhance?Twister, ActiveBPEL, …

• Which are the enhanced features?New language constructs, status dissemination

• How to implement the extensions?According to standards and current trends

• How to integrate the extensions into an standard BPEL engine?

Flexible approach required

Page 10: Alejandro Houspanossian  Advisor: Prof. Dr. Mariano Cilia April 2006 Tandil, Argentina

A. Houspanossian

Enhancing a BPEL Engine - April '06 10

ActiveBPELActiveBPEL:: an Open-Source BPEL Engine an Open-Source BPEL Engine

• 100% BPEL v1.1 compliant

• Open-Source Java Project

• Robust product, strongly supported by a commercial company

• Aprox. 700 java classes

• Based on servlet containers and app. servers

• v1.0 released in October 2004

• Active development, stable releases once or twice a month

– Bug corrections

– Feature Enhancement

– Non structural changes

We decided to adopt ActiveBPEL

Understand and Extend OSS

Alejandro
Todo bien si no fuera que ahora hay que entender y extender un sistema OSS
Page 11: Alejandro Houspanossian  Advisor: Prof. Dr. Mariano Cilia April 2006 Tandil, Argentina

A. Houspanossian

Enhancing a BPEL Engine - April '06 11

Enhanced FeaturesEnhanced Features

• Which are the enhancements?– Find and bind

– Evaluate

– Attaching loosely-coupled clients

Page 12: Alejandro Houspanossian  Advisor: Prof. Dr. Mariano Cilia April 2006 Tandil, Argentina

A. Houspanossian

Enhancing a BPEL Engine - April '06 12

The The find-and-bindfind-and-bind Mechanism Mechanism

Find-and-Bind(Core functionality)

Se r vi c eR eg i s tr y

3-List of Matching Services

2-Find CompliantServices

1-On fault detected

5-Replace WS

Fault !

4 – Select WS

Page 13: Alejandro Houspanossian  Advisor: Prof. Dr. Mariano Cilia April 2006 Tandil, Argentina

A. Houspanossian

Enhancing a BPEL Engine - April '06 13

The The find-and-bindfind-and-bind Mechanism* (Cont.) Mechanism* (Cont.)

<?xml version="1.0" encoding="UTF-8"?>

<process name="MyLoanBusinessProcess"...>

...

<invoke

partnerLink=“assessor"

portType=“asns:riskAssessmentPT”

operation=“assess” inputVariable=“assessmentRequest” outputVariable=“assessment”>

<find_bind policy_id="PickOne"/>

</invoke>

...

</process> Public UDDI Registry

UDDI4J

UDDI Spec. WSDL Spec.

Using WSDL in UDDI TN

find-and-bind(Core)

* Implementation Presented in the 9th IEEE International Enterprise Distributed Object Computing Conference (EDOC 2005), Enschede, The Netherlands, September 2005: Karastoyanova, Houspanossian, Cilia, Leymann, Buchmann

Page 14: Alejandro Houspanossian  Advisor: Prof. Dr. Mariano Cilia April 2006 Tandil, Argentina

A. Houspanossian

Enhancing a BPEL Engine - April '06 14

The The EvaluateEvaluate Mechanism Mechanism

<?xml version="1.0" encoding="UTF-8"?><process name="MyCurrencyConverterBP"...>...<invoke

partnerLink="rate" portType="ws1:MyCurrencyRateService" operation="getRate"

inputVariable="rateRequest" outputVariable="rate">

<evaluate activated="no" changeType="portType/operation"

substitute="newPortType/newOperation" policy_id="PickOne"/>

</invoke>...</process>

PortType A

PortType B

<evaluate>

Page 15: Alejandro Houspanossian  Advisor: Prof. Dr. Mariano Cilia April 2006 Tandil, Argentina

A. Houspanossian

Enhancing a BPEL Engine - April '06 15

The The EvaluateEvaluate Mechanism (Cont.) Mechanism (Cont.)

Page 16: Alejandro Houspanossian  Advisor: Prof. Dr. Mariano Cilia April 2006 Tandil, Argentina

A. Houspanossian

Enhancing a BPEL Engine - April '06 16

Attaching Loosely Coupled ClientsAttaching Loosely Coupled Clients

Observe

Extended BPEL engine

BPEL engine(open-source)

Auditing

Monitoring

BPELevents

1:N

ListenDisseminate

Page 17: Alejandro Houspanossian  Advisor: Prof. Dr. Mariano Cilia April 2006 Tandil, Argentina

A. Houspanossian

Enhancing a BPEL Engine - April '06 17

Enabling the Attachment of Loosely Coupled ClientsEnabling the Attachment of Loosely Coupled Clients

• This extension must:– observe state changes (BPEL execution)

• process definitions are deployed and undeployed• process instances are created, terminated, suspended and

resumed • process activities change their status (ready to execute,

executing, completed or faulted) • but also process-related errors and exceptions while

executing

– and disseminate events

• Clients listen to (some of) these events– Process monitors, auditing tools, BI tools

Page 18: Alejandro Houspanossian  Advisor: Prof. Dr. Mariano Cilia April 2006 Tandil, Argentina

A. Houspanossian

Enhancing a BPEL Engine - April '06 18

Publishing Events as JMS MessagesPublishing Events as JMS Messages

Publish/Subscribe-based solution:

- it decouples consumers and producers of events/messages- the number of participants can vary dynamically- consumers only receive the messages of their interest

Page 19: Alejandro Houspanossian  Advisor: Prof. Dr. Mariano Cilia April 2006 Tandil, Argentina

A. Houspanossian

Enhancing a BPEL Engine - April '06 19

How to Integrate Our Extensions into ActiveBPEL?How to Integrate Our Extensions into ActiveBPEL?

• “Observe” is still pending!

– Detect state changes (source code). For instance:• Processes are created with the execution of:

private ProcessInstance ProcessMgr.createProcess(data);

• Remote services are invoked through:private IResult InvokeHandler.invokeWS(port);

• … – Many state changes to detect

• Many classes involved!

• Integration with existing code required!

Page 20: Alejandro Houspanossian  Advisor: Prof. Dr. Mariano Cilia April 2006 Tandil, Argentina

A. Houspanossian

Enhancing a BPEL Engine - April '06 20

Hand-coded Integration (OOP)Hand-coded Integration (OOP)

• Modify engine’s sources to reference our extensions

• Many classes involved– ProcessMgr.java– InvokeHandler.java– …– errors and exceptions?– …

• Difficult to maintain!– New versions of

ActiveBPEL every month!– Re-implementation costs

too high!

BPEL Engine(standard)

Our extensions+

Points of observation

Page 21: Alejandro Houspanossian  Advisor: Prof. Dr. Mariano Cilia April 2006 Tandil, Argentina

A. Houspanossian

Enhancing a BPEL Engine - April '06 21

(Modifying) Open-Source Software (OSS)(Modifying) Open-Source Software (OSS)

• OSS is a real option for academic, gov., and even industrial software projects

– OSS can be modified and extended as desired

• BUT

– Managing OSS evolution is difficult

– Re-implementation costs are high

• We do not control the evolution of ActiveBPEL!!

• How to maintain our modifications across evolving releases?– Minimize re-implementation

costs

– Smoothly integration required!

• (Our extensions can not be added to ActiveBPEL official code baseline)– ActiveBPEL is a standard

BPEL engine– We implement an enhanced

BPEL engine!!

Page 22: Alejandro Houspanossian  Advisor: Prof. Dr. Mariano Cilia April 2006 Tandil, Argentina

A. Houspanossian

Enhancing a BPEL Engine - April '06 22

Aspect-Oriented Programming (AOP)Aspect-Oriented Programming (AOP)

• enhancedSystem = baseSystem + aspects– base system and aspects are developed independently and then

woven together• Weaving process (at compile, load, or run-time)

– Modify the behaviour of the base system without changing its source code ;-)

• AOP is appropriate when there is an aspect (concern) of a system that *:– crosscuts the structure of several objects or operations– is beneficial to separate out

• Benefits:– good modularity:

• easier maintenance and evolution• easier to reason about, debug, change• more reusable

* from: “Aspect Oriented Programming with AspectJ”™, the AspectJ.org team.

Page 23: Alejandro Houspanossian  Advisor: Prof. Dr. Mariano Cilia April 2006 Tandil, Argentina

A. Houspanossian

Enhancing a BPEL Engine - April '06 23

AOP-based IntegrationAOP-based Integration

• Our functionality as aspects of the base system

• There is no explicit reference to our code in the BPEL engine

• We keep different things separated – (our concerns, and Active-

BPEL development team’s concerns)

observ

e

dissem

inate

StatusPublication

Page 24: Alejandro Houspanossian  Advisor: Prof. Dr. Mariano Cilia April 2006 Tandil, Argentina

A. Houspanossian

Enhancing a BPEL Engine - April '06 24

AOP-based Integration (cont.)AOP-based Integration (cont.)

• Define Pointcuts (points in the engine’s execution flow to observe)

– process creation pointcut processCreation

call( private ProcessInstance ProcessMgr.createProcess(data) );

– Web Service (WS) invocation pointcut invokeService call( private IResult InvokeMgr.invokeWS(port) );

• Define Advices (actions to execute when pointcuts are reached)

– after processCreation do: disseminate(processCreatedEvent);

– before invokeService do: disseminate(invokingWSEvent);

Our

exte

nsi

on

Obse

rvati

on

(glu

e c

ode)

Page 25: Alejandro Houspanossian  Advisor: Prof. Dr. Mariano Cilia April 2006 Tandil, Argentina

A. Houspanossian

Enhancing a BPEL Engine - April '06 25

An An (AspectJ)(AspectJ) Aspect: EventPublishing Aspect: EventPublishing

public aspect EventPublishing {

...

pointcut fireEvent(IAeEngineEvent event):

( call( void IAeBusinessProcessEngine.fireEngineEvent(IAeEngineEvent))

&& args(event)

) ;

after (IAeEngineEvent event): fireEvent(event) {

ReFFlow.disseminate(event);

}

...}

Our

exte

nsi

on

Obse

rvati

on

(glu

e c

ode)

Page 26: Alejandro Houspanossian  Advisor: Prof. Dr. Mariano Cilia April 2006 Tandil, Argentina

A. Houspanossian

Enhancing a BPEL Engine - April '06 26

Integrating ReFFlow ExtensionsIntegrating ReFFlow Extensions

Detect

fault

Hot fix

Find-bind S e rvic eR eg is try

• We defined aspects to integrate: – the find-and-bind – the evaluate

mechanism

• BPEL engine code is not modified!

• Engine behavior is modified to react to faults

Page 27: Alejandro Houspanossian  Advisor: Prof. Dr. Mariano Cilia April 2006 Tandil, Argentina

A. Houspanossian

Enhancing a BPEL Engine - April '06 27

Evolution & MaintainabilityEvolution & Maintainability

• We have worked with many releases of ActiveBPEL:– No dramatic (structural)

changes observed• Bug-fixes, new features

• By applying AOP:– Often no changes to our work

were needed• Automatic weaving!

– Rarely the integration points needed to be adjusted

• which is not difficult • good locality of the changes

-> the aspects (pointcuts)

Page 28: Alejandro Houspanossian  Advisor: Prof. Dr. Mariano Cilia April 2006 Tandil, Argentina

A. Houspanossian

Enhancing a BPEL Engine - April '06 28

SummarySummary

• We provided an implementation of the ReFFlow model – we additionally contributed with new extensions

• State dissemination– we incorporated the extensions into a BPEL-compliant engine.

• Instead of developing a system from scratch, we adopt an existing OSS– the resulting system has built-in support for the ReFFlow model

• We combined Open-Source Software with Aspect-Oriented Programming– We applied AOP to extend an evolving open-source system

• By adopting AOP, we add new behavior to the base system without modifying its source code

• This approach has shown to be highly maintainable– We addressed one of the major drawbacks related to the

adoption and extension of open-source software:• i.e. managing open-source software’s evolution

Page 29: Alejandro Houspanossian  Advisor: Prof. Dr. Mariano Cilia April 2006 Tandil, Argentina

A. Houspanossian

Enhancing a BPEL Engine - April '06 29

ConclusionsConclusions

• An enhanced BPEL engine has been provided according to the requirements of the ReFFlow Project– Our extensions (developed as aspects of the base system) have been

successfully applied to evolving releases of the open-source system

– By applying AOP, we address one of the major challenges related to the adoption and extension of OSS (i.e. managing OSS’s evolution).

• Our contributions were published in:1. A. Houspanossian and M. Cilia. Extending an Open-Source BPEL Engine with

Aspect-Oriented Programming. In Proc. of the Sixth Argentine Symposium on Software Engineering ASSE 2005 (JAIIO 34). Rosario, Argentina, August 2005.

2. D. Karastoyanova, A. Houspanossian, M. Cilia, F. Leymann, and A. Buchmann. Extending BPEL for Run Time Adaptability. In Proc. of the 9th IEEE International Enterprise Distributed Object Computing Conference (EDOC 2005). Enschede, The Netherlands, September 2005.

Page 30: Alejandro Houspanossian  Advisor: Prof. Dr. Mariano Cilia April 2006 Tandil, Argentina

A. Houspanossian

Enhancing a BPEL Engine - April '06 30

Future WorkFuture Work

• Business Activity Monitoring Tools– Stream Processing Systems

• Security Aspects on Pub/Sub Systems– Scopes

• Content-based Routing– XML routing

• Enterprise Service Bus– event-driven SOA– the coming integration platform – Reliable, secure Web Services

• Aspect-oriented Software Development– Aspect-oriented Design, supporting tools

• …

Page 31: Alejandro Houspanossian  Advisor: Prof. Dr. Mariano Cilia April 2006 Tandil, Argentina

+++ A. Houspanossian, M. Cilia {ahouspan,mcilia}@exa.unicen.edu.ar +++

Thank you!Thank you!

Enhancing a BPEL4WS Engine Enhancing a BPEL4WS Engine Supporting the Execution of Flexible WS-flowsSupporting the Execution of Flexible WS-flows

According to the ReFFlow ModelAccording to the ReFFlow Model

Page 32: Alejandro Houspanossian  Advisor: Prof. Dr. Mariano Cilia April 2006 Tandil, Argentina

A. Houspanossian

Enhancing a BPEL Engine - April '06 32

ReferencesReferences

• BPEL Specification– http://ifr.sap.com/bpel4ws/

• Aspect-Oriented Software Development– http://aosd.net

• AspectJ– www.aspectj.org

• ActiveBPEL Engine– www.activebpel.org

• The ReFFlow Project– www.dvs1.informatik.tu-darmstadt.de/research/refflow/