bonita j2ee workflow cooperative system miguel valdés faura jiap project 09/12/2003

54
Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003

Upload: jemima-ferguson

Post on 17-Jan-2016

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003

BonitaJ2EE Workflow Cooperative

System

Miguel Valdés Faura

JIAP Project

09/12/2003

Page 2: Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003

Agenda

• Bonita project introduction

• Basic organisation

• Awareness

• Advanced features

• Web services

• Bonita integration

• Current work

Page 3: Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003

Bonita Project• Flexible Cooperative Workflow System

• Bonita is integrated in the ObjectWeb Consortium (Open Source Middleware).

• Bonita is Open Source and is downloadable in LGPL License.

• Bonita uses new JOnAS 3.3.1 version.

Page 4: Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003

Short History• Started in 2000 inside the Motu Cooperative

plateforme• June 2001

– Beginning of development of version 1• Ejb 1.1

• June 2002– Development of version 2

• Ejb 2.0, CMP

• June 2003– Integration in the libresource platform– Port to Jonas

Page 5: Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003

Context (1)• Types of workflow

– Production– Administrative– Ad-hoc– Cooperative

• Workflow Management System that allows coordination in a cooperative project

– co-engineer, co-conception...

Page 6: Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003

Context (2)• Existing Workflows

– Isolation execution– Sequential execution

– Rigid model

EditionEdition

CorrectionCorrection

EditionEdition

MergeMerge

EditionEdition

ReviewReview

CorrectionCorrection

CommentsComments

Page 7: Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003

Context (3)• Bonita offers a new workflow execution

model:– Execution flexibility based on activity

anticipation.– Interchange data flexibility

Edition Modification

Edition Review Mofification

Edition Review

Modification

...

Process

Execution

(1)

(2) Anticipating

Anticipable

Executing

Review

Page 8: Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003

Objectives of Bonita

Supporting collaborative processes– Long running activities– Distributed teams coordination– Awareness

• Provide a WF engine– Simple– Dynamic– Flexible

Page 9: Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003

Bonita J2EE Application

• EJB 2.x compliant and xdoclet code generation engine.

• User Authentication by Login Modules• JMS notification module• Web Interface with Struts framework, JSP and

JSTL pages• Different databases MySQL, Postgres...• J2EE Workflow Web Services• ...

Page 10: Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003

The basics

• Process

• Activities (or nodes)

• Edges

• Users

• Roles

• External events

Page 11: Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003

Process

• A process is the description of – a set of tasks or activities– the dependencies between tasks– a set of roles– a set of users participating to the process– the relationship between roles and tasks– the relationships between user and roles

Page 12: Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003

Activities• Activities are used

– To represent tasks that have to be executed– To express synchronisation conditions

• AND-JOIN, OR-JOIN

– To express execution conditions• Automatic, Traditional, Anticipable

• Activities have– A role– A deadline– A state (initial, ready, anticipable, executing, anticipating, dead,

terminated,…)

Page 13: Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003

Edges

• Edge are used to represent control flow dependencies between activities

• Edge have– A state (initial, active, dead)– A condition

• Expressed as BeanShell script

• Evaluated when the edge becomes active

• Edge are also used for basic data flow

Page 14: Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003

Agenda

• Bonita project introduction

• Basic organisation

• Awareness

• Advanced features

• Web services

• Bonita integration

• Current work

Page 15: Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003

Basic Organisation

ProcessSessionBeanProvides the Process Instantiation API

UserSessionBeanProvides the user API to

get information on Todo list and started activitiesproduce events on activities (start, terminate, ...)

EngineBeanHidden to userProvides the execution engine. Manage process states

and process changesAPI are also available as Web Services

Page 16: Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003

ProcessSession Bean

• A process session bean provides the interface for– Creation of the process– Definition of nodes and edges– Modifications of properties

• A process is enacted immediately.

Page 17: Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003

Process editor• Tool for interactive edition of the process

Page 18: Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003

Process definition• A Web Interface is used for detailled definition

Page 19: Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003

Process execution• Process execution is done by commands

– UserSessionBean implements commands and queries• Projects of a user• Todo List• Executing activities• Start/terminate/Cancel commands

• Process execution is controlled by a special session bean that implements the state machine (EngineBean)

Page 20: Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003

The activity manager

• Client interface for process execution

• Provides– User projects– Todo list for a user– Executing activities

Page 21: Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003

Agenda

• Bonita project introduction

• Basic organisation

• Awareness

• Advanced features

• Web services

• Bonita integration

• Current work

Page 22: Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003

Awareness (1)

JMS notifications in workflow users definition and visualizationUser notifications:

Mail notificationsJabber notifications

Page 23: Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003

Awareness(2)• The process editor provide a view of the state of the

process

Page 24: Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003

Awareness(3)The process editor allows multiple users definition.

Page 25: Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003

Awareness(4)Jabber Notification based in user preferences

Page 26: Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003

Agenda

• Bonita project introduction

• Basic organisation

• Awareness

• Advanced features

• Web services

• Bonita integration

• Current work

Page 27: Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003

Advanced features

• Anticipation

• Runtime process change

• Properties

• Hooks

• Process clone

Page 28: Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003

AnticipationGreen activities are anticipable

Page 29: Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003

Process changeThe process can be changed anytime during its execution

Page 30: Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003

Properties

• Properties are data attached to– A process– An activity

• Process properties are the global data of the process

• Activity properties provide a basic data flow– Implicit propagation along the control flow– Properties can be used in

• Activity Scripts• Edge conditions

Page 31: Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003

Hooks• Hooks are used to add automatic behavior to activities for

– Integration– Control– Automation

• Hook are scripts written in– Tcl, java or beanscript

• They are associated to the following events– Before start and after start– Before terminate and after terminate– Executing– On Cancel– On Die

Page 32: Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003

• Before start and after terminate are executed outside of the activity transactional contextIf the before start fails, the activity does not start but does not

fail either... it can be retried later.• After start, On execute and before terminate are

executed inside the activity transactional contextFailure of one of the hooks makes the activity failed

• On Die and On cancel are used to take action in case of activity failureRecovery, programmatic compensation, instantiation of a

compensation process

Hooks

Page 33: Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003

Process Hook vs Activity Hook

• A process hook will be executed for each activity of the process– Allows to specialized the process behavior

• An activity hook is executed only for the activities it is attached to

• Executing hook can be used for automatic activities

Page 34: Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003

• A hook is implemented as a BeanShell script or as a Java class (must be deployed)

• The script has access to the current activity bean and to engine bean (change to the process execution status can be done)

Hooks Implementation

Page 35: Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003

Process Clone• Clone is used instead of schema to instantiate processes• A Process clone is an exact copy of an existing process

except that– All activity and edge states are reinitialised– Participants to the project are not copied

• To use a cloned project the admin has to– set the users– recreate the user/role relationship

• No relationship between the copies

Page 36: Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003

Agenda

• Bonita project introduction

• Basic organisation

• Awareness

• Advanced features

• Web services

• Bonita integration

• Current work

Page 37: Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003

Web Services

• Powerful and easy integration that will enable more efficient business processes.

• You will easily integrate your software with other pieces of software.

• No need to worry about how each Web Service is implemented.

Page 38: Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003

Web Services and J2EE

Proprietary Protocol

IIOP HTTP

Web service Container

Servlets

Business Partner or other system

Applets, JWSApplications

Business Partner or other system

Existing SystemERP System

Connectors

EJB’s

XML Parser

JSP, MVC Framework…

View generation Web Container

EJB Container

HTTPRMI

Client tier

Back-EndSystems

DB

SQL Web Services Technologies

Web Services Technologies

Computer

Page 39: Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003

Bonita Web Services Architecture• Bonita Third Generation Workflow

Architecture based on Web Services.Server-Side

Business Logic

Struts

Server-SidePresentation

Web Services Client-Side

Presentation

Workflow information

Bonita Database

MySQL

Postgres

Oracle Bonita Definition component Bonita Execution component Web environment to define and control the workflow process

Page 40: Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003

• 100% browser-based environment• We can use external Web Services and also

publish Workflow Web Services.

HTTP Request sent to SOAP server

HTTP Response from SOAP server

HTTPEncoding/Decoding

SOAPSerialization/

De-serialization

SOAP PackageXML

Method Call

Local Interfaces

HTTPView

generationXML Java

Parser

Bonita Struts Framework

Web Server

Business Partner

Server

Business Partner

Service API

(XML/SOAP)

Bonita 100% Browser-based

Bonita & Web Services

Page 41: Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003

Integrating Bonita Web Services• Data translation and transformation

– Translating the results of the business service into XML

– Bonita XML Data Binding Serializer.– XML data binding offers a simpler approach to

working with XML

• Client Connectivity– Different kinds of clients connect to the web

services in a variety of ways: UDDI, WSDL, SOAP, ebXML.

– Multiple client views for one web service.

Page 42: Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003

• The XML code returned to the client.

NodeLightValue

state

id

creatoridname

nameemail

role

id namedescription

node1 2

[email protected] admin The admin role admin

1

22

Bonita Web Services Sample

Page 43: Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003

• A particular Bonita Web Service can be adapted to each user view.

Business Partner or other system

Session Bean

Transform XML

Servlet / JSP s

UDDI Registry

Register Servicein UDDI Registry

JAXR

JAXM, JAX/RPC

JAXP, JAXB

Locale Service and Service Descriptions (WSDL and/or CPP)

SOAP and/or ebXML request

Web service Container

Castor XML Data Binding

XSL/XSLT

Client Request

Bonita Client Connectivity

Page 44: Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003

Agenda

• Bonita project introduction

• Basic organisation

• Awareness

• Advanced features

• Web services

• Bonita integration

• Current work

Page 45: Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003

Bonita integration example

• Libresource Platform:– A modular platform for cooperative software

development– Virtual teams hosting and distributed

communities– Data sharing, coordination, awareness,

communication

http://libresource.loria.fr/

Page 46: Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003

Libresource integration

Page 47: Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003
Page 48: Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003
Page 49: Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003

Agenda

• Bonita project introduction

• Basic organisation

• Awareness

• Advanced features

• Web services

• Bonita integration

• Current work

Page 50: Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003

Bonita State• Used in different projects

– KVM– Libresource– Coopera

• > 5000 downloads at Bonita ObjectWeb site.

• Bonita references at: TheServerSide, Apache, Freshmeat, Internet Global Congress...

• Stable execution engine

Page 51: Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003

Current work• Short term

– Completion of MultiInstanction implementation– Integration in the LibreSource platform– New workflow administration web interface.– Hook editor – Import XPDL workflow files.

• Middle term– XPDL workflow model– Web Services orchestration: BPEL4WS– ...

Page 52: Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003

XPDL Standard• Variety of different tools exists to define workflow processes • XPDL defines a common interchange format:

– transfer workflow process definitions between different products

• Separation between the development and run-time environments

Page 53: Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003

Bonita & XPDL Standard

Jawe Definition Client

XPDL representation

Bonita Definition Client

Page 54: Bonita J2EE Workflow Cooperative System Miguel Valdés Faura JIAP Project 09/12/2003

http://bonita.debian-sf.objectweb.org/

Bonita Home Page