jpdl: Simplified Workflow for Java Technology

Similar documents
Tom Baeyens Founder and Lead of

jbpm Tools Reference Guide

Seam 3. Pete Muir JBoss, a Division of Red Hat

Fast Track to EJB 3.0 and the JPA Using JBoss

Not just an App. Server

Improve and Expand JavaServer Faces Technology with JBoss Seam

Introduction. Key Features and Benefits

Process Choreographer: High-level architecture

Java EE 6 - Update Harpreet Singh GlassFish Portfolio Product Manager

Integrating Legacy Assets Using J2EE Web Services

JBoss Enterprise SOA Platform 5

1Z0-560 Oracle Unified Business Process Management Suite 11g Essentials

"Charting the Course... Mastering EJB 3.0 Applications. Course Summary

Deep dive on case management

MetaMatrix Enterprise Data Services Platform

Open Source for IT Leaders. JBoss World 2009 Jay Liu

Collaxa s BPEL4WS 101 Tutorial

Hibernate Search Googling your persistence domain model. Emmanuel Bernard Doer JBoss, a division of Red Hat

JVA-163. Enterprise JavaBeans

Java Enterprise Edition

Takes 2 to Tango: Java Web Services and.net Interoperability

Seam & Web Beans. Pete Muir JBoss, a division of Red Hat.

Migrating traditional Java EE applications to mobile

Seam. Pete Muir JBoss, a Division of Red Hat.

ENTERPRISE JAVABEANS TM (EJB TM ) 3.1 TECHNOLOGY

What is it? What does it do?

New Features in EJB 3.1

Exam Name: IBM BPM Blueprint; IBM WebSphere

Red Hat JBoss Fuse Service Works Integration Recipes, Best Practices & Cheat Codes

Introduction to Seam. Pete Muir. JBoss, a division of Red Hat

Oracle Developer Day

Federated Web Services with Mobile Devices

CO Java EE 7: Back-End Server Application Development

NextFlow: Business Process Meets Mapping Frameworks

The XML PDF Access API for Java Technology (XPAAJ)

Red Hat JBoss Enterprise Application Platform 7.2

Services Oriented Architecture and the Enterprise Services Bus

Java- EE Web Application Development with Enterprise JavaBeans and Web Services

C Exam Questions Demo IBM. Exam Questions C IBM FileNet Business Process Manager v5.

Spring & Hibernate. Knowledge of database. And basic Knowledge of web application development. Module 1: Spring Basics

Chapter 6 Enterprise Java Beans

Developing Applications with Java EE 6 on WebLogic Server 12c

Enterprise JavaBeans. Layer:07. Entity

ActiveVOS Technologies

JBPM5 - QUICK GUIDE JBPM5 - OVERVIEW

Enterprise 2.0 Solutions with SOA. Mike Rosen Chief Scientist Wilton Consulting Group

BPEL-controlled frontends. A process-based pageflow solution. Ingo Meier SOA Competence Center OPITZ CONSULTING

Leverage Rational Application Developer v8 to develop Java EE6 application and test with WebSphere Application Server v8

Vision of J2EE. Why J2EE? Need for. J2EE Suite. J2EE Based Distributed Application Architecture Overview. Umair Javed 1

Active Endpoints. ActiveVOS Platform Architecture Active Endpoints

How NikeiD Hurdled the Java Technology and Flash Barrier

Distributed Transactions and PegaRULES Process Commander. PegaRULES Process Commander Versions 5.1 and 5.2

Ajax and JSF: Natural Synergy

Integrating Seam and GWT

Seam Remoting. An AJAX framework for JBoss Seam. Shane Bryzak

Seam. Pete Muir JBoss, a Division of Red Hat.

The Corticon Rule Modeling Methodology. Applied to. FEMA Disaster Assistance Fraud Detection. A Case Study

10. Business Process Management

Scaling Out Tier Based Applications

Shale and the Java Persistence Architecture. Craig McClanahan Gary Van Matre. ApacheCon US 2006 Austin, TX

GlassFish Project Web Services Stack Metro : Easy to Use, Robust, and High-Performance

index_ qxd 7/18/02 11:48 AM Page 259 Index

Jeff Davis SAMPLE CHAPTER M A N N I N G

JavaOne Topics. Keynotes Talks overview Interoperability, jini Real-time and Embedded XML and Java Cool Recommendations

Implementing a Web Service p. 110 Implementing a Web Service Client p. 114 Summary p. 117 Introduction to Entity Beans p. 119 Persistence Concepts p.

The application must track specific user actions / events and communicate them to Responsys through a SOAP service.

Refactoring to Seam. NetBeans. Brian Leonard Sun Microsystems, Inc. 14o

Web Design and Applications

Fun and Profit With the Google Checkout API in Java Technology

1 Copyright 2011, Oracle and/or its affiliates. All rights reserved.

Red Hat Process Automation Manager 7.0 Planning a Red Hat Process Automation Manager installation

Chapter 1 Introducing EJB 1. What is Java EE Introduction to EJB...5 Need of EJB...6 Types of Enterprise Beans...7

Oracle - Developing Applications for the Java EE 7 Platform Ed 1 (Training On Demand)

Advanced Topics in Operating Systems

Improving Data Access of J2EE Applications by Exploiting Asynchronous Messaging and Caching Services

Red Hat JBoss Enterprise Application Platform 7.1

The 1st Java professional open source Convention Israel 2006

<Insert Picture Here> WebLogic JMS Messaging Infrastructure WebLogic Server 11gR1 Labs

Oracle SOA Suite 10g: Services Orchestration

Writing Portable Applications for J2EE. Pete Heist Compoze Software, Inc.

IMS Client Platform and IMS End-to-End

MEAP Edition Manning Early Access Program Activiti in Action Final Version

TopLink Grid: Scaling JPA applications with Coherence

Socket attaches to a Ratchet. 2) Bridge Decouple an abstraction from its implementation so that the two can vary independently.

Web Application Development Using JEE, Enterprise JavaBeans and JPA

Introduction to JBoss Seam

Data Management in Application Servers. Dean Jacobs BEA Systems

Module 8 The Java Persistence API

BEAAquaLogic. Service Bus. JPD Transport User Guide

A process model is a description of a process. Process models are often associated with business processes.

Red Hat JBoss Middleware Integration Products Roadmap. Ken Johnson Director, Product Management, Red Hat

Java EE 6: Develop Business Components with JMS & EJBs

How to Combine Web, SOA and jbpm to Deliver a Flexible Case Management Platform

ebusiness Suite goes SOA

Business Information Systems Lecture 3 BPMN. Enn Õunapuu

Introduction. Enterprise Java Instructor: Please introduce yourself Name Experience in Java Enterprise Edition Goals you hope to achieve

EJB ENTERPRISE JAVA BEANS INTRODUCTION TO ENTERPRISE JAVA BEANS, JAVA'S SERVER SIDE COMPONENT TECHNOLOGY. EJB Enterprise Java

Page 1

Web Application Development Using JEE, Enterprise JavaBeans and JPA

Monday, November 21, 2011

Transcription:

jpdl: Simplified Workflow for Java Technology Tom Baeyens Founder and Lead of JBoss jbpm JBoss, a Division of Red Hat http://jbpm.org Session TS-8612 2007 JavaOne SM Conference Session TS-8612

Tom Baeyens Founder and Lead of JBoss jbpm JBoss, a division of Red Hat Participate in Java Community Process SM (JCP SM ) Mission Unify workflow, BPM and orchestration Bring these technologies to developer community 2007 JavaOne SM Conference SessionTS-8612 2

Workflow Business Process Management (BPM) Orchestration...it all boils down to state machines 2007 JavaOne SM Conference SessionTS-8612 3

Agenda Introduction Door in Java technology and jpdl Human tasks Binding process to code Use cases Persistence 2007 JavaOne SM Conference SessionTS-8612 4

What Is a Business Process? Description of how people and/or systems work together Typical examples Insurance claim, approvals, legal case 2007 JavaOne SM Conference SessionTS-8612 5

What Is Business Process Management? Analysis and Modelling Tech Details for Executability Analysts Developers 2007 JavaOne SM Conference SessionTS-8612 6

What Is a Process Language? <process-definition name="damage claim"> <start-state name="user submits claim"> <transition to="initial screening /> </start-state> <decision name="initial screening"> <transition name="enough info" to="approval /> <transition name="not enough details" to="ask more details /> </decision>... 2007 JavaOne SM Conference SessionTS-8612 7

What Is an Executable Process Language? Executable process Describe execution flow Graphical activities Activities can be wait states Executed by process engine 2007 JavaOne SM Conference SessionTS-8612 8

Why an Executable Process Language? Simplify implementation Executable process means implementation Some aspects easier as workflow process It extracts state management Improve communication Analyst Automatic persistent history Business intelligence <details/> Developer 2007 JavaOne SM Conference SessionTS-8612 9

What Is a BPMS? Business Process Management System Executes processes Persists executions History E1 E2 History and Audit Tails 2007 JavaOne SM Conference SessionTS-8612 10

JBoss jbpm One embeddable technology Multiple process languages JBoss jbpm jpdl BPEL Pageflow XPDL... Process Virtual Machine Java Virtual Machine (JVM ) Operating System The terms Java Virtual Machine and JVM mean a Virtual Machine for the Java platform. 2007 JavaOne SM Conference SessionTS-8612 11

Agenda Introduction Door in Java technology and jpdl Human tasks Binding process to code Use cases Persistence 2007 JavaOne SM Conference SessionTS-8612 12

A First Example A door 4 states Locked, Closed, Open, Open Locked 4 operations unlock, lock open, close First Java code Then jpdl 2007 JavaOne SM Conference SessionTS-8612 13

A Door in Java Technology public class Door { static String OPEN = "open"; static String CLOSED = "closed"; static String LOCKED = "locked"; static String OPEN_LOCKED = "open-locked"; String state = CLOSED;... 2007 JavaOne SM Conference SessionTS-8612 14

A Door in Java Technology public void lock() { } if ( (state==locked) (state==open_locked) ) { throw new IllegalStateException( "door is already locked ); } if (state==closed) { state = LOCKED; } else if (state==open) { state = OPEN_LOCKED; } 2007 JavaOne SM Conference SessionTS-8612 15

A Door in jpdl <process-definition name="door" initial="closed"> <state name="locked"> <transition name="unlock" to="closed" /> </state> <state name="closed"> <transition name="lock" to="locked" /> <transition name="open" to="open" /> </state> <state name="open"> <transition name="close" to="closed" /> <transition name="lock" to="open Locked" /> </state> <state name="open Locked"> <transition name="unlock" to="open" /> </state> </process-definition> 2007 JavaOne SM Conference SessionTS-8612 16

A Door in jpdl public class DoorProcessTest extends TestCase { static ProcessDefinition doorprocess = ProcessDefinition.parseXmlInputStream( );... DoorProcessTest.class. getresourceasstream("processdefinition.xml") 2007 JavaOne SM Conference SessionTS-8612 17

A Door in jpdl token public void testclosedlock() { ProcessInstance processinstance = new ProcessInstance(doorProcess); Token token = processinstance.getroottoken(); token.signal("lock"); assertequals("locked", token.getnode().getname()); token.signal( unlock"); assertequals( Closed", token.getnode().getname()); try { token.signal( unlock"); fail(); } catch (JbpmException e) { } } 2007 JavaOne SM Conference SessionTS-8612 18

A Door in jpdl token public void testclosedlock() { ProcessInstance processinstance = new ProcessInstance(doorProcess); Token token = processinstance.getroottoken(); token.signal("lock"); assertequals("locked", token.getnode().getname()); token.signal( unlock"); assertequals( Closed", token.getnode().getname()); try { token.signal( unlock"); fail(); } catch (JbpmException e) { } } 2007 JavaOne SM Conference SessionTS-8612 19

A Door in jpdl token public void testclosedlock() { ProcessInstance processinstance = new ProcessInstance(doorProcess); Token token = processinstance.getroottoken(); token.signal("lock"); assertequals("locked", token.getnode().getname()); token.signal( unlock"); assertequals( Closed", token.getnode().getname()); try { token.signal( unlock"); fail(); } catch (JbpmException e) { } } 2007 JavaOne SM Conference SessionTS-8612 20

A Door in jpdl token public void testclosedlock() { ProcessInstance processinstance = new ProcessInstance(doorProcess); Token token = processinstance.getroottoken(); token.signal("lock"); assertequals("locked", token.getnode().getname()); token.signal( unlock"); assertequals( Closed", token.getnode().getname()); try { token.signal( unlock"); fail(); } catch (JbpmException e) { } } 2007 JavaOne SM Conference SessionTS-8612 21

Agenda Introduction Door in Java technology and jpdl Human tasks Binding process to code Use cases Persistence 2007 JavaOne SM Conference SessionTS-8612 22

2007 JavaOne SM Conference SessionTS-8612 23

2007 JavaOne SM Conference SessionTS-8612 24

A Task in jpdl <task-node name="evaluate pay raise"> <task notify="yes priority="high"> <assignment class= com.sample.assigner" /> <reminder duedate="2 business days" repeat="4 business hours" /> <timer duedate="4 business days" transition="escalate" /> </task> <transition name="approve" to="inform HR" /> <transition name="reject" to="notify requester" /> <transition name="escalate" to="escalate request" /> </task-node> 2007 JavaOne SM Conference SessionTS-8612 25

2007 JavaOne SM Conference SessionTS-8612 26

Agenda Introduction Door in Java technology and jpdl Human tasks Binding process to code Use cases Persistence 2007 JavaOne SM Conference SessionTS-8612 27

jpdl Is Open Ended Traditional BPM/workflow systems Fixed process language jpdl has process constructs Base process language, that can be extended API for runtime behaviour jpdl can easily include Java code Process == structure Code as decoration 2007 JavaOne SM Conference SessionTS-8612 28

jpdl Adds Features to Java Technology Use jpdl for state management Use the Java platform as you do now Natural binding 2007 JavaOne SM Conference SessionTS-8612 29

Binding Process to Code e.g., Action On transition Calculate number public interface ActionHandler extends Serializable { } void execute( ExecutionContext ctx ) throws Exception; 2007 JavaOne SM Conference SessionTS-8612 30

Binding Process to Code <state name="inform HR"> <transition to="update database"> <action class="payraise.calculatenumber"> <var>salary Increase</var> <factor>5</factor> </action> </transition> </state> 2007 JavaOne SM Conference SessionTS-8612 31

Binding Process to Code public class CalculateNumber } String var; int factor; implements ActionHandler { public void execute(executioncontext ctx) { Integer value = (Integer) ctx.getvariable(var); int number = factor * value.intvalue(); ctx.setvariable("number", number); } 2007 JavaOne SM Conference SessionTS-8612 32

Expression Language <state name="inform HR"> <transition to="update database"> <action expression= #{myservice.calculatenumber} /> </transition> </state> Variable resolver knows all jbpm objects Process variables Swimlanes (=process roles) Configuration beans 2007 JavaOne SM Conference SessionTS-8612 33

Expression Language JBoss Seam/Web beans integration adds: Enterprise JavaBeans (EJB ) component architectures Backed beans Conversation beans Any named object in any Seam context 2007 JavaOne SM Conference SessionTS-8612 34

Agenda Introduction Door in Java technology and jpdl Human tasks Binding process to code Use cases Persistence 2007 JavaOne SM Conference SessionTS-8612 35

jpdl Use Cases Orchestrate human tasks session.save(taskinstance) Task List UI token.signal() 2007 JavaOne SM Conference SessionTS-8612 36

jpdl Use Cases Sending async message messageproducer.send(destination, message) JMS API Queue 2007 JavaOne SM Conference SessionTS-8612 37

jpdl Use Cases Sending async message JMS API Queue MDB 2007 JavaOne SM Conference SessionTS-8612 38

Agenda Introduction Door in Java technology and jpdl Human tasks Binding process to code Use cases Persistence 2007 JavaOne SM Conference SessionTS-8612 39

Transaction jpdl Persistence submit web sale Execution 2. Update sales review fork send bill ship items 1. Load 3. Save changes wait for payment all shipped? yes no join 1. Load end 2007 JavaOne SM Conference SessionTS-8612 40

jpdl Features Simple Use only what you need Powerful Superior modelling and execution Embeddable Libraries Database Standard and Enterprise Java platform 2007 JavaOne SM Conference SessionTS-8612 41

Conclusion JBoss jbpm is a platform for process languages jpdl Process language Fits with Java development Extracts state management Improves communication Embeddable Standard and Enterprise 2007 JavaOne SM Conference SessionTS-8612 42

jpdl Compared to BPEL jpdl Interface and variables are Java code Easy to leverage Java technology Task management Powerful and extensible constructs BPEL Interface and variables based on XML Easy to leverage web services Write a new web service as a function of others 2007 JavaOne SM Conference SessionTS-8612 43

Q&A JBoss jbpm: http://jbpm.org The Process Virtual Machine: http://jbpm.org/pvm JBoss SEAM: http://www.jboss.com/products/seam 2007 JavaOne SM Conference Session TS-8612 44

jpdl Scalability Hibernate optimistic locking Version column UPDATE... SET..., version = 2 WHERE id = 5 AND version = 1 Synchronization by DB Also pessimistic locking possible One set of objects per transaction 2007 JavaOne SM Conference SessionTS-8612 45

jpdl: Simplified Workflow for Java Technology Tom Baeyens Founder and Lead of JBoss jbpm JBoss, a Division of Red Hat http://jbpm.org Session TS-8612 2007 JavaOne SM Conference Session TS-8612