Tài liệu Activiti in Action: Executable business processes in BPMN 2.0 ppt

459 6K 10
Tài liệu Activiti in Action: Executable business processes in BPMN 2.0 ppt

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

MANNING Tijs Rademakers FOREWORDS BY Tom Baeyens AND Joram Barrez Executable business processes in BPMN 2.0 IN ACTION www.it-ebooks.info <definitions> <process> <startEvent/> <sequenceFlow/> <endEvent/> </process> </definitions> Activiti Designer Activiti Engine Process implementation Web forms Ta sk s Jobs Processes WS REST DB Activiti provides a complete BPM solution, starting with the Activiti Designer to draw your business processes using BPMN. The XML output of the Activiti Designer is deployed to the Activiti Engine that runs the process definition. The Activiti Engine executes automated steps, like calling a web service, as well as manual steps that involve people and web forms. www.it-ebooks.info Activiti in Action www.it-ebooks.info www.it-ebooks.info Activiti in Action EXECUTABLE BUSINESS PROCESSES IN BPMN 2.0 TIJS RADEMAKERS MANNING Shelter Island www.it-ebooks.info For online information and ordering of this and other Manning books, please visit www.manning.com. The publisher offers discounts on this book when ordered in quantity. For more information, please contact Special Sales Department Manning Publications Co. 20 Baldwin Road PO Box 261 Shelter Island, NY 11964 Email: orders@manning.com ©2012 by Manning Publications Co. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by means electronic, mechanical, photocopying, or otherwise, without prior written permission of the publisher. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in the book, and Manning Publications was aware of a trademark claim, the designations have been printed in initial caps or all caps. Recognizing the importance of preserving what has been written, it is Manning’s policy to have the books we publish printed on acid-free paper, and we exert our best efforts to that end. Recognizing also our responsibility to conserve the resources of our planet, Manning books are printed on paper that is at least 15 percent recycled and processed without the use of elemental chlorine. Development editor: Sebastian Stirling Manning Publications Co. Technical proofreader: Andy Verberne 20 Baldwin Road Copyeditor: June Eding PO Box 261 Proofreader: Nermina Miller Shelter Island, NY 11964 Typesetter: Gordan Salinovic Cover designer: Marija Tudor ISBN 9781617290121 Printed in the United States of America 1 2 3 4 5 6 7 8 9 10 – MAL – 17 16 15 14 13 12 www.it-ebooks.info v brief contents PART 1 INTRODUCING BPMN 2.0 AND ACTIVITI 1 1 ■ Introducing the Activiti framework 3 2 ■ BPMN 2.0: what’s in it for developers? 19 3 ■ Introducing the Activiti tool stack 32 4 ■ Working with the Activiti process engine 49 PART 2 IMPLEMENTING BPMN 2.0 PROCESSES WITH ACTIVITI 85 5 ■ Implementing a BPMN 2.0 process 87 6 ■ Applying advanced BPMN 2.0 and extensions 112 7 ■ Dealing with error handling 146 8 ■ Deploying and configuring the Activiti Engine 169 9 ■ Exploring additional Activiti modules 193 PART 3 ENHANCING BPMN 2.0 PROCESSES 223 10 ■ Implementing advanced workflow 225 11 ■ Integrating services with a BPMN 2.0 process 260 12 ■ Ruling the business rule engine 286 www.it-ebooks.info BRIEF CONTENTS vi 13 ■ Document management using Alfresco 311 14 ■ Business monitoring and Activiti 340 PART 4 MANAGING BPMN 2.0 PROCESSES 367 15 ■ Managing the Activiti Engine 369 www.it-ebooks.info vii contents foreword by tom baeyens xv foreword by joram barrez xvii preface xix acknowledgments xxi about this book xxiii about the cover illustration xxviii PART 1 INTRODUCING BPMN 2.0 AND ACTIVITI 1 1 Introducing the Activiti framework 3 1.1 The Activiti tool stack 4 1.2 Getting to know Activiti 5 A little bit of history 5 ■ The basics of the Activiti Engine 6 Knowing the competitors 7 1.3 Installing the Activiti framework 9 1.4 Implementing your first process in Activiti 11 Say hello to Activiti 12 ■ Implementing a simple book order process 14 1.5 Summary 18 www.it-ebooks.info CONTENTS viii 2 BPMN 2.0: what’s in it for developers? 19 2.1 Taking a closer look at BPM 20 Walking around the BPM life cycle 21 2.2 Evolution to BPMN 2.0 22 Wasn’t there a standard called WS-BPEL? 22 ■ And then there was BPMN 2.0 23 ■ Getting your head around all the BPMN 2.0 constructs 24 2.3 Introducing BPMN 2.0 from a developer’s viewpoint 26 High-level modeling with BPMN 2.0 26 ■ Detailed process modeling 28 2.4 Summary 31 3 Introducing the Activiti tool stack 32 3.1 Working with the Activiti Modeler 33 Installing the Activiti Modeler 33 ■ Modeling processes with the Activiti Modeler 34 3.2 Adding technical details with the Activiti Designer 36 Getting up and running with Activiti Designer 36 ■ Designing a process from scratch 37 ■ Testing processes with the Activiti Designer 39 ■ Importing a Modeler process into the Designer 42 3.3 Managing the Engine using the Activiti Explorer 45 3.4 Processes and tasks with the Activiti Explorer 46 3.5 Summary 48 4 Working with the Activiti process engine 49 4.1 Creating an Activiti development environment 50 Getting familiar with the Activiti libraries 50 ■ Mavenizing your Activiti project 51 ■ Logging in the Activiti Engine 53 Developing and testing with the Activiti Engine 54 4.2 Using the Activiti Engine API 56 Starting process instances with the RuntimeService 57 ■ Working with user tasks via the TaskService 59 ■ Deleting process definitions with the RepositoryService 64 ■ Creating users, groups, and memberships with the IdentityService 66 ■ A sneak peek into the past with the HistoryService 67 4.3 Using plain Java to do BPM 72 Java service task with class definition 73 ■ Introducing asynchronous behavior 75 ■ Java service task with class definition and field extensions 76 ■ Java service task with method and value expressions 78 www.it-ebooks.info [...]... ■ 11.5 12 Summary 285 Ruling the business rule engine 286 12.1 Introducing business rule management 287 What’s a business rule? 287 Business rule management systems 288 Using different types of rules in business processes 289 Business rule management in BPMN 2.0 291 ■ ■ ■ 12.2 Entering the rule world of Drools 292 Drools, the business logic integration platform 292 Introducing Drools Expert 293 Hands-on... testing the document-aware process definition 13.4 14 Summary 338 Business monitoring and Activiti 340 14.1 Storing Monitoring business processes 341 Introducing business activity monitoring (BAM) 341 Introducing complex event processing (CEP) 343 www.it-ebooks.info 336 xiii CONTENTS 14.2 Meeting the Esper framework 345 Kick-starting Esper 14.3 345 Introducing event windows ■ Monitoring Activiti processes. .. code listings Roadmap The book has 14 chapters divided into 4 parts: ■ ■ ■ ■ Part 1 Part 2 Part 3 Part 4 Introducing BPMN 2.0 and Activiti Implementing BPMN 2.0 processes with Activiti Enhancing BPMN 2.0 processes Managing BPMN 2.0 processes There are also two appendixes Appendix A explains how to work with the source code examples, and appendix B covers elements supported by Activiti BPMN 2.0 Part... CONTENTS 4.4 Using Spring with Activiti 79 Creating a generic Spring configuration for Activiti 79 Implementing a Spring-enabled unit test for Activiti 81 4.5 Summary 84 PART 2 IMPLEMENTING BPMN 2.0 PROCESSES WITH ACTIVITI 85 5 Implementing a BPMN 2.0 process 87 5.1 Introducing a real business process Analyzing the loan request process an XML process file 89 5.2 88 88 ■ Developing script and... Summary 168 Deploying and configuring the Activiti Engine 169 8.1 Choosing between deployment options 170 Embedding the Activiti Engine in a Java application 170 Using a standalone Activiti Engine instance 172 Choosing between the deployment options 175 ■ ■ 8.2 Using a Spring-managed Activiti Engine 176 Creating a process engine from a config file or Java 176 a process engine from a Spring configuration... nice dinners with the Activiti team, we began discussing the possibility of my joining Alfresco to work on Activiti In May 2011, I accepted the offer and was able to begin working on Activiti full-time In the meantime, the writing of this book fell a little behind schedule There was so much interesting work to be done developing the Activiti Designer, working on the Activiti Engine, and starting in a... decisions and sending email Controlling flow with an exclusive gateway an email service task 102 5.5 Deploying processes to the Activiti Engine Understanding the Activiti BAR file 106 the Activiti Engine 107 5.6 5.7 6 101 101 ■ ■ Implementing 106 Deploying processes to Testing the process with Activiti Explorer Summary 111 109 Applying advanced BPMN 2.0 and extensions 112 6.1 Using BPMN 2.0 subprocesses 113... process definitions Chapter 3 offers an overview of the Activiti framework’s main components, including the Activiti Designer and Explorer Finally, in chapter 4, we’ll discuss the Activiti API with several short code examples www.it-ebooks.info www.it-ebooks.info Introducing the Activiti framework This chapter covers ■ Introduction to Activiti ■ Installing the Activiti framework ■ Implementing a BPMN 2.0. .. Taking a process model to 90 Scripting in the Activiti Engine 90 Implementing a Java service task 92 Creating the BPMN 2.0 XML file 93 Testing the process with JUnit 94 ■ ■ 5.3 ■ Interacting with user tasks and Activiti forms 95 Creating forms in Activiti 95 Adding a task form on a start event 96 Testing forms using the FormService 97 Adding user tasks with an escalation workflow 98 ■ ■ 5.4 ■ Handling... Writing LDAP query Implementing the BPMN 2.0 multi-instance activity Configuring a multi-instance activity 246 multi-instance embedded process 247 10.4 11 Implementing a Custom form types and external form rendering 253 Implementing a custom form type 253 rendering 257 10.5 ■ 246 ■ Using external form Summary 259 Integrating services with a BPMN 2.0 process 260 11.1 Invoking services from a BPMN 2.0 . ENHANCING BPMN 2. 0 PROCESSES 22 3 10 ■ Implementing advanced workflow 22 5 11 ■ Integrating services with a BPMN 2. 0 process 26 0 12 ■ Ruling the business. Summary 22 1 PART 3 ENHANCING BPMN 2. 0 PROCESSES 22 3 10 Implementing advanced workflow 22 5 10. 1 Going beyond a simple user task 22 6 Working with subtasks 22 6 ■ Delegating

Ngày đăng: 17/02/2014, 08:20

Từ khóa liên quan

Mục lục

  • Activiti in Action

  • brief contents

  • contents

  • foreword by tom baeyens

  • foreword by joram barrez

  • preface

  • acknowledgments

  • about this book

    • Who should read this book?

    • Roadmap

    • Code conventions and downloads

    • Author Online

    • About the author

  • about the cover illustration

  • Part 1 Introducing BPMN 2.0 and Activiti

    • Introducing BPMN 2.0 and Activiti

    • Chapter 1 Introducing the Activiti framework

      • 1.1 The Activiti tool stack

      • 1.2 Getting to know Activiti

        • 1.2.1 A little bit of history

        • 1.2.2 The basics of the Activiti Engine

        • 1.2.3 Knowing the competitors

      • 1.3 Installing the Activiti framework

      • 1.4 Implementing your first process in Activiti

        • 1.4.1 Say hello to Activiti

        • 1.4.2 Implementing a simple book order process

      • 1.5 Summary

    • Chapter 2 BPMN 2.0: what’s in it for developers?

      • 2.1 Taking a closer look at BPM

        • 2.1.1 Walking around the BPM life cycle

      • 2.2 Evolution to BPMN 2.0

        • 2.2.1 Wasn’t there a standard called WS-BPEL?

        • 2.2.2 And then there was BPMN 2.0

        • 2.2.3 Getting your head around all the BPMN 2.0 constructs

      • 2.3 Introducing BPMN 2.0 from a developer’s viewpoint

        • 2.3.1 High-level modeling with BPMN 2.0

        • 2.3.2 Detailed process modeling

      • 2.4 Summary

    • Chapter 3 Introducing the Activiti tool stack

      • 3.1 Working with the Activiti Modeler

        • 3.1.1 Installing the Activiti Modeler

        • 3.1.2 Modeling processes with the Activiti Modeler

      • 3.2 Adding technical details with the Activiti Designer

        • 3.2.1 Getting up and running with Activiti Designer

        • 3.2.2 Designing a process from scratch

        • 3.2.3 Testing processes with the Activiti Designer

        • 3.2.4 Importing a Modeler process into the Designer

      • 3.3 Managing the Engine using the Activiti Explorer

      • 3.4 Processes and tasks with the Activiti Explorer

      • 3.5 Summary

    • Chapter 4 Working with the Activiti process engine

      • 4.1 Creating an Activiti development environment

        • 4.1.1 Getting familiar with the Activiti libraries

        • 4.1.2 Mavenizing your Activiti project

        • 4.1.3 Logging in the Activiti Engine

        • 4.1.4 Developing and testing with the Activiti Engine

      • 4.2 Using the Activiti Engine API

        • 4.2.1 Starting process instances with the RuntimeService

        • 4.2.2 Working with user tasks via the TaskService

        • 4.2.3 Deleting process definitions with the RepositoryService

        • 4.2.4 Creating users, groups, and memberships with the IdentityService

        • 4.2.5 A sneak peek into the past with the HistoryService

      • 4.3 Using plain Java to do BPM

        • 4.3.1 Java service task with class definition

        • 4.3.2 Introducing asynchronous behavior

        • 4.3.3 Java service task with class definition and field extensions

        • 4.3.4 Java service task with method and value expressions

      • 4.4 Using Spring with Activiti

        • 4.4.1 Creating a generic Spring configuration for Activiti

        • 4.4.2 Implementing a Spring-enabled unit test for Activiti

      • 4.5 Summary

  • Part 2 Implementing BPMN 2.0 processes with Activiti

    • Chapter 5 Implementing a BPMN 2.0 process

      • 5.1 Introducing a real business process

        • 5.1.1 Analyzing the loan request process

        • 5.1.2 Taking a process model to an XML process file

      • 5.2 Developing script and service tasks

        • 5.2.1 Scripting in the Activiti Engine

        • 5.2.2 Implementing a Java service task

        • 5.2.3 Creating the BPMN 2.0 XML file

        • 5.2.4 Testing the process with JUnit

      • 5.3 Interacting with user tasks and Activiti forms

        • 5.3.1 Creating forms in Activiti

        • 5.3.2 Adding a task form on a start event

        • 5.3.3 Testing forms using the FormService

        • 5.3.4 Adding user tasks with an escalation workflow

      • 5.4 Handling decisions and sending email

        • 5.4.1 Controlling flow with an exclusive gateway

        • 5.4.2 Implementing an email service task

      • 5.5 Deploying processes to the Activiti Engine

        • 5.5.1 Understanding the Activiti BAR file

        • 5.5.2 Deploying processes to the Activiti Engine

      • 5.6 Testing the process with Activiti Explorer

      • 5.7 Summary

    • Chapter 6 Applying advanced BPMN 2.0 and extensions

      • 6.1 Using BPMN 2.0 subprocesses

        • 6.1.1 Background to BPMN subprocesses

        • 6.1.2 Implementing embedded subprocesses

        • 6.1.3 Implementing standalone subprocesses

      • 6.2 Working with BPMN 2.0 parallel gateways

        • 6.2.1 Implementing a process with a parallel gateway

        • 6.2.2 Testing a process with a parallel gateway

      • 6.3 Adding a JPA extension to your process

        • 6.3.1 Modeling a process with a database entity

        • 6.3.2 Implementing a process with JPA extensions

        • 6.3.3 Testing a process with JPA extensions

      • 6.4 Using execution and task listeners

        • 6.4.1 Modeling a process with execution and task listeners

        • 6.4.2 Implementing execution and task listeners

        • 6.4.3 Testing the event stack list

      • 6.5 Summary

    • Chapter 7 Dealing with error handling

      • 7.1 Choosing between error handling options

        • 7.1.1 Using error end and boundary events

        • 7.1.2 Using Java logic for error handling

        • 7.1.3 Using both error handling approaches together

      • 7.2 Implementing error handling with BPMN 2.0 constructs

        • 7.2.1 Designing the sales opportunity process solution

        • 7.2.2 Modeling the sales opportunity business process

        • 7.2.3 Implementing a BPMN process with the Activiti Designer

        • 7.2.4 Implementing service tasks that invoke a web service

        • 7.2.5 Testing the sales opportunity process solution

      • 7.3 Implementing error handling using Java logic

      • 7.4 Summary

    • Chapter 8 Deploying and configuring the Activiti Engine

      • 8.1 Choosing between deployment options

        • 8.1.1 Embedding the Activiti Engine in a Java application

        • 8.1.2 Using a standalone Activiti Engine instance

        • 8.1.3 Choosing between the deployment options

      • 8.2 Using a Spring-managed Activiti Engine

        • 8.2.1 Creating a process engine from a config file or Java

        • 8.2.2 Creating a process engine from a Spring configuration

      • 8.3 Configuring the Activiti Engine

        • 8.3.1 Basic configuration overview of the Activiti Engine

        • 8.3.2 Configuring the Activiti Engine database options

        • 8.3.3 Exploring other configuration options

      • 8.4 REST communication with the Activiti Engine

        • 8.4.1 Introducing the Activiti REST API

        • 8.4.2 Implementing a new Activiti REST service

      • 8.5 Summary

    • Chapter 9 Exploring additional Activiti modules

      • 9.1 Spring annotations

      • 9.2 Building an Activiti JEE 6 application

        • 9.2.1 Implementing EJB service tasks

        • 9.2.2 Implementing a JSF process application using CDI

      • 9.3 Deploying Activiti to an OSGi container

        • 9.3.1 Introducing the OSGi standard

        • 9.3.2 Using Apache Karaf as an OSGi container

        • 9.3.3 Installing the Activiti OSGi bundle

        • 9.3.4 Getting a list of process definitions in Apache Karaf

        • 9.3.5 Building a process and task OSGi bundle

      • 9.4 Summary

  • Part 3 Enhancing BPMN 2.0 processes

    • Chapter 10 Implementing advanced workflow

      • 10.1 Going beyond a simple user task

        • 10.1.1 Working with subtasks

        • 10.1.2 Delegating tasks

        • 10.1.3 Implementing the four-eye principle

      • 10.2 Managing the user identities in an LDAP server

        • 10.2.1 Installing Apache Directory Server

        • 10.2.2 Writing LDAP query logic for the Activiti Engine

      • 10.3 Implementing the BPMN 2.0 multi-instance activity

        • 10.3.1 Configuring a multi-instance activity

        • 10.3.2 Implementing a multi-instance embedded process

      • 10.4 Custom form types and external form rendering

        • 10.4.1 Implementing a custom form type

        • 10.4.2 Using external form rendering

      • 10.5 Summary

    • Chapter 11 Integrating services with a BPMN 2.0 process

      • 11.1 Invoking services from a BPMN 2.0 process

        • 11.1.1 Calling services via a service task

        • 11.1.2 Separating process logic from integration logic

      • 11.2 Using the BPMN 2.0 web service task

      • 11.3 Integrating with Apache Camel

        • 11.3.1 Introducing Apache Camel

        • 11.3.2 Sending and receiving process messages with Apache Camel

      • 11.4 Integrating with Mule ESB

        • 11.4.1 Introducing Mule ESB

        • 11.4.2 Sending and receiving process messages with Mule ESB

      • 11.5 Summary

    • Chapter 12 Ruling the business rule engine

      • 12.1 Introducing business rule management

        • 12.1.1 What’s a business rule?

        • 12.1.2 Business rule management systems

        • 12.1.3 Using different types of rules in business processes

        • 12.1.4 Business rule management in BPMN 2.0

      • 12.2 Entering the rule world of Drools

        • 12.2.1 Drools, the business logic integration platform

        • 12.2.2 Introducing Drools Expert

        • 12.2.3 Hands-on with Drools Expert

        • 12.2.4 Using spreadsheets to create Drools decision tables

      • 12.3 Integrating Drools with Activiti

        • 12.3.1 Activiti and the business rule task

        • 12.3.2 Using business rules in a process definition

      • 12.4 Creating a web-based rule editor

        • 12.4.1 Introducing flexibility with a custom rule authoring application

      • 12.5 Summary

    • Chapter 13 Document management using Alfresco

      • 13.1 Introducing Alfresco Community

        • 13.1.1 Installing Alfresco Community

        • 13.1.2 Introducing Activiti integration in Alfresco

      • 13.2 Using CMIS to store and retrieve documents

        • 13.2.1 Retrieving folder content from Alfresco using CMIS

        • 13.2.2 Storing a new document version

      • 13.3 Adding documents to a BPMN 2.0 process definition

        • 13.3.1 Working with task and process instance attachments

        • 13.3.2 Implementing a document-aware process definition

        • 13.3.3 Deploying and testing the document-aware process definition

      • 13.4 Summary

    • Chapter 14 Business monitoring and Activiti

      • 14.1 Monitoring business processes

        • 14.1.1 Introducing business activity monitoring (BAM)

        • 14.1.2 Introducing complex event processing (CEP)

      • 14.2 Meeting the Esper framework

        • 14.2.1 Kick-starting Esper

        • 14.2.2 Introducing event windows

      • 14.3 Monitoring Activiti processes with Esper

        • 14.3.1 Integrating Activiti and Esper

        • 14.3.2 Testing the Activiti and Esper setup

      • 14.4 Monitoring Activiti with a Vaadin dashboard

        • 14.4.1 An Activiti BAM architecture

        • 14.4.2 Producing REST events with Activiti

        • 14.4.3 Setting up the Vaadin application with the Esper REST service

        • 14.4.4 Monitoring Activiti processes with a Vaadin dashboard

      • 14.5 Summary

  • Part 4 Managing BPMN 2.0 processes

    • Chapter 15 Managing the Activiti Engine

      • 15.1 Working with the Activiti database

        • 15.1.1 Understanding the Activiti runtime execution database model

        • 15.1.2 Understanding the Activiti history database model

        • 15.1.3 Creating the Activiti database

        • 15.1.4 Upgrading the Activiti database

      • 15.2 Dealing with process versioning

      • 15.3 Understanding the job executor

      • 15.4 Building an administrator dashboard

      • 15.5 Summary

  • appendix A Working with the source code

    • A.1 Overview of the source code projects

    • A.2 Using the bpmn-examples project

  • appendix B BPMN 2.0 supported elements in Activiti

    • B.1 Start and end events

      • B.1.1 None start event

      • B.1.2 Timer start event

      • B.1.3 None end event

      • B.1.4 Error end event

    • B.2 Sequence flows

      • B.2.1 Sequence flow

      • B.2.2 Conditional sequence flow

    • B.3 Tasks

      • B.3.1 Generic task configuration

      • B.3.2 Business rule task

      • B.3.3 Camel task

      • B.3.4 Email task

      • B.3.5 Java service task

      • B.3.6 Manual task

      • B.3.7 Mule task

      • B.3.8 Receive task

      • B.3.9 Script task

      • B.3.10 User task

      • B.3.11 Web service task

    • B.4 Gateways

      • B.4.1 Exclusive gateway

      • B.4.2 Inclusive gateway

      • B.4.3 Parallel gateway

    • B.5 Other activities

      • B.5.1 Call activity

      • B.5.2 Embedded subprocess

    • B.6 Boundary events

      • B.6.1 Error boundary event

      • B.6.2 Timer boundary event

    • B.7 Intermediate events

      • B.7.1 Timer intermediate catching event

  • index

    • Symbols

    • A

    • B

    • C

    • D

    • E

    • F

    • G

    • H

    • I

    • J

    • K

    • L

    • M

    • N

    • O

    • P

    • Q

    • R

    • S

    • T

    • U

    • V

    • W

    • X

    • Z

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan