33
www.s-cube-network.eu S-Cube Learning Package Self-adaptation: Context-aware Adaptation of Business Processes Fondazione Bruno Kessler (FBK) Antonio Bucchiarone, FBK

S-CUBE LP: Context-aware Adaptation of Business Processes

Embed Size (px)

Citation preview

Page 1: S-CUBE LP: Context-aware Adaptation of Business Processes

www.s-cube-network.eu

S-Cube Learning Package

Self-adaptation:

Context-aware Adaptation of Business Processes

Fondazione Bruno Kessler (FBK)

Antonio Bucchiarone, FBK

Page 2: S-CUBE LP: Context-aware Adaptation of Business Processes

© Antonio Bucchiarone

Learning Package Categorization

S-Cube

Adaptation and Monitoring

Self-adaptation

Context-aware Adaptation of Business Processes

Page 3: S-CUBE LP: Context-aware Adaptation of Business Processes

Learning Package Overview

Problem Description

Context-aware Adaptation

Evaluation and Discussion

Related Work

Conclusions

© Antonio Bucchiarone

Page 4: S-CUBE LP: Context-aware Adaptation of Business Processes

Let’s Consider a Scenario (1)

Logistics Domain

At the Automobile terminal of the Bremen sea port

2 million new vehicles are handled each year and the

goal is: “to deliver them from the manufacturer to the

dealer”

For each vehicle a lot of intermediate processes/services

are involved

© Antonio Bucchiarone

Page 5: S-CUBE LP: Context-aware Adaptation of Business Processes

Let’s Consider a Scenario (2)

A Business Process is implemented to handle the delivery of

cars from ships to retailers

Each Business Process is realized as an orchestration of

appropriate services (atomic and composite)

– Services are asynchronous and non-deterministic

© Antonio Bucchiarone

Ship

Unloading Storage

Technical

Treatment Consignment

Truck

Loading

Wait For

Treatment

Service

Pull To

Treatment

Service

Drop Ticket

Service

Car Repair

Service

Move To

Terminal

Service

Unloading

Service Equipment

Service

Car Check

Service

Cleaning

Service

Painting

Service

Move To

Treatment

Service

Store Car

Service

Move To

Storage

Service

Move To

Consignment

Service

Loading

Service

Other Available Services

Request

Ticket

Service

Move To

Storage

Service

Move To

Place

Service

Page 6: S-CUBE LP: Context-aware Adaptation of Business Processes

Let’s Consider a Scenario (3)

The execution environment of the scenario exposes some

important characteristics, it is:

– Open: externally forced situations such as “car damage” or “storage

overbooking” can happen;

– Dynamic: a set of available services and active business policies are

changing

– Non-deterministic: many services with unpredictable outcome

© Antonio Bucchiarone

Page 7: S-CUBE LP: Context-aware Adaptation of Business Processes

Let’s Consider a Scenario (4)

The scenario allow us to manage two important problems

– Context-aware adaptation: If the car is damaged, a corresponding

adaptation depends on the current context (i.e., current location of the

car)

- Ex. 1: If the car is on the ship, it still has to be unloaded and

afterwards pulled to the repair area and repaired

- Ex. 2: if the car is damaged anew immediately after repair, the

Repair Service can be applied to it immediately (since the car is

already at the repair area)

– Scalability in dynamic environment: the operation of the repair area

is temporarily suspended, this means that the Slow Repair service is

temporarily removed from the list of available services

- Ex. 1: to enable car repair, mobile repair groups are organized.

They repair broken cars on the spot, without pulling them to repair

area. A new service called Fast Repair is introduced.

© Antonio Bucchiarone

Page 8: S-CUBE LP: Context-aware Adaptation of Business Processes

Learning Package Overview

Problem Description

Context-aware Adaptation

Evaluation and Discussion

Related Work

Conclusions

© Antonio Bucchiarone

Page 9: S-CUBE LP: Context-aware Adaptation of Business Processes

Key Elements

Explicit Model of the Application

– Context Model: We consider context as a set of context properties

representing important characteristics of the environment (e.g., car

location, car operability, Storage Availability, etc..)

– Service Model: we consider asynchronous and non-deterministic

services and we provide a way to model their protocols.

Context-aware Execution Framework

– We define a reference architecture to execute adaptation of business

processes considering the available services and the current context

configuration

Context-aware Adaptation based on Automated Service

Composition

– The construction of the adaptation solution (service composition) is

performed with the use of automated planning techniques

© Antonio Bucchiarone

Page 10: S-CUBE LP: Context-aware Adaptation of Business Processes

Context Property Diagram (1)

Every context property is modeled with a context property

diagram, which is a state transition system capturing all

possible property values and value changes.

Each transition is additionally labeled with a context event

Research work on context property diagrams:

© Antonio Bucchiarone

Piergiorgio Bertoli, Raman Kazhamiakin, Massimo Paolucci, Marco Pistore, Heorhi Raik, Matthias

Wagner: Control Flow Requirements for Automated Service Composition. ICWS 2009: 17-24

Raman Kazhamiakin, Massimo Paolucci, Marco Pistore, Heorhi Raik: Modelling and Automated

Composition of User-Centric Services. OTM Conferences (1) 2010: 291-308

Page 11: S-CUBE LP: Context-aware Adaptation of Business Processes

Context Property Diagram (2)

© Antonio Bucchiarone

Context Property diagrams in the Car Logistics scenario

• It captures how the car location can

change over time

• Initially the car is on the ship

• The repair location is where the car can be

repaired

• It represents can operability status

• When the car is damaged it is in the status nok

Page 12: S-CUBE LP: Context-aware Adaptation of Business Processes

Annotated Services (1)

In order to model complex service protocols (e.g., specified in

Abstract BPEL), we use state transition systems, where:

– Transitions correspond to service actions (input/output messages).

– Each transition can be additionally annotated with context effects and

context preconditions.

– Some non-deterministic outcomes can be labeled as improbable

© Antonio Bucchiarone

Page 13: S-CUBE LP: Context-aware Adaptation of Business Processes

Annotated Service(2)

© Antonio Bucchiarone

Annotated Service in the Car Logistics scenario

It is applicable only

to an operable car

Its non-deterministic

outcomes are

annotated with two

different effects

This outcome is

also labeled as

improbable

Page 14: S-CUBE LP: Context-aware Adaptation of Business Processes

Automated Adaptation

© Antonio Bucchiarone

do we need to adapt?

is the adaptation strategy?

to implement the chosen strategy?

Page 15: S-CUBE LP: Context-aware Adaptation of Business Processes

Execution Framework (1)

Execution Engine

Adaptor

M, S, C

ξ Madapt

o i x

Process

Engine

Context

Manager

• Execution of the

process activities

• Invocation of

available services (S)

Monitoring and

Updating of

Context

Properties (C)

Detection of adaptation

problems (ξ);

Adaptation Process

derivation (Madapt)

Execution of

the business

process M

© Antonio Bucchiarone

Page 16: S-CUBE LP: Context-aware Adaptation of Business Processes

Execution Framework (2)

Ship

Unloading Storage

Technical

Treatment Consignment

Truck

Loading

Annotated

Services

External

Events

Preconditions and

Effects

the next action in the process

cannot be executed because

its precondition is violated

Context

Properties

© Antonio Bucchiarone

Page 17: S-CUBE LP: Context-aware Adaptation of Business Processes

Execution Framework (3)

Ship

Unloading Storage

Technical

Treatment Consignment

Truck

Loading

Annotated

Services

External

Events

Preconditions

Effects

Context

Properties

S1 S2 S3

S4 S5

Local adaptation

Page 18: S-CUBE LP: Context-aware Adaptation of Business Processes

Adaptation Problem

Adaptation problems sent to the Adaptor component

comprises:

– The current status of the system (values of the context properties,

states of the services involved).

– A set of available services that may be used for adaptation.

– The adaptation goal: “to unblock the process”, i.e. to satisfy the

precondition of the next activity in the process.

© Antonio Bucchiarone

Page 19: S-CUBE LP: Context-aware Adaptation of Business Processes

Adaptation as Planning Problem

© Antonio Bucchiarone

Adaptation Problem

• An adaptation problem is transformed into a planning

problem and planning techniques are used to generate

the adaptation process

Page 20: S-CUBE LP: Context-aware Adaptation of Business Processes

Adaptation as Planning Problem obtaining the Adaptation Process (M

adapt)

A set of n services and m context property diagrams are transformed into state transition

systems (STS)

While encoding services as STSs, we prohibit all “improbable” outcomes. We guarantee

that the plan will be build under the assumption that no exogenous events and service

failures happen during the generation of the adaptation process.

The planning domain Σ is a product of all STSs of the annotated services and context

property diagrams synchronized on preconditions and effects.

The set of goal configurations G(ξ) is transformed into set of configurations GΣ of planning

domain Σ . We denote the planning goal as a reachability goal

After all, we apply an automatic composition approach to domain Σ and planning goal ρ

and generate a controller Σc (plan), such that (domain Σ reaches goal ρ when

controlled by Σc).

The state transition system Σc is further translated into executable process M

adapt, which

implements the adaptation strategy.

© Antonio Bucchiarone

Page 21: S-CUBE LP: Context-aware Adaptation of Business Processes

Adaptation as Planning Problem obtaining the Adaptation Process (M

adapt)

We exploit the ASTRO automated composition approach - www.astroproject.org

Sophisticated AI planning techniques (Planning as Model Checking)

Asynchronous domains, non-determinism, partial observability

Complex goals: preferences and recovery conditions (EaGle)

Control and data flow composition requirements

Research work on ASTRO automated service composition:

Annapaola Marconi, Marco Pistore: Synthesis and Composition of Web Services. SFM 2009: 89-157

Annapaola Marconi, Marco Pistore, Paolo Traverso: Automated Composition of Web Services: the

ASTRO Approach. IEEE Data Eng. Bull. 31(3): 23-26 (2008)

Annapaola Marconi, Marco Pistore, Piero Poccianti, Paolo Traverso: AutomatedWeb Service

Composition at Work: the Amazon/MPS Case Study. ICWS 2007: 767-774.

Annapaola Marconi, Marco Pistore, Paolo Traverso: Specifying Data-Flow Requirements for the

Automated Composition of Web Services. SEFM 2006: 147-156

M. Pistore, P. Traverso, P. Bertoli, and A. Marconi, Automated synthesis of composite BPEL4WS web

services” in Proc. ICWS 2005

Page 22: S-CUBE LP: Context-aware Adaptation of Business Processes

Learning Package Overview

Problem Description

Context-aware Adaptation

Evaluation and Discussion

Related Work

Conclusions

© Antonio Bucchiarone

Page 23: S-CUBE LP: Context-aware Adaptation of Business Processes

We implemented our approach into a prototype tool.

To analyze the adaptation modeling overhead, and to compare the approach with

other approaches (i.e., rule-based)

For the planning problem we use a customized NuSMV language, extended to

allow the specification of goals with preferences.

The planning problem is then passed to WSYNTH, one of the tools in the ASTRO

toolset.

The adaptation process returned by WSYNTH is the controlled domain which we

then translate back to BPEL.

To evaluate our tool, we implemented a complex logistics scenario

Its formalization includes 16 context property diagrams, 24 annotated

stateful services and a dozen of business policies

Evaluation focused on three main points: general structure and

complexity of adaptation activities, planning performance and modelling

overhead.

Evaluation (1)

© Antonio Bucchiarone

Page 24: S-CUBE LP: Context-aware Adaptation of Business Processes

Superficial analysis of the complex logistics scenario unveils at least 30

cases that require adaptation.

Adaptation processes typically has more than 8 actions, while several

adaptation cases, due to non-determinism, require exceedingly complex

adaptation involving more than 60 actions

Evaluation (2) adaptation complexity

Using built-in adaptation in such

scenario is virtually impossible

© Antonio Bucchiarone

Page 25: S-CUBE LP: Context-aware Adaptation of Business Processes

The performance of the planning algorithm was tested on a 2GHz, 3Gb Dual

Core machine running Windows.

In our experiments, the delay caused by planning and adaptation process

never exceeded 4 seconds.

Given the high complexity of the scenario, it demonstrates

Evaluation (2) planning performance

The practical applicability of our approach

Page 26: S-CUBE LP: Context-aware Adaptation of Business Processes

In order to evaluate the modeling effort of our approach we implemented the

same adaptation mechanism using a rule-based approach.

We defined 35 rules and verified the whole rule-based system.

In order to compare scalability of our approach respect to rule-based, we

simulated the replacement of a service by a new one with the same

functionality but different usage policies.

Our approach required only proper annotation of a new service

The rule-based implementation required modifying 3 rules and re-

verifying the whole rule system.

Evaluation (2) modeling overhead

Our approach proved to be considerably

more scalable than rule-based and built-in

Page 27: S-CUBE LP: Context-aware Adaptation of Business Processes

Discussion Comparison to Rule-based approaches

Research problem:

Self-adaptation

Solution proposed:

Adaptation of business processes using a Context-aware Re-Planning

technique

Comparison to rule-based and built-in approaches:

Using built-in adaptation with complex scenario is virtually impossible

The performance of the planning algorithm demonstrates the applicability

of our approach (<4 seconds to generate an adaptation solution) while re-

verifying the whole rule-based system means run the analyzer for some

hours (> 1 hour).

Our approach proved to be considerably more scalable than rule-based

and built-in

© Antonio Bucchiarone

Page 28: S-CUBE LP: Context-aware Adaptation of Business Processes

Learning Package Overview

Problem Description

Context-aware Adaptation

Evaluation and Discussion

Related Work

Conclusions

© Antonio Bucchiarone

Page 29: S-CUBE LP: Context-aware Adaptation of Business Processes

Related Work

Frameworks to support adaptation of business processes D. Karastoyanova, A. Houspanossian, M. Cilia, F. Leymann, and A. P. Buchmann. Extending BPEL for Run Time

Adaptability. In Proc. EDOC’05, pages 15–26, 2005.

A. Marconi, M. Pistore, A. Sirbu, H. Eberle, F. Leymann, and T. Unger. Enabling Adaptation of Pervasive Flows: Built-

in Contextual Adaptation. In Proc. ICSOC/ServiceWave, pages 445–454, 2009.

M. Colombo, E. di Nitto, and M. Mauri. SCENE: A Service Composition Execution Environment Supporting Dynamic

Changes Disciplined Through Rules. In Proc. ICSOC’06, pages 191–202, 2006.

I. Lanese, A. Bucchiarone, and F. Montesi. A Framework for Rule-based Dynamic Adaptation. In Proc. TGC 2010,

pages 284–300, 2010.

X. Yong Lin and W. Jun. Context-Driven Business Process Adaptation for Ad Hoc Changes. In Proc. IEEE ICEBE’08,

pages 53–60, 2008.

V. Agarwal and P. Jalote. From Specification to Adaptation: An Integrated QoS-driven Approach for Dynamic

Adaptation of Web Service Compositions. In Proc. ICWS, pages 275–282, 2010.

G. Hermosillo, L. Seinturier, and L. Duchien. Using Complex Event Processing for Dynamic Business Process

Adaptation. In Proc. IEEE SCC, pages 466–473, 2010.

W. Kongdenfha, R. Saint-Paul, B. Benatallah, and F. Casati. An Aspect-Oriented Framework for Service Adaptation.

In Proc. ICSOC’06, pages 15–26, 2006.

A. Hallerbach, T. Bauer, and Manfred Reichert. Capturing variability in business process models: the Provop

approach. Journal of Software Maintenance, 22(6-7):519–546, 2010.

M. de Leoni. Adaptive Process Management in Highly Dynamic and Pervasive Scenarios. In Proc. YR-SOC, pages

83–97, 2009.

© Antonio Bucchiarone

Page 30: S-CUBE LP: Context-aware Adaptation of Business Processes

Learning Package Overview

Problem Description

Context-aware Adaptation

Evaluation and Discussion

Related Work

Conclusions

© Antonio Bucchiarone

Page 31: S-CUBE LP: Context-aware Adaptation of Business Processes

Conclusions

We a presented a novel approach to adapt business processes where:

running application and the adaptation logic are two separate

components

Adaptation activities are generated at runtime, when a problem arises

(i.e., Dynamic Adaptation)

Future Work

To extend the framework to consider also abstract tasks of the business

processes

The refinement of an abstract activity with executable service composition

is done automatically and at runtime taking into account the current status

of the execution environment.

We plan to consider other adaptation strategies, e.g., to roll the execution

back to a branching point in an attempt to take different branches.

We plan to use the execution history of adapted instances as a training

set to progressively improve the process model (Process Evolution)

Page 32: S-CUBE LP: Context-aware Adaptation of Business Processes

Further Reading

A. Bucchiarone, M. Pistore, H. Raik, R. Kazhamiakin: Adaptation of Service-based Business Processes by Context-

Aware Replanning. Submitted to SOCA 2011.

R. Kazhamiakin, M. Paolucci, M. Pistore, H. Raik: Modelling and Automated Composition of User-Centric Services.

OTM Conferences (1) 2010: 291-308

A. Marconi, M. Pistore: Synthesis and Composition of Web Services. SFM 2009: 89-157

P. Bertoli, R. Kazhamiakin, M. Paolucci, M. Pistore, H. Raik, M. Wagner: Control Flow Requirements for Automated

Service Composition. ICWS 2009: 17-24

P. Bertoli, R. Kazhamiakin, M. Paolucci, M. Pistore, H. Raik, M. Wagner: Continuous Orchestration of Web Services via

Planning. ICAPS 2009

A. Marconi, M. Pistore, A. Sirbu, H. Eberle, F. Leymann, T. Unger: Enabling Adaptation of Pervasive Flows: Built-in

Contextual Adaptation. ICSOC/ServiceWave 2009: 445-454

A. Bucchiarone, C. Cappiello, E. Di Nitto, R. Kazhamiakin, V. Mazza, M. Pistore: Design for Adaptation of Service-

Based Applications: Main Issues and Requirements. ICSOC/ServiceWave Workshops 2009: 467-476

H. Ehrig, C. Ermel, O. Runge, A. Bucchiarone, P. Pelliccione: Formal Analysis and Verification of Self-Healing Systems.

FASE 2010: 139-153

© Antonio Bucchiarone

Page 33: S-CUBE LP: Context-aware Adaptation of Business Processes

Acknowledgements

The research leading to these results has

received funding from the European

Community’s Seventh Framework

Programme [FP7/2007-2013] under grant

agreement 215483 (S-Cube).

© Antonio Bucchiarone