open-source workflow evaluation - diva

191
Mid Sweden University The Department of Information Technology and Media (ITM) Author: Mikael Nilsson E-mail address: [email protected] Study programme: M. Sc. In engineering computer engineering, 240 ECTS Examiner: Tingting Zhang, [email protected] Tutors: Anders Trollås, Cybercom Group, [email protected] Fredrik Håkansson, Mid Sweden University, [email protected] Scope: 29901 words inclusive of appendices Date: 2012-06-29 M.Sc. Thesis within Computer Engineering AV, 30 ECTS Open-source Workflow Evaluation An evaluation of the Activiti BPM Platform Mikael Nilsson

Upload: others

Post on 11-Feb-2022

9 views

Category:

Documents


0 download

TRANSCRIPT

Mid Sweden University

The Department of Information Technology and Media (ITM)

Author: Mikael Nilsson

E-mail address: [email protected]

Study programme: M. Sc. In engineering – computer engineering, 240 ECTS

Examiner: Tingting Zhang, [email protected]

Tutors: Anders Trollås, Cybercom Group, [email protected]

Fredrik Håkansson, Mid Sweden University, [email protected]

Scope: 29901 words inclusive of appendices

Date: 2012-06-29

M.Sc. Thesis within Computer Engineering AV, 30 ECTS

Open-source Workflow Evaluation

An evaluation of the Activiti BPM Platform

Mikael Nilsson

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Abstract

2012-06-29

ii

Abstract The aim of this thesis is to evaluate the newly released open-source

business process management platform Activiti. The platform is evalu-

ated in the first instance by implementing the control-flow patterns

which will be used at a later stage as a comparison with other platforms

that have already been evaluated. Activiti comes with a web application

called Activiti Explorer which is a graphical user interface between the

process engine and the user. As all the desired features commissioned

by the Cybercom Group were not available in the Activiti Explorer its

source-code was extended. These extended features included support

for several companies per installation and the ability to customize the

layout of the components in user task forms. The report is concluded

with a comparison between Activiti, jBPM, OpenWFE and Enhydra

shark with regards to the control-flow patterns.

Keywords: Open-source, Workflow, BPM, BPMN 2.0, Activiti, Work-

flow patterns, Control-flow patterns

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Acknowledgements

2012-06-29

iii

Acknowledgements Thanks to...

Anders Trollås, my tutor from Cybercom Group, for your help, guidance and support during this thesis.

Fredrik Håkansson, my tutor from Mid Sweden University, for your help, reviews and valuable advice for my report.

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Table of Contents

2012-06-29

iv

Table of Contents Abstract ............................................................................................................. ii

Acknowledgements ....................................................................................... iii

Terminology .....................................................................................................ix

Introduction ............................................................................................ 1 1

1.1 Background and problem motivation ...................................... 4

1.2 Overall aim and verifiable goals ............................................... 5

1.3 Scope ............................................................................................. 6

1.4 Outline .......................................................................................... 6

1.5 Contributions ............................................................................... 7

Theory ...................................................................................................... 8 2

2.1 BPMN 2.0 ...................................................................................... 8

2.2 Activiti Designer .......................................................................... 8

2.3 Workflow Patterns ...................................................................... 9

2.4 Control-flow patterns ................................................................. 9

Basic Control Flow Patterns ............................................ 9 2.4.1

Advanced Branching and Synchronization Patterns 10 2.4.2

Multiple Instance Patterns ............................................ 11 2.4.3

State-based Patterns ....................................................... 11 2.4.4

Cancellation and Force Completion Patterns ............. 12 2.4.5

Iteration Patterns ............................................................ 12 2.4.6

Termination Patterns ..................................................... 12 2.4.7

Trigger Patterns .............................................................. 12 2.4.8

2.5 Activiti source code ................................................................... 13

2.6 Activiti Explorer ........................................................................ 13

Spring Framework .......................................................... 13 2.6.1

Vaadin .............................................................................. 14 2.6.2

Activiti Process Engine .................................................. 16 2.6.3

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Table of Contents

2012-06-29

v

Methodology ........................................................................................ 18 3

3.1 Literature studies ....................................................................... 18

3.2 Workflow patterns initiative.................................................... 18

3.3 Workflow patterns evaluation ................................................. 18

Implementing the patterns ............................................ 18 3.3.1

3.4 Product comparison .................................................................. 19

3.5 Building the extended version of Activiti Explorer ............. 19

Implementation ................................................................................... 21 4

4.1 Control-flow patterns ............................................................... 21

Pattern 1 – Sequence....................................................... 21 4.1.1

Pattern 2 – Parallel split ................................................. 21 4.1.2

Pattern 3 – Synchronization .......................................... 22 4.1.3

Pattern 4 - Exclusive Choice .......................................... 22 4.1.4

Pattern 5 - Simple Merge ............................................... 23 4.1.5

Pattern 6 - Multi-Choice ................................................ 23 4.1.6

Pattern 7 - Structured Synchronizing Merge .............. 24 4.1.7

Pattern 8 - Multi-Merge ................................................. 24 4.1.8

Pattern 9 - Structured Discriminator ........................... 25 4.1.9

Pattern 10 – Arbitrary Cycles ........................................ 25 4.1.10

Pattern 11 - Implicit Termination ................................. 25 4.1.11

Pattern 12 - Multiple Instances without 4.1.12

Synchronization .............................................................. 26

Pattern 13 - Multiple Instances with a priori Design-4.1.13

Time Knowledge ............................................................ 26

Pattern 14 - Multiple Instances with a priori Run-Time 4.1.14

Knowledge ...................................................................... 27

Pattern 15 - Multiple instances without a priori run-4.1.15

time knowledge .............................................................. 27

Pattern 16 - Deferred Choice ......................................... 27 4.1.16

Pattern 17 - Interleaved Parallel Routing .................... 28 4.1.17

Pattern 18 – Milestone .................................................... 28 4.1.18

Pattern 19 - Cancel Activity .......................................... 28 4.1.19

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Table of Contents

2012-06-29

vi

Pattern 20 - Cancel Case ................................................ 29 4.1.20

Pattern 21 - Structured Loop ......................................... 29 4.1.21

Pattern 22 - Recursion .................................................... 30 4.1.22

Pattern 23 - Transient Trigger ....................................... 30 4.1.23

Pattern 24 - Persistent Trigger ...................................... 30 4.1.24

Pattern 25 - Cancel Region ............................................ 30 4.1.25

Pattern 26 - Cancel Multiple Instance Activity .......... 31 4.1.26

Pattern 27 - Complete Multiple Instance Activity ..... 31 4.1.27

Pattern 28 - Blocking Discriminator ............................. 32 4.1.28

Pattern 29 - Cancelling Discriminator ......................... 32 4.1.29

Pattern 30 - Structured Partial Join .............................. 32 4.1.30

Pattern 31 - Blocking Partial Join .................................. 32 4.1.31

Pattern 32 - Cancelling Partial Join .............................. 33 4.1.32

Pattern 33 - Generalized AND-Join ............................. 33 4.1.33

Pattern 34 - Static Partial Join for Multiple Instances 33 4.1.34

Pattern 35 - Cancelling Partial Join for Multiple 4.1.35

Instances .......................................................................... 33

Pattern 36 - Dynamic Partial Join for Multiple 4.1.36

Instances .......................................................................... 33

Pattern 37 - Acyclic Synchronizing Merge .................. 33 4.1.37

Pattern 38 - General Synchronizing Merge ................. 33 4.1.38

Pattern 39 - Critical Section ........................................... 33 4.1.39

Pattern 40 - Interleaved Routing .................................. 34 4.1.40

Pattern 41 - Thread Merge ............................................. 34 4.1.41

Pattern 42 - Thread Split ................................................ 34 4.1.42

Pattern 43 - Explicit Termination ................................. 34 4.1.43

4.2 Support for multiple companies ............................................. 34

Company Database and Admin web application ..... 34 4.2.1

CloudProcessEngines ..................................................... 35 4.2.2

Login ................................................................................. 36 4.2.3

User Cache ....................................................................... 36 4.2.4

Activiti Company Deployment Manager ................... 36 4.2.5

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Table of Contents

2012-06-29

vii

Deployment helper tools ............................................... 38 4.2.6

4.3 Support for a business payment model ................................. 39

4.4 Support for custom layout in task forms ............................... 39

XML specification ........................................................... 40 4.4.1

Validating custom forms ............................................... 42 4.4.2

Extending Activiti to support the custom form 4.4.3

layouts .............................................................................. 42

Helper tools ..................................................................... 43 4.4.4

4.5 Improvements and bug fixes ................................................... 43

High resolution screen support .................................... 43 4.5.1

Boolean bug fix ............................................................... 44 4.5.2

Date field .......................................................................... 45 4.5.3

Enum fields...................................................................... 46 4.5.4

Textarea component ....................................................... 46 4.5.5

Results ................................................................................................... 47 5

5.1 Control-flow patterns evaluation ............................................ 47

5.2 Support for multiple companies ............................................. 50

Admin web application and payment model ............ 51 5.2.1

Activiti Company Deployment Manager ................... 52 5.2.2

Set up a new server with the extended version of 5.2.3

Activiti Explorer. ............................................................ 56

5.3 Support for custom layout in task forms ............................... 57

5.4 Improvements and bug fixes ................................................... 61

Large screen support ...................................................... 61 5.4.1

Boolean bug fix ............................................................... 62 5.4.2

Date field .......................................................................... 62 5.4.3

Enum fields...................................................................... 63 5.4.4

Conclusions .......................................................................................... 64 6

6.1 Control-flow evaluation ........................................................... 64

Basic Control Flow Patterns .......................................... 64 6.1.1

Advanced Branching and Synchronization Patterns 64 6.1.2

Multiple Instance Patterns ............................................ 65 6.1.3

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Table of Contents

2012-06-29

viii

State-based Patterns ....................................................... 65 6.1.4

Cancellation and Force Completion Patterns ............. 65 6.1.5

Iteration Patterns ............................................................ 65 6.1.6

Termination Patterns ..................................................... 65 6.1.7

Trigger Patterns .............................................................. 66 6.1.8

Control-flow patterns .................................................... 66 6.1.9

6.2 Extended Activiti Explorer ...................................................... 66

Support for multiple companies .................................. 67 6.2.1

Support for custom layout in task forms .................... 67 6.2.2

Support for a business payment model ...................... 67 6.2.3

Improvements and bug fixes ........................................ 68 6.2.4

Future work .......................................................................................... 69 7

7.1 Workflow pattern evaluation .................................................. 69

7.2 Multiple companies................................................................... 69

7.3 Custom form layout .................................................................. 69

References ........................................................................................................ 70

Appendix A: Process constricts in Activiti Designer .............................. 73

Appendix B: Control-flow patterns definitions ....................................... 78

Appendix C: New Features .......................................................................... 88

Appendix D: Improvements and bug fixes ............................................. 122

Appendix E: XML implementation of the supported patterns ........... 124

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Terminology

2012-06-29

ix

Terminology Acronyms

BPM Business Process Management

BPMN Business Process Model and Notation

XML Extensible Markup Language

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

1 Introduction

2012-06-29

1

Introduction 1The concept of workflow has its early roots in industrialization and was

introduced in order to increase efficiency in production. In the begin-

ning, processes were carried out entirely by humans but today processes

are carried out partially or totally by computer information systems.

According to Medina-Mora et al. [1] processes can be organized into

material processes, information processes and business processes.

Material processes consist of the assembly and delivery of physical

products. Information processes are related to automated computer

software that fully or partially perform tasks with interaction from

humans. Business processes are a higher level concept and consist of

information processes and/or material processes. Business processes

describe the organization's activities from a market-centred perspective

and are engineered to fulfil a business contract or to satisfy the require-

ments of a specific customer. This thesis deals exclusively with business

processes implemented as information processes. [1]

The term “workflow” is used casually to refer to a business process, the

specification of a business process, the software that implements and

automates a process or the software that supports the coordination and

collaboration of people that implement a process. What workflow is and

which features a workflow management system should support are not

fully agreed upon, even the definition of the terms differs among soft-

ware vendors. [2]

Georgakopoulos et al. [2] defines the term workflow as a collection of

tasks organized to accomplish some business process (e.g., processing purchase

orders over the phone, provisioning telephone services, processing insurance

claims). A task can be performed by one or more software systems, one or a

team of humans, or a combination of these. Human tasks include interacting

with computers closely (e.g., providing input commands) or loosely (e.g., using

computers only to indicate task progress). In addition to a collection of tasks, a

workflow defines the order of task invocation or condition(s) under which tasks

must be invoked, task synchronization, and information flow (dataflow). [2]

There are many different approaches to process specification with

different syntax, semantics and terminology. This makes the choice of

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

1 Introduction

2012-06-29

2

workflow system more complex because all process specifications have

their weaknesses and their strengths thus making it difficult to choose a

process definition language that is suitable for a particular project. This

thesis focuses on the Business Process Model and Notation language

(BPMN) version 2.0.

The Workflow Patterns initiative was started in 1999 by Eindhoven

University of Technology and Queensland University of Technology.

The goal of the initiative was to provide a comprehensive examination

of the various perspectives supported by workflow systems and their

process definition languages. This was conducted by categorizing com-

mon constructs used in real world processes. The purpose of the pat-

terns is to provide an objective means of evaluating and comparing

different workflow platforms and their definition languages. At the

beginning they received little attention outside academia but, as of the

present time, more and more vendors are evaluating their products and

submitting the results to workflow patterns initiative. [3]

This thesis deals with the control flow patterns as described by Wil van

der Aalst et al. (2003, 2006) [4][5]. Workflow patterns are related to

design patterns in architecture and computer science and were first

introduced by Christopher Alexander (1977) [6] in the field of architec-

ture and by the Gang of Four 1995 [7] in computer science. Christopher

Alexander provides the following definition, Each pattern describes a

problem that occurs over and over again in our environment, and then describes

the core of the solution to that problem, in such a way that you can use this

solution a million times over, without ever doing it the same way twice. [6]

Business Process Management (BPM) extends the concept of workflow

by focusing on all aspects of processes within an organization. It has

methods to handle both process reengineering and process redesign and

it supports the complete business process lifecycle (Design & Analysis ->

Configuration -> Enactment -> Evaluation) see figure 1. [8]

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

1 Introduction

2012-06-29

3

Business process lifecycle Design & Analysis

Evaluation: Process Mining

Business Activity Monitoring

Design:Business ProcessIdentification and

Modeling

Analysis:ValidationSimulation

Verification

Configuration:System SelectionImplementation

Test and Deployment

Enactment:Operation

Monitoring

Maintenance

Configuration

Enactment

Evaluation

Figure 1: Business Process Lifecycle [8]

The reengineering addresses the issues of system efficiency, system cost

and it explores the use of new advancement in technology. Business

process redesign improves the efficiency of business operations, the

quality of products, reduces costs, meets new business challenges and

increases customer satisfaction. A software BPM platform delivers

greater control and visibility over processes and workflow integration

with other applications. [8]

Open-source software has grown both in popularity and maturity and is

becoming a viable alternative to commercial enterprise business prod-

ucts. The advantages associated with choosing open-source software are

that there is full control over the source code meaning that it is possible

to learn how it works, to modify it, fix errors and continue its develop-

ment even after the product has been discontinued. Another benefit is

that there are no license fees and free community support is available.

For many businesses this is not sufficient and therefore many products

offer full professional support and extra features but this involves a fee.

The disadvantages of choosing an open-source product are that it might

not be sufficiently developed to the degree that it is able to be used in a

demanding business environment. Enterprise open-source products are

often more difficult to learn than their proprietary counterparts and

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

1 Introduction

2012-06-29

4

their intended user group are more focused towards software engineers

than business analysts.

1.1 Background and problem motivation

Activiti [9] is a new open-source light-weight workflow and Business

Process Management platform. The development is led by Tom Baeyens

and Joram Barrez and it is funded by the company Alfresco [21]. It had

its first stable release on December 1st 2010 and it has been in active

development ever since. The first stable release was version 5.0 and this

was because the lead developers had previously worked on jBPM (up to

version 4.0) before they left Red Hat to work for Alfresco. Activiti is a

relatively new product and it lacks proper independent evaluations and

scientific reports. Petia Wohed et al 2007 [10] conducted a pattern-based

evaluation of the open-source BPM systems, jBPM version 3.1.4 [11],

OpenWFE version 1.7.3 [12] and Enhydra Shark version 2 [13]. The

process definition languages used were jBPM Process Definition Lan-

guage (jPDL) for jBPM, XPDL 1.0 for Enhydra shark and the OpenWFE

process definition language for OpenWFE. They used the patterns from

the workflow pattern initiative as the basis for their study. As of today

this is the only evaluation of open-source BPM products available at the

workflow patterns initiative website. Many other BPM platforms and

process languages have been evaluated against the workflow patterns

and the result can be found on their website [3], but since the focus of

this thesis is on open-source platforms the results from other platforms

will not be discussed.

At the time of writing, both Activiti and its process definition language

BPMN 2.0 have not yet been evaluated by the workflow pattern initia-

tive. For this reason the IT consulting company Cybercom Group would

like Activiti to be evaluated against both the control flow patterns and

as an open-source product. The result from the pattern evaluation

makes it easy to compare Activiti with other products. It is also easier to

choose an appropriate product for a particular project by looking at its

strengths and weaknesses with regards to its supported patterns. The

result from the pattern evaluation of Activiti should therefore be com-

pared to the result from the open-source BPM evaluation conducted by

Petia Wohed et al 2007 [10] to determine which platform is more suita-

ble with regards to the control flow patterns.

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

1 Introduction

2012-06-29

5

Activiti will also be evaluated as an open-source project by modifying

and extending the source code to fit the requirements given by the

Cybercom Group.

1.2 Overall aim and verifiable goals

The overall aim of this thesis is to evaluate Activiti and detail its

strengths and weaknesses. This result from the control flow evaluation

should be used at a later stage to determine the suitability of using

Activiti in a particular project and to compare it against the other open-

source BPM platforms (jBPM, OpenWFE and Enhydra shark). The goal

is also to offer a short theoretical overview of the control flow patterns

and a brief theoretical overview of the frameworks used by the Activiti

open-source project.

In the practical part of this thesis an attempt to implement all the control

flow patterns is made. The result should include:

Table of the evaluation of Activiti against all Control flow pat-

terns

Comparison of Activti, jBPM, OpenWFE and Enhydra shark in

regards to their support for the control flow patterns defined in

[5]. The pattern support for jBPM, OpenWFE and Enhydra shark

are taken from [10].

The Cybercom Group also requested the following extensions and

modifications to Activiti Explorer, for creating an extended Activiti

Explorer:

Support for multiple companies within Activiti Explorer

Support for customizing the layout of user task forms in Activiti

Explorer.

Support to change the main colours and logotypes in Activiti Ex-

plorer.

Support for a business payment model (ex. pay per process in-

stance).

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

1 Introduction

2012-06-29

6

All of the above points must be implemented without changing the

source code of the Activiti engine.

1.3 Scope

The theoretical and practical parts of the pattern evaluation will be

restricted to the control flow patterns. When conducting the evaluation

each pattern is implemented in Activiti Designer and graded with a '+'

for direct support, '+/-' for partial support and '-' if the pattern is not

supported [30]. Activiti is an open-source platform and the main interest

in this study is in relation to the suitability of Activiti when choosing an

open-source BPM platform. This, and the fact that the majority of com-

mercial software is not provided with source code, is the reason why

this study is limited to only open-source products.

Since the extended Activiti Explorer platform is a commission from the

Cybercom Group both the theoretical and practical parts will primarily

focus on how to achieve the requested features. The evaluation, from an

open-source perspective, consists of implementing two extensions and

fixing some minor bugs. A brief theoretical presentation of the project

and the major frameworks is also provided. Finally a list of all the

required changes and the classes created to implement the extensions

and fixes will be presented in Appendices C and D.

1.4 Outline

Chapter 2 introduces the reader to BPMN 2.0 and Activiti De-

signer and to the control-flow patterns and then offers a short in-

troduction to the foundation of the Activiti source code.

Chapter 3 describes the methodology used in this thesis.

Chapter 4 describes the implementation of the patterns and the

modifications made to the source code.

Chapter 5 presents the result of this thesis with tables for the pat-

terns and screenshots of the added features.

Chapter 6 presents the conclusion and discussion of this thesis.

Chapter 7 presents the ideas for future work regarding the exten-

sions to Activiti Explorer.

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

1 Introduction

2012-06-29

7

Appendix A: contains a list with description of the process con-

structs used in Activiti Designer when implementing the pat-

terns.

Appendix B: contains the definitions of all 43 control-flow pat-

terns.

Appendix C: contains a description of how the new features were

added to Activiti Explorer.

Appendix D: contains a description of how the improvements

and bug fixes were added to Activiti Explorer.

Appendix E: contains the XML implementation of the supported

patterns.

1.5 Contributions

The author has contributed to the Activiti evaluation of the control-

flow patterns, the XML specification for the custom form layout, ex-

tensions made to the source-code of Activiti Explorer to support the

requirements given by the Cybercom Group and the helper tools to

facilitate the use of the extended version of Activiti Explorer.

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

2 Theory

2012-06-29

8

Theory 2This chapter consists of a brief explanation of the BPMN 2.0 notation

language, Activiti Designer and the workflow patterns. The last part

consists of an overview of the Activiti source code and the frameworks

used.

2.1 BPMN 2.0

BPMN stands for Business Process Model and Notation and version 2.0

specifies both a graphical notation language in addition to the XML

notation language. It was developed by the Business Process Manage-

ment Initiative and is now maintained by the Object Management

Group since the merger in 2005. Business processes are modeled using

connections, events, activities and gateways. Connections are used to

connect activities, gateways and events together. Events are displayed

as a circle and denote that something has occurred, for example start

and end events. Events can also be throwing and catching events. Activ-

ities represent a piece of work that is required to be conducted. The

work can be automatic or manual with human involvment. Gateways

are a means of splitting up or merging the execution flow in a process.

The constructs used when modeling the control-flow patterns are de-

scribed in Appendix A. [20]

2.2 Activiti Designer

The Activiti Designer is an Eclipse [22] plugin which allows the process

developer to develop BPMN 2.0 processes using a graphical user inter-

face with drag and drop components. Activiti Designer does not sup-

port the complete set of BPMN 2.0 components and features at the

present time, but more support arrives with each new version. Activiti

5.9 has just been released with support for some new components

which, at present, are labeled experimental and which are not included

in Activiti Designer. Experimental components were not used when

modelling the patterns. For a description of the components used in the

implementation of the workflow patterns see Appendix A.

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

2 Theory

2012-06-29

9

2.3 Workflow Patterns

The Workflow Patterns initiative was started in 1999 by Professor Wil

van der Aals and Professor Arthur ter Hofstede [3]. It was established to

describe the fundamental structures in an imperative way [3]. These

structures are reoccurring over and over again when modelling business

processes. The research project first produced a set of twenty control-

flow patterns for workflow systems [4]. Since then patterns have

evolved and they now cover the following workflow perspectives,

control-flow, data, resource, exception handling and presentation. These

patterns have been used to evaluate existing workflow systems so as to

determine their suitability for a particular project and for the develop-

ment of workflow systems. [24]

2.4 Control-flow patterns

In 2006 a new paper with a revised view on the control-flow patterns

was released [5]. The new revised definitions were an effort to make the

implementation and interpretation of the patterns less ambiguous by

taking the strictest possible interpretations. In addition to the twenty

revised patterns, twenty-three new control-flow patterns were also

introduced. For the definitions of all 43 control-flow patterns see Ap-

pendix B. The forty-three control-flow patterns can be divided into eight

classes which are described below. [25]

Basic Control Flow Patterns 2.4.1

In the class Basic Control Flow Patterns are those patterns dealing with

the execution order of activities and the ability to run activities concur-

rently and patterns that deal with simple choice and merger. These

patterns are the fundamental building blocks of a workflow system. The

following patterns belong to the basic control flow patterns, for their

definitions see Appendix B. [25]

1. Sequence

2. Parallel Split

3. Synchronization

4. Exclusive Choice

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

2 Theory

2012-06-29

10

5. Simple Merge

Advanced Branching and Synchronization Patterns 2.4.2

In the class Advance Branching and Synchronization Patterns are pat-

terns that deal with advance merging and synchronization constructs

during which several branches come together. There is also a pattern

that deals with the choice regarding which branches to activate. In the

case of synchronization the subsequent activity should be called first

when all the active branches have reached the construct, while in some

patterns, only the first thread is passed to the subsequent activity while

the others are blocked. There are also patterns that deal with the crea-

tion and synchronization of threads within a branch. The following is

the complete set of patterns belonging to the advanced branching and

synchronization patterns and for their definitions see Appendix B. [25]

6. Multi-Choice

7. Structured Synchronizing Merge

8. Multi-Merge

9. Structured Discriminator

28. Blocking Discriminator

29. Cancelling Discriminator

30. Structured Partial Join

31. Blocking Partial Join

32. Cancelling Partial Join

33. Generalised AND-Join

37. Local Synchronizing Merge

38. General Synchronizing Merge

41. Thread Merge

42. Thread Split

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

2 Theory

2012-06-29

11

Multiple Instance Patterns 2.4.3

In the class Multiple Instance Patterns are those patterns dealing with

multiple instances of the same activity. The patterns deal with the initia-

tion, the synchronization for completed instances and in dynamically

adding new instances. The following patterns belong to the multiple

instance patterns, for their definitions see Appendix B. [25]

12. Multiple Instances without Synchronization

13. Multiple Instances with a Priori Design-Time Knowledge

14. Multiple Instances with a Priori Run-Time Knowledge

15. Multiple Instances without a Priori Run-Time Knowledge

34. Static Partial Join for Multiple Instances

35. Cancelling Partial Join for Multiple Instances

36. Dynamic Partial Join for Multiple Instances

State-based Patterns 2.4.4

In the class State-based Patterns are those patterns dealing with syn-

chronization, choice and which branches are able to be activated based

on the state of the process instance. The state of a process instance is

referring to its execution status and the related process and working

data, which includes the status of activities. The following patterns

belong to the state-based patterns, for their definitions see Appendix B.

[25]

16. Deferred Choice

17. Interleaved Parallel Routing

18. Milestone

39. Critical Section

40. Interleaved Routing

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

2 Theory

2012-06-29

12

Cancellation and Force Completion Patterns 2.4.5

In the class Cancellation and Force Completion Patterns are those pat-

terns dealing with the forced cancellation and completion of running

activities and process instances. These patterns can easily be implement-

ed using exception handling. The following patterns belong to the

cancellation and forced completion patterns, for their definitions see

Appendix B. [25]

19. Cancel Task

20. Cancel Case

25. Cancel Region

26. Cancel Multiple Instance Activity

27. Complete Multiple Instance Activity

Iteration Patterns 2.4.6

In the class Iteration Patterns are those patterns dealing with the repeti-

tive behaviour of a process. The following patterns belong to the itera-

tion patterns, for their definitions see Appendix B. [25]

10. Arbitrary Cycles

21. Structured Loop

22. Recursion

Termination Patterns 2.4.7

In the class Termination Patterns are the patterns that deal with the

termination and completion of a process. The following patterns belong

to the termination patterns, for their definitions see Appendix B. [25]

11. Implicit Termination

43. Explicit Termination

Trigger Patterns 2.4.8

In the class Trigger Patterns are those patterns dealing with the external

signals that might be necessary to start certain activities. The following

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

2 Theory

2012-06-29

13

patterns belong to the trigger patterns, for their definitions see Appen-

dix B. [25]

23. Transient Trigger

24. Persistent Trigger

2.5 Activiti source code

The Activiti open-source project consists of many different modules.

The modules that are found in the Activiti 5.9 subversion repository [26]

are activiti-cactus, activiti-camel, activiti-cdi, activiti-cxf, activiti-engine,

activiti-mule, activiti-osgi, activiti-spring, activiti-webapp-exploirer2

and activiti-webbapp-rest2. The code is written in Java and it is using

the build manager Maven. The modules that are of interest in this study

are primarily the activiti-engine, which is a BPMN 2.0 process engine

and the activiti-webapp-explorer2, which is a web interface that uses the

process engine. All the source code is licensed under the Apache Li-

cense, Version 2.0 [14].

2.6 Activiti Explorer

Activiti Explorer [27] is a web application that is built with the Vaadin

framework and it utilizes the Spring framework to start the process

engine. It has an easy-to-use interface for starting processes and han-

dling human tasks. On the task page, the tasks appear in the user’s

inbox or, if they are assigned to a group, under the queued menu. The

process page allows the users to start new processes or to view the

current execution state on an already started processes belonging to the

user. The manage page is visible for users with administrator rights. The

administrator can deploy new processes in this page, delete old ones,

manage users and groups and investigate the content in the database

tables. [27]

Spring Framework 2.6.1

The Spring framework assists in the building of enterprise Java applica-

tions by allowing the programmer to focus on the problem rather than

on pluming code [15]. The module used by Activiti is the inversion of

control container, which is responsible for managing objects lifecycles,

and this is conducted by means of dependency injection. The main

principle behind dependency injection is to load objects at runtime

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

2 Theory

2012-06-29

14

instead of at compile time, which is the usual way of loading objects.

This is conducted by specifying all objects to be loaded in an XML file

that is parsed by Spring and the objects are then instantiated and loaded

into a container, accessible from the Java code. This makes it possible to

add objects to the software without the necessity to recompile it. Apart

from the late binding, it is also possible to assign values (this includes

other objects loaded by Spring) to objects using either the constructor or

setters directly in the XML file. This is of course a small sub set of the

features provided by the Spring framework but deals with those used in

Activiti.

Vaadin 2.6.2

Vaadin [16] is a Java framework for rich internet applications. Vaadin is

based on the Google Web Toolkit (GWT) [17], and it is a rapid applica-

tion development framework to build secure rich internet applications.

It allows the programmer to write an Internet application directly in

Java and compiles it to both the client and server software. The client

and server communicate via asynchronous Javascript (AJAX) and thus

there is no requirement for any browser plugins. See figure 2 for the

complete communication chain.

Web Service

DB

EJB

YourJava Application

VaadinUI Components

JavaWeb Server

Web Browser Client-Side Engine

Figure 2: Vaadin communication [28]

Vaadin UI Components

All user interface components that are available in Vaadin are listed in

the inheritance diagram in figure 3.

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

2 Theory

2012-06-29

15

Figure 3: UI Component Inheritance Diagram. [28]

The Component class is the top most class in this hierarchy. The compo-

nents used when creating input forms are all descendants of the Field

class and they are all implementing the AbstractField interface. Fields

are components that have a value that can be changed directly in the

interface by the user. Fields use the Vaadin data model which means

that the value is handled as a Property. A Property is an interface that

uses get and set methods which take a value of type Object. This makes

the interface compatible with all types of components and values since

all objects inherit from the Object class in Java. For the inheritance

diagram of the Field class see figure 4. [28]

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

2 Theory

2012-06-29

16

Figure 4: Field Interface Inheritance Diagram. [28]

Activiti Process Engine 2.6.3

The central point of the Process Engine API is the ProcessEngine class.

To create an instance of the ProcessEngine the ProcessEngineConfigura-

tion object can be used via the Spring framework [15], xml or directly in

Java code. To handle multiple instances of the ProcessEngine the Pro-

cessEngines class can be used and it contains methods for safely creating

and closing all running engines. Once an engine is up and running its

services containing the workflow/BPM methods can be obtained by

calling the corresponding getters on the engine object, see figure 5 for all

available services. [29]

ProcessEngine

RepositoryService ManagmentService TaskService HistoryService

IdentityService FormService RuntimeService

Figure 5: Activiti Engine and its services [29]

Repository Service

The RepositoryService provides access to the repository of pro-

cess definitions and other deployments. It is used for deploying

to the database and retrieving deployed items. [29]

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

2 Theory

2012-06-29

17

Management Service

The ManagementService is used for maintenance and administra-

tion operations on the process engine. [29]

Task Service

The TaskService provides access to tasks and form operations.

[29]

History Service

The HistoryService provides access to information about ongoing

and past process instances. [29]

Identity Service

The IdentityService provides information on users and groups.

[29]

Form Service

The FormService provides access to form data. [29]

Runtime Service

The RuntimeService provides access to process instances, defini-

tions and deployments. [29]

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

3 Methodology

2012-06-29

18

Methodology 3The methodology used in this thesis consists, in the first instance, a

theoretical study on BPM, workflow patterns, Activiti and Vaadin. The

second part is a practical implementation of the patterns and the exten-

sion of the functionality of Activiti Explorer.

3.1 Literature studies

The online library at Mid Sweden University was used to search for

articles and publications regarding BPM and workflow patterns. The

workflow patterns initiative website [3] also contained many sources.

The following documents were found [1][2][4][5][8][10] via the online

library or at the workflow patterns initiative website. To learn about

Activiti and Vaadin the main websites [9][16] were used as the primary

sources and, in addition, the following books were used [18][19].

3.2 Workflow patterns initiative

The workflow patterns initiative website [3] together with the papers

[4][5] were the main source of information regarding the patterns. The

sources were used when studying the theory behind the patterns and

for the implementation and to evaluate the result.

3.3 Workflow patterns evaluation

When evaluating Activiti against the patterns, Activiti Designer was

chosen as the process development tool. Because it is an official tool and

offers an easy graphical environment with drag and drop components.

There are other BPMN 2.0 modelling tools, for example, Activiti Model-

ler, which is a web based modeller but these do not offer support for

Activiti specific extensions to the BPMN 2.0 language. For the evalua-

tion of the patterns, the requirement is that a graphical development

tool is to be used and that the patterns are able to be implemented

through its use. [30]

Implementing the patterns 3.3.1

The description of the pattern was read first and from this the motiva-

tion was provided as were the, context and implementation. Once the

pattern had been fully understood an attempt was made to implement it

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

3 Methodology

2012-06-29

19

in Activiti Designer. If the functionality of the pattern was achieved then

the evaluation criteria and product evaluation was read. Finally, the

finished implementation was graded according to the product evalua-

tion criteria. If the functionality was not achieved then further reading

with regards to Activiti and BPMN 2.0 was conducted. Once all the

attempts have failed then the pattern is considered to be not supported.

[30]

When grading the support for the patterns a “+” sign is given to the

patterns that are directly supported, meaning that one of the language

constructs satisfies the evaluation criteria of the pattern. For partial

support “+/-“ is given, meaning that there is some limitation when

implementing the pattern. The “–“ sign is given to patterns that are not

supported. A pattern is considered to be not supported if any form of

programming or scripting is required or the solution results in a spa-

ghetti diagram. [30]

3.4 Product comparison

The Activiti open-source BPM platform was compared to the other BPM

platforms by looking at the support for the different control-flow pat-

terns. The patterns support for the different platforms is discussed for

each control-flow patterns class. The pattern support for jBPM, Open-

WFE, and Enhydra Shark comes from this study [10] and the result is

also available at the workflow patterns initiative website [30].

3.5 Building the extended version of Activiti Explorer

The extended platform was created by extending the Activiti Explorer to

support several companies per installation and the customization of

user input forms. Since Activiti is an open-source project, the source

code for Activiti Explorer was downloaded with Apache Subversion

and modifications were made directly in the code. The development tool

used was Eclipse with the Maven plugin installed. The code was firstly

examined in order to discover a means of implementing the different

features. Once a sound strategy had been determined that did not in-

volve many changes, the implementation commenced. Following this, a

great deal of testing was conducted to ensure that the implementation

worked as intended. During the course of the project some bugs and

smaller imperfections were discovered and changed to a more desirable

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

3 Methodology

2012-06-29

20

solution. At the conclusion of the project, version 5.9 of Activiti was

released. All the changes had been made to version 5.8 and these were

re-examined and brought over to version 5.9 one at a time and all the

changes documented (see Appendix C and D for details).

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

4 Implementation

2012-06-29

21

Implementation 4The first part of this chapter shows the implementation of all control-

flow patterns with a description and a diagram for the supported pat-

terns. In the second part the implementation of the extended version of

Activiti Explorer is explained.

4.1 Control-flow patterns

All patterns are modelled using the Activiti Designer which is an eclipse

plugin. A brief description is provided for all the patterns and a graph-

ical diagram is additionally shown for the supported patterns. The

graphical diagrams are saved as a png file in Activiti Designer and they

depict the graphical representation of the process being modelled. When

modelling the patterns, all tasks are represented by a user task that is

assigned to the initiator. This simplifies the testing easier as the same

user both initiates the process and receives all the user tasks. For each of

the supported patterns there is also a detailed XML in Appendix E.

Pattern 1 – Sequence 4.1.1

The pattern is directly supported by using a “Sequence Flow” construct

between activities. For its graphical representation see figure 6.

Figure 6: Pattern 1 - Sequence

Pattern 2 – Parallel split 4.1.2

The pattern is directly supported by using a “Parallel Gateway” con-

struct. For its graphical representation see figure 7.

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

4 Implementation

2012-06-29

22

Figure 7: Pattern 2 - Parallel split

Pattern 3 – Synchronization 4.1.3

The pattern is directly supported by using a “Parallel Gateway” con-

struct. For its graphical representation see figure 8.

Figure 8: Pattern 3 - Syncronization

Pattern 4 - Exclusive Choice 4.1.4

The pattern is directly supported by using an “Exclusive Gateway”

construct. For its graphical representation see figure 9.

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

4 Implementation

2012-06-29

23

Figure 9: Pattern 4 - Exclusive choice

Pattern 5 - Simple Merge 4.1.5

The pattern is directly supported by using an “Exclusive Gateway”

construct. For its graphical representation see figure 10.

Figure 10: Pattern 5 - Simple merge

Pattern 6 - Multi-Choice 4.1.6

The pattern is directly supported by using an “Inclusive Gateway”

construct with conditions on the outgoing “Sequence Flows”. For its

graphical representation see figure 11.

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

4 Implementation

2012-06-29

24

Figure 11: Pattern 6 - Multi-choice

Pattern 7 - Structured Synchronizing Merge 4.1.7

The pattern is directly supported by using an “Inclusive Gateway”

construct. For its graphical representation see figure 12.

Figure 12: Pattern 7 - Structured synchronizing merge

Pattern 8 - Multi-Merge 4.1.8

The pattern is directly supported by using an “Exclusive Gateway”

construct. For its graphical representation see figure 13.

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

4 Implementation

2012-06-29

25

Figure 13: Pattern 8 - Multi-merge

Pattern 9 - Structured Discriminator 4.1.9

The pattern is not supported. Support for this pattern is referred to in

the BPMN specification but Activiti Designer does not support the

complex gateway construct.

Pattern 10 – Arbitrary Cycles 4.1.10

The pattern is directly supported by using the “Exclusive Gateway”

construct with “Sequence Flows” to construct the loops. For its graph-

ical representation see figure 14.

Figure 14: Pattern 10 - Arbitrary cycles

Pattern 11 - Implicit Termination 4.1.11

The pattern is directly supported by the BPMN process language and

when all paths have reached an end event the process is terminated. For

its graphical representation see figure 15.

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

4 Implementation

2012-06-29

26

Figure 15: Pattern 11 - Implicit Termination

Pattern 12 - Multiple Instances without Synchronization 4.1.12

The pattern is partially supported. By default, the multi instance task

will synchronize and the subsequent flow will only be called once all

instances are completed. In order to circumvent this a “Parallel Gate-

way” is used to split the thread of control before calling the multi-

instance. To specify the number of instances to be started, the Loop

cardinality is set to the variable containing the number of instances. For

its graphical representation see figure 16.

Figure 16: Pattern 12 - Multiple instances without synchronization

Pattern 13 - Multiple Instances with a priori Design-Time 4.1.13Knowledge

The pattern is directly supported. The Loop cardinality for the multi-

instance is set at the design time to the number of activity instances in

this case 3. For its graphical representation see figure 17.

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

4 Implementation

2012-06-29

27

Figure 17: Pattern 13 - Multiple instances with a priori design-time knowledge

Pattern 14 - Multiple Instances with a priori Run-Time Knowledge 4.1.14

The pattern is directly supported. The Loop cardinality for the multi-

instance is set at the design time to a process variable. For its graphical

representation see figure 18.

Figure 18: Pattern 14 - Multiple instances with a priori run-time knowledge

Pattern 15 - Multiple instances without a priori run-time knowledge 4.1.15

The pattern is not supported. The number of instances cannot be

changed after the multi-instance task has started.

Pattern 16 - Deferred Choice 4.1.16

The pattern is partially supported. It can be modelled using a sub pro-

cess with error events to cancel the remaining listeners after a choice has

been made. Experimental support exists for the event based gateway

construct and signals which should offer full support for this pattern

(Support for this patterns is therefore expected in future releases). For its

graphical representation see figure 19.

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

4 Implementation

2012-06-29

28

Figure 19: Pattern 16 - Deferred choice

Pattern 17 - Interleaved Parallel Routing 4.1.17

The pattern is not supported. There is no construct that offers serial

execution of parallel activities.

Pattern 18 – Milestone 4.1.18

The pattern is not supported. Activiti has no support for states.

Pattern 19 - Cancel Activity 4.1.19

The pattern is directly supported by using an error boundary event

attached to the activity being cancelled and issue an error message to

cancel the activity. For its graphical representation see figure 20.

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

4 Implementation

2012-06-29

29

Figure 20: Pattern 19 - Cancel activity

Pattern 20 - Cancel Case 4.1.20

The pattern is directly supported, by encapsulating the process in a sub-

process and using error events. For its graphical representation see

figure 21.

Figure 21: Pattern 20 - Cancel case

Pattern 21 - Structured Loop 4.1.21

The pattern is directly supported. Both post- and pre-test loops can be

constructed using exclusive gateways and a process variable. For the

post-test loop see figure 22 and for the pre-test see figure 23.

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

4 Implementation

2012-06-29

30

Figure 22: Pattern 21 - Structured loop (post-test)

Figure 23: Pattern 21 - Structured loop (pre-test)

Pattern 22 - Recursion 4.1.22

The pattern is not supported. There is no means of specifying recursion

in the Activiti Designer.

Pattern 23 - Transient Trigger 4.1.23

The pattern is not supported.There is no means of specifying triggers in

Activiti Designer.

Pattern 24 - Persistent Trigger 4.1.24

The pattern is not supported. There is no means of specifying triggers in

Activiti Designer.

Pattern 25 - Cancel Region 4.1.25

The pattern is partially supported, by encapsulating the region in a sub-

process and using error events to cancel the region. For its graphical

representation see figure 24.

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

4 Implementation

2012-06-29

31

Figure 24: Pattern 25 - Cancel Region

Pattern 26 - Cancel Multiple Instance Activity 4.1.26

The pattern is directly supported by using an error boundary event to

cancel all remaining instances. For its graphical representation see figure

25.

Figure 25: Pattern 26 - Cancel Multiple Instance Activity

Pattern 27 - Complete Multiple Instance Activity 4.1.27

The pattern is directly supported, by using a boundary event or setting

the completion condition of the multi-instance. For the graphical repre-

sentation when using a boundary event see figure 26 and figure 27 for

an example using the completion condition.

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

4 Implementation

2012-06-29

32

Figure 26: Pattern 27 - Complete Multiple Instance Activity (Boundary event)

Figure 27: Pattern 27 - Complete Multiple Instance Activity (completion condition)

Pattern 28 - Blocking Discriminator 4.1.28

The pattern is not supported. Activiti Designer does not support the

complex gateway construct.

Pattern 29 - Cancelling Discriminator 4.1.29

The pattern is directly supported, using a sub-process and an error

event to cancel the remaining activities. For its graphical representation

see figure 28.

Figure 28: Pattern 29 - Cancelling Discriminator

Pattern 30 - Structured Partial Join 4.1.30

The pattern is not supported. Activiti Designer does not support the

complex gateway construct.

Pattern 31 - Blocking Partial Join 4.1.31

The pattern is not supported. Activiti Designer does not support the

complex gateway construct.

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

4 Implementation

2012-06-29

33

Pattern 32 - Cancelling Partial Join 4.1.32

The pattern is not supported. Activiti Designer does not support the

complex gateway construct.

Pattern 33 - Generalized AND-Join 4.1.33

The pattern is not supported. The parallel gateway executes the subse-

quent activity when it has received the same number of input signals as

the number of input branches, even if all signals come from the same

branches.

Pattern 34 - Static Partial Join for Multiple Instances 4.1.34

The pattern is not supported. There is no means of triggering the subse-

quent task without cancelling the other instances. Signals, which at

present are labelled experimental, might be used to accomplish this.

Pattern 35 - Cancelling Partial Join for Multiple Instances 4.1.35

The pattern is supported, and can be modelled by using an error bound-

ary event or by setting the completion condition to M=N. For its graph-

ical representation see figure 29.

Figure 29: Pattern 35 - Cancelling partial join for multiple instances

Pattern 36 - Dynamic Partial Join for Multiple Instances 4.1.36

The pattern is not supported. The number of instances cannot be

changed after the multi-instance task has started.

Pattern 37 - Acyclic Synchronizing Merge 4.1.37

The pattern is not supported. The “Inclusive Gateway” has to be used in

a structured context.

Pattern 38 - General Synchronizing Merge 4.1.38

The pattern is not supported. The “Inclusive Gateway” has to be used in

a structured context.

Pattern 39 - Critical Section 4.1.39

The pattern is not supported. Activiti Desiger offers no support for

limiting concurrent execution of activities.

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

4 Implementation

2012-06-29

34

Pattern 40 - Interleaved Routing 4.1.40

The pattern is not supported. Ad-hoc processes are not supported in

Activiti Designer.

Pattern 41 - Thread Merge 4.1.41

The pattern is not supported. startQuantity attribute of activities is not

supported in Activiti Designer.

Pattern 42 - Thread Split 4.1.42

The pattern is not supported. completionQuantity attribute of activities

is not supported in Activiti Designer.

Pattern 43 - Explicit Termination 4.1.43

The pattern is not supported. The Terminate End Event construct is

missing in Activiti Designer.

4.2 Support for multiple companies

To support multiple companies without changing the code for the

engine, the ProcessEngines class was used to register one engine per

company. For a complete list of changes required to implement the

multi-company support see Appendix C.

Company Database and Admin web application 4.2.1

When Activiti Explorer is initialized it loads a configuration file via

Spring to start the engine. Since one engine will be used per company, it

is necessary to start several engines and to add engines without restart-

ing the application. Because of this, the configuration file was changed

to contain the configuration for a JDBC connection to a MySQL database

that stores the configuration parameters for the engines. See figure 30

for the database table. When the application starts it loads the JDBC

connection via Spring and investigates all the records and sets up one

engine per company and starts it.

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

4 Implementation

2012-06-29

35

Company

PK CompanyName

DriverClassName URL UserName Password MailServerHost MailServerUserName MailServerPassword MailServerPort MailServerDefaultFrom MailServerUseTLS

Figure 30: Company database table

To handle the administration of companies, a Vaadin web application

was created that can be accessed by adding “/admin” to the URL. The

Admin web application can be used to start and stop the engines for

companies that are already in the database. The login information for

the admin web application is stored in the Admin database table (see

figure 31) and the password is stored using a SHA-1 cryptographic hash

function.

Admin

PK UserName

Password

Figure 31: Admin database table

CloudProcessEngines 4.2.2

The CloudProcessEngines class was created to ease the handling of

multiple companies. The class communicates directly with the engines,

and all communications between a logged in user in Activiti Explorer

and the engine pass through this object. All classes that have previously

communicated with the engine were changed to communicate via the

CloudProcessEngines with the exception of the classes handling the

login of the user (see next section). When the process engines are regis-

tered they are associated with a name, which in this case is the same as

the company name. When getProcessEngine() method is called on the

CloudProcessEngines object, it firstly reads the company name associat-

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

4 Implementation

2012-06-29

36

ed with the logged in user and then calls the ProcessEngines class in

order to retrieve the engine registered with that company name and

then returns it. The Admin web application also communicates with this

class.

Login 4.2.3

A new implementation of the logged in user interface was created with

the addition of a field containing the company name. This class is at-

tached to the application object and is therefore globally available. The

login screen was also extended to include an input field for the company

name. When the user attempts to log in, an engine is loaded associated

with the given company and, if it exists, the user’s credentials (name

and password) are sent to the engine for verification. If no engine is

associated with the company name, then the login fails. After the login

has succeeded and providing that the credentials were correct, the user

object (with company name) is attached to the application object and the

user is logged in.

User Cache 4.2.4

The user cache is used to cache users for the purpose of speeding up

user lookup operations. Only one user cache does not work with multi-

ple companies since they have different users, and because of this and

the time constraints on this project, the user cache implemented simply

retrieves users from the database instead of actually caching them.

Activiti Company Deployment Manager 4.2.5

This application makes it easier to create and modify company infor-

mation that is used when deploying a new company. It is a Java applica-

tion with a graphical user interface (GUI) that is using the Swing

framework. The file format, when saving and loading the company

deployment file, is a zip file with the structure shown in figure 32. The

theme/img directory contains all the images for the theme, the us-

ers/pictures directory contains all the pictures of the users and the

processes directory contains all processes to be deployed.

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

4 Implementation

2012-06-29

37

/

theme

users

processes

styles.xml

img

users.xml

pictures

Figure 32: File structure of the company deployment zip file

To create a theme, one color is picked and the logos are loaded from a

file or generated based on the first logo. After the color and logos have

been selected the application will generate images for buttons and the

menubar together with a css file to be used as a Vaadin theme. The

algorithm used for the real-time preview of the menubar uses the hard-

ware accelerated graphics and lower settings to make it faster on older

machines. The algorithm used when generating the actual images uses

the Java 2d graphics API with the best quality settings together with

antialiasing. The theme can be exported as a Vaadin theme or saved in a

zip file, making it usable for both the modified version in addition to the

original version of Activiti Explorer.

Users can be easily added, deleted and edited directly in the application.

The users are saved in an XML file, with pictures in a separate directory,

for an example, see below. In the edit user dialog, groups can be added

or removed. The dropdown menu of available users is loaded from the

groups.xml file, which is located in the application directory. This file

can be edited in a text editor to add more groups, see below for the xml

structure.

The processes are merely a list of loaded process files that will be saved

in the zip file.

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

4 Implementation

2012-06-29

38

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

<users>

<user>

<userid>kermit</userid>

<firstname>Kermit</firstname>

<lastname>The Frog</lastname>

<password>kermit</password>

<email>[email protected]</email>

<picture>kermit.jpg</picture>

<groups>

<group id="admin" type="security-role">Admin</group>

<group id="management" type="assignment">Management</group>

<group id="sales" type="assignment">Sales</group>

<group id="marketing" type="assignment">Marketing</group>

<group id="engineering" type="assignment">Engineering</group>

</groups>

</user>

</users>

User xml file format

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

<groups>

<group id="admin" type="security-role">Admin</group>

<group id="management" type="assignment">Management</group>

<group id="sales" type="assignment">Sales</group>

<group id="marketing" type="assignment">Marketing</group>

<group id="engineering" type="assignment">Engineering</group>

</groups>

Groups xml file format

Deployment helper tools 4.2.6

To make it easier to set up the initial database and to write the configu-

ration file used by Activiti Explorer when it is started, a command line

Java application was created. The application takes the path to the

Activiti Explorer, database info and credentials (to create the schemas

and tables). It creates the activiti_cloud schema and a MySQL user with

the same name and sets the privileges for this user to only use Select

operations on the activiti_cloud schema. The password for the user is

auto generated with a simple random algorithm. Finally, the configura-

tion file with the credentials is created in the Activiti Explorer directory

path.

To make it easier to set up a new company a command line Java applica-

tion was created. The application takes a zip file containing the theme to

be used together with all users and processes (see Activiti Company

Deployment Manager). It also takes the path to the theme directory and

the database credentials. It firstly copies the theme to the Activiti Ex-

plorer theme directory and then launches an offline process engine.

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

4 Implementation

2012-06-29

39

Then a schema and a user are created (they both have the company

name). Following this, the process engine sets up the database and

builds all the tables. All users are then added to the database via the

engine and finally the processes are deployed. When everything is

completed the process engine is shut down and the configuration and

the database credentials are written to the Company table (for uml

diagram see figure 30).

4.3 Support for a business payment model

The invoice can be reached from the admin web application (for an

image see result chapter). For each company there is a date field and a

button. By choosing a month and pressing the invoice data button an

invoice for the selected month is downloaded for that company. The

invoice is created by accessing the process engine for the selected com-

pany and accessing its HistoryService. In order for this to work, the

engine must be started and running. The invoice created is in a XML

format for easy integration with the desired billing software, since it is a

well-known standard in data serialization.

4.4 Support for custom layout in task forms

By default, all form components are as shown in figure 33. There is no

means of changing this layout, thus, in order to provide the process

developer with the ability to change it, Activiti Explorer was extended.

In order to support different types of layouts, an XML specification (for

the tags see below) for describing the layout was developed. When

developing processes, each user task has an associated formkey proper-

ty, the name of this property should be the same as the filename of the

desired layout file for that form. If this field is left empty the default

layout is choosen, which is one field per row. When deploying processes

which are using custom layouts, the process definition file, together

with all layout files, must be zipped and deployed as a zip file, this is

because no changes are required in the code responsible for the de-

ployment.

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

4 Implementation

2012-06-29

40

Figure 33: Standard form layout in Activiti Explorer.

XML specification 4.4.1

The following shows, all the tags available in the XML specification

created for the purpose of offering the process developer the ability to

customize form layouts: Form, block, row, column, field, divider, a, img,

br, space.

form

The form is the outer most tag and it contains the entire layout.

field

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

4 Implementation

2012-06-29

41

The field is the graphical component that is displayed together

with its label. The field takes an id attribute, which should be the

same as the id of the field in the corresponding task form in the

process definition. The description attribute is a text attribute that

is used as a tool tip text, which is displayed when the user is

hovering over the input field with the mouse pointer. If the id of

a field is not found in the process definition file then the field is

not displayed. The field tag cannot contain any other tags.

block

The block layout can contain any of the following tags: row, col-

umn, field, divider, a, img and br. It has a type attribute which

can be one of the following two values “divider” and “panel”.

The divider has a line on top and the panel has four borders that

can be styled by specifing a style name in the style attribute (the

name should corespond to a style in the Vaadin theme). The

caption of the block is the title that is written at the top of the

block. A block is only displayed if at least one of its interior fields

is also displayed.

row

The row tag displays all its conponents on a single line. It can

contain the following tags: field, a, img and space. The expand at-

tribute can be either true or false, with the true meaning being

that all the components are distributed with equal width over the

entire row and the false meaning being that the components are

laid out one after the other with their default width.

column

The column tag lays out the components one per row with the

difference is that the label is on the left side of the component

instead of being on top, which is the default. The column can

contain the folowing tags: field, divider, a, img and br.

divider

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

4 Implementation

2012-06-29

42

The divider tag draws a line on the screen and the content of the

element. It cannot contain any other tags.

a

The a tag represents a url link. It can contain an img tag. Its

attributes are href, used to refer to a static link and var, to a

process variable that contains the link. If an image is not used the

element is displayed.

img

The img tag represents an image that is displayed. The image can

be part of a link but cannot contain any tags. The src attribute is

the URL in which the image can be reached. The alt attribute is

the text that is displayed when the image cannot be located. The

height and width attributes are used to change the default size of

the image. All of these attributes are written directly to the HTML

page that is viewed by the user.

br

The br tag is used to write a linebrake by writing the br tag to the

generated HTML page. The br tag cannot contain any tags,

attribues or elements.

space

The space tag is used to insert a space between components in the

row tag when its expand attribute is set to false. It cannot contain

any tags, attributes or elements

Validating custom forms 4.4.2

When developing custom forms a dtd file can be used to validate its

syntax. The dtd can be found in Appendix C.

Extending Activiti to support the custom form layouts 4.4.3

The following classes were changed to add support for custom form

layouts: FormPropertiesComponent, FormPropertiesForm, ProcessDefi-

nitionDetailPanel and TaskDetailPanel. Their functions are to take data

from the process engine and render the form and to send the data from

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

4 Implementation

2012-06-29

43

the components to the process engine. For a more detailed description

regarding the changes see Appendix C. The FormTemplateParser class

was created and it is instantiated with the process instance id and the

formkey. It loads the custom form layout xml by looking for the file

with the same name as the formkey in the deployment of the process

instance, by accessing the RepositoryService of the process engine. Once

the xml is loaded it is parsed. The getFormLayout method is then called

and it takes a map with all components (Vaadin Field objects) and

properties, and returns a VerticalLayout with all components ready to

be displayed. When the user is finished, the map with all the compo-

nents is used to go through them for validation and if an error occurs

then this is displayed and the user is unable to proceed before it is fixed.

After the validation has finished successfully the component values are

sent to the engine.

Helper tools 4.4.4

To speed up the development of the custom form files, a command-line

application written in Java was created. This application takes the path

to the process definition file as the command-line input and writes one

custom layout file per start event / user task that has a value written in

the formkey property. This auto generated custom form file will have

the same filename as the value in the formkey and contain all fields. The

default files is an acceptable starting point when developing the custom

form layouts as the developer only has to add rows, columns, blocks

and so on.

4.5 Improvements and bug fixes

Here are some of the improvements and bug fixes made to Activiti

Explorer. A more detailed description is available in Appendix D.

High resolution screen support 4.5.1

The reason why the Activiti Explorer web application is not able to

achieve a webpage beyond the width of 1920 pixels (see figure 34) is that

it is specified in the css file. By removing this line the webpage will fill

up all the space on the higher resolution screens. For a detailed descrip-

tion regarding how this can be performed see Appendix D.

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

4 Implementation

2012-06-29

44

Figure 34: The Activiti web page not extending beyond 1920 pixels.

Boolean bug fix 4.5.2

The reason why the Boolean datatype does not work (see figure 35)

when it is referenced to display the value of a process variable is be-

cause of a data conversion error. The checkbox component in Vaadin is

using the interface Property, which has a member function setValue that

takes a value of type Object (the object which all objects inherit from). In

the particular case of the checkbox it takes the type Object to conform to

the standard interfaces used by all components in Vaadin but it expects

that it can be cast to a Boolean. The Activiti process engine stores pro-

cess variables as strings, which cannot be cast to a Boolean and in order

to to fix this a conversion from string to Boolean is necessary.

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

4 Implementation

2012-06-29

45

Figure 35: Error message when trying to display a form using a Boolean field that is

showing the value of a process variable.

Date field 4.5.3

The standard date field is, by default, shown with controls with a reso-

lution of milliseconds, even if the date format written in the process

definition file is at a lower resolution. In figure 36 a date field with

millisecond resolution and input field with a minute resolution is

shown.

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

4 Implementation

2012-06-29

46

Figure 36: Date field for selecting date and time with higher resolution than

required.

Enum fields 4.5.4

The enum fields have, by default, an empty option “null” even when it

is a required field, making this choice invalid (see figure 37). That is why

the null was removed when the field is required, even after it has been

removed the field is empty before a choice is made.

Figure 37: Enum dialog for a required field

Textarea component 4.5.5

To add a custom component such as the textarea component (figure 38)

it is necessary to create two classes. The first class implements Abstract-

FormType and it is used to register the type with the engine. The second

class implements AbstractFormPropertyRenderer and it is used to

convert between the Field and FormProperty. Both of these files are

loaded with Spring when Activiti Explorer starts, thus it is possible to

extend without the necessity of changing the source code. For a descrip-

tion of changes and source code for the implemented classes see Ap-

pendix D.

Figure 38: Textarea component

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

5 Results

2012-06-29

47

Results 5This chapter is divided in two parts, the result from the control-flow

pattern evaluations and then a presentation of the extended version of

Activiti Explorer.

5.1 Control-flow patterns evaluation

The result from the control-flow patterns implementation can be seen in

table 1 together with the result from this paper [10].

Table 1: Control-flow pattern eveluation

Pattern Act

ivit

i

JBP

M

Op

en

WFE

Enh

ydra

Sh

ark

Basic Control Flow Patterns

Pattern 1 (Sequence) + + + +

Pattern 2 (Parallel Split) + + + +

Pattern 3 (Synchronization) + + + +

Pattern 4 (Exclusive Choice) + + + +

Pattern 5 (Simple Merge) + + + +

Advanced Branching and Synchronization Patterns

Pattern 6 (Multi-Choice) + - +/- +

Pattern 7 (Structured Synchronizing Merge) + - - -

Pattern 8 (Multi-Merge) + + - -

Pattern 9 (Structured Discriminator) - - + -

Pattern 28 (Blocking Discriminator) - - - -

Pattern 29 (Cancelling Discriminator) + - + -

Pattern 30 (Structured Partial Join) - - + -

Pattern 31 (Blocking Partial Join) - - - -

Pattern 32 (Cancelling Partial Join) - - - -

Pattern 33 (Generalized AND-Join) - + - -

Pattern 37 (Local Synchronizing Merge) - - +/- -

Pattern 38 (General Synchronizing Merge) - - - -

Pattern 41 (Thread Merge) - +/- - -

Pattern 42 (Thread Split) - +/- - -

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

5 Results

2012-06-29

48

Pattern Act

ivit

i

JBP

M

Op

enW

FE

Enh

ydra

Sh

ark

Multiple Instance Patterns

Pattern 12 (Multiple Instances without Synchronization) +/- + + +

Pattern 13 (Multiple Instances with a priori Design-Time Knowledge) + - + -

Pattern 14 (Multiple Instances with a priori Run-Time Knowledge) + - + -

Pattern 15 (Multiple Instances without a priori Run-Time Knowledge) - - - -

Pattern 34 (Static Partial Join for Multiple Instances) - - + -

Pattern 35 (Cancelling Partial Join for Multiple Instances) + - + -

Pattern 36 (Dynamic Partial Join for Multiple Instances) - - - -

State-based Patterns

Pattern 16 (Deferred Choice) +/- + - -

Pattern 17 (Interleaved Parallel Routing) - - +/- -

Pattern 18 (Milestone) - - - -

Pattern 39 (Critical Section) - - - -

Pattern 40 (Interleaved Routing) - - + -

Cancellation and Force Completion Patterns

Pattern 19 (Cancel Task) + + - -

Pattern 20 (Cancel Case) + - +/- -

Pattern 25 (Cancel Region) +/- - - -

Pattern 26 (Cancel Multiple Instance Task) + - - -

Pattern 27 (Complete Multiple Instance Task) + - - -

Iteration Patterns

Pattern 10 (Arbitrary Cycles) + + + +

Pattern 21 (Structured Loop) + - + -

Pattern 22 (Recursion) - - + +

Termination Patterns

Pattern 11 (Implicit Termination) + + + +

Pattern 43 (Explicit Termination) - - - -

Trigger Patterns

Pattern 23 (Transient Trigger) - + + -

Pattern 24 (Persistent Trigger) - - - -

In table 2, 3 and 4 are the number of directly, partially and not support-

ed patterns per class for each platform. In table 5 the sum of all support-

ed, partially supported and not supported patterns for each platform are

shown.

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

5 Results

2012-06-29

49

Table 2: Number of directly supported patterns per class.

Directly supported pattern classes Act

ivit

i

JBP

M

Op

enW

FE

Enh

ydra

Sh

ark

Basic Control Flow Patterns (5) 5 5 5 5

Advanced Branching and Synchronization Patterns (14) 4 2 3 1

Multiple Instance Patterns (7) 3 1 5 1

State-based Patterns (5) 0 1 1 0

Cancellation and Force Completion Patterns (5) 4 1 0 0

Iteration Patterns (3) 2 1 3 2

Termination Patterns (2) 1 1 1 1

Trigger Patterns (2) 0 1 1 0

Table 3: Number of partially supported patterns per class.

Partially supported pattern classes Act

ivit

i

JBP

M

Op

en

WFE

Enh

ydra

Sh

ark

Basic Control Flow Patterns (5) 0 0 0 0

Advanced Branching and Synchronization Patterns (14) 0 2 2 0

Multiple Instance Patterns (7) 1 0 0 0

State-based Patterns (5) 1 0 1 0

Cancellation and Force Completion Patterns (5) 1 0 1 0

Iteration Patterns (3) 0 0 0 0

Termination Patterns (2) 0 0 0 0

Trigger Patterns (2) 0 0 0 0

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

5 Results

2012-06-29

50

Table 4: Number of not supported patterns per class.

Not supported pattern classes Act

ivit

i

JBP

M

Op

enW

FE

Enh

ydra

Sh

ark

Basic Control Flow Patterns (5) 0 0 0 0

Advanced Branching and Synchronization Patterns (14) 10 10 9 13

Multiple Instance Patterns (7) 3 6 2 6

State-based Patterns (5) 4 4 3 5

Cancellation and Force Completion Patterns (5) 0 4 4 5

Iteration Patterns (3) 1 2 0 1

Termination Patterns (2) 1 1 1 1

Trigger Patterns (2) 2 1 1 2

Table 5: All control-flow patterns.

All control-flow patterns Act

ivit

i

JBP

M

Op

en

WFE

Enh

ydra

Sh

ark

Directly supported 19 13 19 10

Partially supported 3 2 4 0

Not supported 21 28 20 33

5.2 Support for multiple companies

The extended login screen can be seen in figure 39 and the admin web

application in figure 40 and 41.

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

5 Results

2012-06-29

51

Figure 39: Activiti Explorer login screen with the extended support for multiple

companies.

Admin web application and payment model 5.2.1

The admin web application requires a different set of login credentials

(which are stored in the admin database table). After a successful login

the user has the ability to start and stop company engines for all compa-

nies that have their configuration stored in the company database table.

If the process engine of a company is stopped, then no proceses will run

and users belonging to that company cannot log in. Another feature is

the ability to download an invoice for a given company and month,

below is en example of such an invoice.

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

<invoice customerId="cybercom" period="201205">

<current_no_uses>4</current_no_uses>

<usage>

<process id="employeeDevelopment:2:318" started="1" usertasks_started="9" />

<process id="employeeDevelopment:1:8" started="1" usertasks_started="5" />

<process id="WorkRelatedInjury:1:16" started="1" usertasks_started="3" />

<process id="newOrder:1:105" started="1" usertasks_started="2" />

</usage>

</invoice>

The process id tag in the invoice is composed of <process definition

key>:<process definition version>:<generated id>. The generated id is a

unique number to guarantee uniqueness in a cluster environment.

Started is the number of times that the process has started and us-

ertasks_started is the total number of user tasks started by the process

(this number may vary for each run since there can be more than one

path in a process).

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

5 Results

2012-06-29

52

Figure 40: Admin web application login

Figure 41: Admin web application with one company

Activiti Company Deployment Manager 5.2.2

The company deployment manager is used to create the company

deployment file. This file contains the theme, users and processes for the

company. In figure 42 is the application with the default theme used by

Activiti.

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

5 Results

2012-06-29

53

Figure 42: Company deployment manager with default theme

In figure 43 the company deployment manager with a custom theme is

displayed. The buttons next to the logos are open file, reload original

logo and the button with the gears is to auto generate a logo based on

the top most logo which has been used in figure 43. Figure 46 shows this

theme in use.

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

5 Results

2012-06-29

54

Figure 43: Manager with custom theme

The company deployment manager is shown in figure 44 with the user’s

tab selected and the user Kermit open for editing. In the user tab, users

can be added, removed and edited from the user menu or by right

clicking on a user in the table view. It is also possible to export and

import users from an xml file.

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

5 Results

2012-06-29

55

Figure 44: Editing a user in the company manager application

The company deployment manager is shown in figure 45 with the

processes tab selected. Here, the user is able to add and remove process-

es.

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

5 Results

2012-06-29

56

Figure 45: Processes tab in the company manager application

Set up a new server with the extended version of Activiti Explorer. 5.2.3

1. Install Java, Tomcat and MySQL if they are not installed.

2. Deploy the war file in tomcat (wite down the path to the directory).

3. Run setup command-line Java application with the directory (from 2)

and credentials to the database as parameters. To run this step requires

credentials that can write on the path and create a schema and user in

the database. Enter a username and password for the admin web appli-

cation.

4. Restart the webapplication (required to obtain the database creden-

tials).

5. Make a company deployment file (using the Activiti company de-

ployment manager or manualy).

6. Run the company deployment command-line Java program with

database credentials and the path to the deployment file. This step

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

5 Results

2012-06-29

57

requires credentials that allow a write access to the company table and

the creation of a new schema and user.

7. Log in to the admin web application and start company process

engine.

To add more companies repeat steps 5, 6 and 7.

5.3 Support for custom layout in task forms

The custom form layout works by deploying the process definition

together with layout xml files for each user input form that has a name

written in its formkey attribute. Below is an example of a task form

declaration from a process definition file followed by a form layout that

was auto generated using the helper tool and the final version which

uses many of the tags for demonstration purposes.

<userTask id="enterOrder" name="Enter Order (${uuId})" activi-

ti:assignee="${initiator}" activiti:formKey="custom_form_layout.xml">

<extensionElements>

<activiti:formProperty id="user" name="user" type="user" required="false"

readable="true" writable="true"></activiti:formProperty>

<activiti:formProperty id="companyname" name="Company Name" type="string"

required="true" readable="true" writable="true"></activiti:formProperty>

<activiti:formProperty id="companyaddress" name="Company Address" type="string"

required="true" readable="true" writable="true"></activiti:formProperty>

<activiti:formProperty id="description" name="Description" type="textarea"

required="true" readable="true" writable="true"></activiti:formProperty>

<activiti:formProperty id="firstName" name="First Name" type="string" re-

quired="true" readable="true" writable="true"></activiti:formProperty>

<activiti:formProperty id="middleName" name="Middle Name" type="string" re-

quired="false" readable="true" writable="true"></activiti:formProperty>

<activiti:formProperty id="lastName" name="Last Name" type="string" re-

quired="true" readable="true" writable="true"></activiti:formProperty>

<activiti:formProperty id="address" name="Address" type="string" required="true"

readable="true" writable="true"></activiti:formProperty>

<activiti:formProperty id="zipCode" name="Zip Code" type="string" re-

quired="true" readable="true" writable="true"></activiti:formProperty>

<activiti:formProperty id="city" name="City" type="string" required="true"

readable="true" writable="true"></activiti:formProperty>

<activiti:formProperty id="email" name="Email" type="string" required="true"

readable="true" writable="true"></activiti:formProperty>

<activiti:formProperty id="phone" name="Phone" type="string" required="true"

readable="true" writable="true"></activiti:formProperty>

<activiti:formProperty id="articleId" name="Article Id" type="string" re-

quired="true" readable="true" writable="true"></activiti:formProperty>

<activiti:formProperty id="nbrOfArticles" name="Number of Articles" type="long"

required="true" readable="true" writable="true"></activiti:formProperty>

<activiti:formProperty id="delivery" name="Delivered by" type="enum" re-

quired="true" readable="true" writable="true">

<activiti:value id="fedex" name="Fedex"></activiti:value>

<activiti:value id="dhl" name="DHL"></activiti:value>

<activiti:value id="ups" name="UPS"></activiti:value>

</activiti:formProperty>

<activiti:formProperty id="deliverydate" name="Delivery date" type="date"

datePattern="yyyy-MM-dd" required="true" readable="true" writa-

ble="true"></activiti:formProperty>

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

5 Results

2012-06-29

58

<activiti:formProperty id="fast" name="Fast delivery" type="boolean" re-

quired="true" readable="true" writable="true"></activiti:formProperty>

<activiti:formProperty id="emailto" name="To" type="string" required="true"

readable="true" writable="true"></activiti:formProperty>

<activiti:formProperty id="subject" name="Subject" type="string" required="true"

readable="true" writable="true"></activiti:formProperty>

<activiti:formProperty id="message" name="Description" type="textarea" re-

quired="true" readable="true" writable="true"></activiti:formProperty>

</extensionElements>

</userTask>

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

<!DOCTYPE form SYSTEM "activiti_custom_forms.dtd">

<form>

<field id="user" description="" />

<field id="companyname" description="" />

<field id="companyaddress" description="" />

<field id="description" description="" />

<field id="firstName" description="" />

<field id="middleName" description="" />

<field id="lastName" description="" />

<field id="address" description="" />

<field id="zipCode" description="" />

<field id="city" description="" />

<field id="email" description="" />

<field id="phone" description="" />

<field id="articleId" description="" />

<field id="nbrOfArticles" description="" />

<field id="delivery" description="" />

<field id="deliverydate" description="" />

<field id="fast" description="" />

<field id="emailto" description="" />

<field id="subject" description="" />

<field id="message" description="" />

</form>

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

<!DOCTYPE form SYSTEM "activiti_custom_forms.dtd">

<form>

<block type="panel" caption="Company">

<column>

<field id="user" description="User" />

<field id="companyname" description="Companyname" />

<field id="companyaddress" description="Company Address" />

<divider />

<field id="description" description="Description" />

</column>

</block>

<br />

<block type="divider" caption="Personal">

<row>

<field id="firstName" description="Enter your first name here" />

<field id="middleName" description="Enter your middle name here" />

<field id="lastName" description="Enter your last name here" />

</row>

<field id="address" description="Enter your address here" />

<row>

<field id="zipCode" description="Enter your zip code here" />

<field id="city" description="Enter your city here" />

</row>

<divider />

<field id="email" />

<field id="phone" />

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

5 Results

2012-06-29

59

<a href="http://cybercom.com" >Cybercom Group</a>

</block>

<br />

<divider>Article</divider>

<field id="articleId" description="Enter article id here" />

<field id="nbrOfArticles" description="Enter the number of articles here" />

<row>

<field id="delivery" />

<field id="deliverydate" />

</row>

<field id="fast" />

<br />

<divider>Email</divider>

<column>

<field id="emailto" />

<field id="subject" />

<divider />

<field id="message" />

</column>

<br />

<row expand="false">

<a href="http://cybercom.com" ><img

src="http://www.cybercom.com/Templates/Cybercom/Images/logo_blue.gif"

alt="Cybercom website"/></a>

<space/>

<img src="http://www.cybercom.com/Templates/Cybercom/Images/logo_blue.gif"

alt="Cybercom logo"/>

</row>

</form>

All the tabs have been removed from the XML above in order to in-

crease the readability in this document. In figures 46 and 47 screenshots

regarding the appearance of the custom form (from the XML above)

when it is displayed in the modified version of Activiti Explorer are

shown.

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

5 Results

2012-06-29

60

Figure 46: The first part of the custom form layout

This is almost the same user form as that in figure 33 (Implementation

chapter) with the exception of the two textarea fields, which are not

supported by default in Activiti Explorer. In figure 33, standard string

input fields are used instead of the two textarea fields. Another differ-

ence is that Related content, People and Subtasks have been moved to

after the user input form since they are considered less important than

the form.

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

5 Results

2012-06-29

61

Figure 47: The second part of the custom form layout

5.4 Improvements and bug fixes

The following provides information relating to some of the improve-

ments and bug fixes performed in the extended version of Activiti

Explorer.

Large screen support 5.4.1

The fix for large screen support can be seen in figure 48.

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

5 Results

2012-06-29

62

Figure 48: Large screen support

Boolean bug fix 5.4.2

A Boolean field working without error messages when assigned a

process variable can be seen in figure 49.

Figure 49: Working Boolean field

Date field 5.4.3

The date field displaying only the controls nesssesary to enter a date

and time in the requested resolution is shown in figure 50.

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

5 Results

2012-06-29

63

Figure 50: Improved date field

Enum fields 5.4.4

The enum field without the option to enter a null value when the field is

required is shown in figure 51.

Figure 51: Improved enum field

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

6 Conclusions

2012-06-29

64

Conclusions 6The first part of the conclusion concerns the control-flow pattern evalua-

tion and the second part deals with the software extensions made to

Activiti Explorer.

6.1 Control-flow evaluation

One of the goals of this study was to perform a pattern based analysis of

of Activiti using the control-flow patterns. The pattern based evaluation

offers an independent and objective means of assessing the support of

business process constructs that are commonly used in practice. When

starting to evaluate Activiti, it became apparent that it does not offer full

BPMN 2.0 support. There has been recently released experimental

support for more BPMN constructs but these are not yet supported in

Activiti Designer. Since Activiti is a relatively young product, the sup-

port for signals and the event based gateway will eventually become

stable and since they strive to be a BPMN 2.0 process engine, other

constructs such as the complex gateway will probably also become

available in future releases. Other open-source platforms that are start-

ing to support BPMN 2.0 are jBPM (version 5) and ProcessMaker (bpmn

2.0 preview release). As is the case for many open-source offerings,

Activiti is a work in progress and with each new release more function-

ality is added to the engine.

Basic Control Flow Patterns 6.1.1

All the basic control-flow patterns were supported, which was expected

since they are the basic building blocks when modelling business pro-

cesses. All open-source products offer full support for this class of

control-flow patterns.

Advanced Branching and Synchronization Patterns 6.1.2

Activiti offers very limited support in this class of control-flow patterns.

The BPMN offers better support in this class with its complex gateway

constructs and several attributes that are missing in Activiti. The parallel

gateway is not implemented in Activiti as suggested and thus it does

not support the generalized AND-join pattern. It became apparent after

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

6 Conclusions

2012-06-29

65

an investigation involving other open-source offerings that they also

offer limited support in this class.

Multiple Instance Patterns 6.1.3

Activiti offers a wide support in relation to the multiple instance pat-

terns. The main aspects which are missing are a means of adding in-

stances to a multi-instance while it is executing and in completing the

multi-instance without cancelling the remaining instances (using a

condition). jBPM and Enhydra Shark offer almost no support for the

multiple instance patterns while OpenWFE offers slightly better support

than Activiti.

State-based Patterns 6.1.4

All open-source products have either limited or no support for the state-

based patterns. This is mostly because they do not support the notion of

state or cannot act on it. When the event based gateway becomes availa-

ble in Activiti the support will increase slightly. Even though there is

only limited support for these patterns, some are able to be implement-

ed using programming.

Cancellation and Force Completion Patterns 6.1.5

The cancellation and force completion patterns are one of the ad-

vantages of Activiti over the other open-source products. While Activiti

is offering full support for almost all patterns, the other open-source

products offer almost no support.

Iteration Patterns 6.1.6

Activiti offers almost full support for the iteration patterns. The only

pattern not supported is the recursive pattern. OpenWFE is the only

platform that offers full support for these patterns.

Termination Patterns 6.1.7

The termination patterns are partially supported by all open-source

products. The implicit termination pattern is supported across the board

while the explicit termination is not supported by any products. In older

versions of Activiti, the explicit termination pattern was supported via a

terminate end event but this construct is no longer available in Activiti

Designer.

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

6 Conclusions

2012-06-29

66

Trigger Patterns 6.1.8

Activiti and Enhyrda Shark do not support any of the trigger patterns.

jBPM and OpenWFE only support the Transient Trigger pattern.

Control-flow patterns 6.1.9

The overall conclusion based on an evaluation of the control-flow pat-

terns is that Activiti offers good support in comparison to that offered

by the other open-source products. But there are some areas especially

in the state-based patterns, trigger patterns and advanced branching

and synchronization pattern that are not supported by Activiti. On the

other hand an investigation of the Cancellation and Force Completion

Patterns shows that Activiti is superior to the other platforms and offers

almost full support. It is important to evaluate what kind of processes

are going to be developed before choosing Activiti since there are other

offerings, not dealt with in this study, that are able to offer more direct

support for some specific needs. It is always better to have direct sup-

port for the patterns used in a process than to rely on custom code or

messy diagrams which can lead to logical errors and problems when

improving the process during the redesigning phase.

6.2 Extended Activiti Explorer

One important aspect of this evaluation was to evaluate Activiti as an

open-source product with the possibility of extending the code. This

was conducted by developing two significant extensions and by fixing

some bugs and minor improvements. When this project started, the

extensions were made to Activiti 5.8 and by the end of the project,

version 5.9 had been released and all the changes were merged in to this

version without any difficulties. Since Activiti is releasing newer ver-

sions several times a year it can prove to be time consuming to maintain

an extended version. From version 5.8 and 5.9 the majority of the im-

provements have been to the engine and not the Activiti Explorer mod-

ule, in fact only two Java files have been changed. The source code of

Activiti is well structured and it uses good naming conventions which

makes it easy to navigate and to understand. However, as with many

software systems, it relies on underlying frameworks such as Spring and

Vaadin. In order to better understand the source code it is important to

have a more in-depth understanding of these frameworks.

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

6 Conclusions

2012-06-29

67

Support for multiple companies 6.2.1

The solution presented here has the advantage that it enables multiple

companies in the same web application. One of the drawbacks involves

scaling since there are limits associated with one server and, once this

limit has been reached, it will be necessary to install one or more addi-

tional servers. Another problem is the amount of changes required to

implement this feature as it will prove be time consuming to merge this

feature for each new version of Activiti. Another solution would be to

install each company as a separate web application. This requires more

work and takes up more disk space and uses one administrator applica-

tion per company. By using the Activiti company deployment manager

it is easy to assemble all company users and processes in addition to

creating a customized appearance by choosing a color and new logo-

types.

Support for custom layout in task forms 6.2.2

Only four classes were changed and one was added to support the

custom form tasks. The discovery involved in relation to the classes

which were handling the form rendering and how it was possible to add

the changes, this was facilitated by the naming and good organization of

the packages and classes. The solution is relatively easy to use for a

process developer and the helper tool makes it somewhat easier. The

drawbacks associated with this solution are that XML editing is time

consuming and the XML parsing is necessary every time a user task is

executed, which consumes computer resources. The default behaviour

makes the extended version of Activiti fully compatible with processes

created for the original version. By creating blocks with common fields

it is possible to build standard templates that can be used by several

tasks, because the blocks are not displayed if they are empty and fields

missing from the layout XML file will be displayed at the bottom of the

form.

Support for a business payment model 6.2.3

The payment model is very simple and it allows a pay per process

instance and payment for each executed user task. Of course, it is also

possible to charge a fixed price per month per process. When updating a

process, both the old and new processes are listed separately in the

invoice XML making it possible to have different charges, for example,

taking out an extra charge for a new improved process. When starting a

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

6 Conclusions

2012-06-29

68

new process it is always the newest version available that is started

(user cannot choose) but previously started processes when a new

version is deployed, will not change. Only processes that were started

during the selected month are listed in the invoice XML. What is still

missing is a means of integrating the invoice into billing software but

since it is in an XML format it should be easy to make a converter that

converts it to any desired format for a specific product.

Improvements and bug fixes 6.2.4

When fixing bugs and making minor improvements it is vital to possess

knowledge of the Vaadin framework. The source code for the Activiti

Engine was also used as a source of information for the internal func-

tionality in the engine.

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

7 Future work

2012-06-29

69

Future work 7Here are some suggestions for future work that were not investigated

because of time constraints.

7.1 Workflow pattern evaluation

To better understand Activities capabilities it should be evaluated

against the other workflow pattern perspectives provided by the work-

flow patterns initiative:

Workflow Resource Patterns

Workflow Data Patterns

Exception Handeling Patterns

Presentation Patterns

7.2 Multiple companies

To improve the scaling and administration, the engine should be sepa-

rated from the graphical user interface. There is already an Activiti

REST web application module but it is still labelled as being experi-

mental. With this type of a setup one admin application can be used for

all companies, even if they are installed on different machines, as long

as they are accessible from the network. In relation to application to

application communication there is no requirement for a single web

application to control all engines and they can also be deployed as

separate web applications.

7.3 Custom form layout

To improve the solution, an eclipse plugin can be developed that inte-

grates with Activiti Designer and provides the process developer with

the ability to build the forms by using a graphical user interface with

drag and drop components. To speed up the rendering of the task

forms, the layout definitions can be parsed when they are deployed and

saved in a binary format. The binary format has to be compact and to be

read in a straightforward manner when creating the specific form for the

user task in order to improve performance.

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Terminology

2012-06-29

70

References [1] R. Medina-Mora, T. Winograd, and R. Flores, “ActionWorkflow

as the Enterprise Integration Technology,” Bulletin of the Tech-

nical Committee on Data Engineering, IEEE Computer Society,

Vol. 16, No.2 June 1993.

[2] D. Georgakopoulos, M. Hornick, and A. Sheth. An Overview of

Workflow Management: From process Modeling to Workflow

Automation Infrastructure. Distributed and Parallel Databases,

3(2):119-153, April 1995.

[3] The Workflow Patterns Initiative, “Main page of the initiative

site”, http://www.workflowpatterns.com/

Retrieved 2012-06-13.

[4] W.M.P van der Aalst, A.H.M. ter Hofstede, B. Kiepuszewski, and

A.P. Barros. Workflow Patterns. Distributed and Parallel Data-

bases, 14(3):5-51, July 2003.

[5] N. Russell, A.H.M. ter Hofstede, W.M.P. van der Aalst, and N.

Mulyar. Workflow Control-Flow Patterns: A Revised View. BPM

Center Report BPM-06-22, BPMcenter.org, 2006.

[6] Alexander, Christopher. A Pattern Language: Towns, Buildings,

Construction. Oxford University Press. 1977.

[7] Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides.

Design Patterns: Elements of Reusable Object-Oriented Software,

1994

[8] Mathias Weske. Business Process Management: Concepts, Lan-

guages, Architectures. Springer 2007

[9] Activiti, “Activiti website”, http://www.activiti.org/. Retrieved

2012-06-13

[10] P. Wohed, B. Andersson, A.H.M. ter Hofstede, N.C. Russell, and

W.M.P. van der Aalst. Patterns-based Evaluation of Open Source

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Terminology

2012-06-29

71

BPM Systems: The Cases of jBPM, OpenWFE, and Enhydra

Shark. BPM Center Report BPM-07-12, BPMcenter.org, 2007.

[11] jBPM, “jBPM website”, http://www.jboss.org/jbpm, Retrieved

2012-06-13

[12] OpenWFE, “OpenWFE website”,

http://sourceforge.net/projects/openwfe/, Retrieved 2012-06-13

[13] Enhydra Shark, “Enhydra shark website”,

http://sourceforge.net/projects/sharkwf/, Retrieved 2012-02-23

[14] Apache 2.0 License, “Information about the Apache 2.0 license”,

http://www.apache.org/licenses/LICENSE-2.0 Retrieved 2012-06-

13

[15] Spring Framework, “Spring framework website”,

http://www.springsource.org/ Retrieved 2012-06-13

[16] Vaadin Framework, “Vaadin framework website”,

https://vaadin.com/home Retrieved 2012-06-13

[17] Google Web Toolkit, “Google Web Toolkit website”,

https://developers.google.com/web-toolkit/ Retrieved 2012-06-13

[18] Tijs Rademakers, Activiti in Action: Executable business process-

es in BPMN 2.0, Manning Publications 2012.

[19] Nicolas Frankel, Learning Vaadin, Packt Publishing 2011.

[20] Object Management Group, “The BPMN 2.0 specification”,

http://www.omg.org/spec/BPMN/2.0/ Retrieved 2012-06-13

[21] Alfresco, “Alfresco website”, http://www.alfresco.com/ Retrieved

2012-06-13

[22] Eclipse, “Eclipse project website”, http://www.eclipse.org/ Re-

trieved 2012-06-13

[23] Activiti Designer, “Documentation about Activiti Desiger”,

http://www.activiti.org/userguide/index.html#activitiDesigner

Retrieved 2012-06-13

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Terminology

2012-06-29

72

[24] The Workflow patterns, “Information about workflow patterns”,

http://www.workflowpatterns.com/patterns/ Retrieved 2012-06-

13

[25] The Wokflow Patterns, “Information about the Control-Flow

Patterns”, http://www.workflowpatterns.com/patterns/control/

Retrieved 2012-06-13

[26] Activiti subversion repository, “The Activiti source code”,

http://svn.codehaus.org/activiti/ Retrieved 2012-06-13

[27] Activiti Explorer, “Information about Activiti Explorer”,

http://www.activiti.org/userguide/index.html#activitiExplorer

Retrieved 2012-06-13

[28] Marko Grönroos, Book of Vaadin - 4th Edition, Vaadin Ltd 2012-

06-11

[29] Activiti User Guide, “Information about Activiti”,

http://www.activiti.org/userguide/index.html Retrieved 2012-06-

13

[30] The Workflow Patterns Initiative, “Information about open-

source product evaluations”,

http://www.workflowpatterns.com/evaluations/opensource/ Re-

trieved 2012-06-13

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix A: Process constricts in

Activiti Designer

2012-06-29

73

Appendix A: Process constricts in Activiti Designer Here are the constructs found in Activiti Designer 5.8 that are used

when modeling the patterns.

Connection

Sequence flow is used to connect activities, gateways and events to each

other. The connection is in the direction of the arrow, its graphical

notation is shown in figure 52.

Figure 52: Sequence Flow

Event

Start Event is used to define the starting point for the process. It can take

values to be written into process variables and the name of the process

variable to contain the name of the process initiator. Its graphical nota-

tion is shown in figure 53.

Figure 53: Start Event

End Event is used to define where a process branch ends. The process

ends first when all threads have reached an end event. The graphical

notation (figure 54) is similar to Start Event but with a thicker boarder.

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix A: Process constricts in

Activiti Designer

2012-06-29

74

Figure 54: End Event

Error End Event is an end event that throws an error inside a process

that can be caught by the error boundary event. Its graphical notation is

shown in figure 55.

Figure 55: Error End Event

Timer Start Event is used to start a process at a specific time or time

intervals. Its graphical notation is shown in figure 56.

Figure 56: Timer Start Event

Task

In the task category there are automated tasks and manual tasks that

represent a piece of work that is part of the process. The only ones used

when modeling the control-flow patterns are the user task and the sub

process.

User task is used to model a task that has to be completed by a human

actor. The User Task can be used to write process variables with values

provided by the user. It is possible to create multiple instances of a task

by setting the properties in the multi-instance tab. Its graphical notation

is shown in figure 57.

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix A: Process constricts in

Activiti Designer

2012-06-29

75

Figure 57: User Task

Sub Process can be used to construct a process inside a process. On the

sub process boundary events can be attached for error handling and

timers. The graphical notation is shown in figure 58.

Figure 58: Sub Process

Gateway

Parallel Gateway is used to execute activities in parallel or to make sure

that all incoming activities have to be completed before the subsequent

activity is executed. Its graphical notation is shown in figure 59.

Figure 59: Parallel Gateway

Exclusive gateway is used for selecting one outgoing sequence flow

based on conditional logic. Each incoming thread will result in a thread

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix A: Process constricts in

Activiti Designer

2012-06-29

76

being passed to the subsequent activity. Its graphical notation is shown

in figure 60.

Figure 60: Exclusive Gateway

Inclusive Gateway is used for conditional logic such as the Exclusive

Gateway but the difference being that more than one outgoing sequence

flow can be used. The subsequent activity will be executed first when all

incoming branches that were split with an inclusive gateway earlier in

the process have been activated. Its graphical notation is shown in figure

61.

Figure 61: Inclusive Gateway

Boundary Event

Error Boundary Event is used to catch errors that are thrown inside the

activity where it is defined. Its graphical notation is shown in figure 62.

Figure 62: Error Boundary Event

Timer Boundary Event is used to attach a timer to an activity that starts

when the activity is executed and fires when the specified time is

reached. When the timer fires the execution of the activity is halted and

the sequence flow following the boundary event is executed. Its graph-

ical notation is shown in figure 63.

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix A: Process constricts in

Activiti Designer

2012-06-29

77

Figure 63: Timer Boundary Event

Intermediate Event

Timer Catching Event is used to create a timer to delay the execution of

the subsequent activity. When the timer is executed the countdown

starts and the subsequent activity is executed first when the countdown

has reached zero. Its graphical notation is shown in figure 64.

Figure 64: Timer Catching Event

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix B: Control-flow patterns

definitions

2012-06-29

78

Appendix B: Control-flow patterns definitions This chapter consists of a brief explanation of the 43 control-flow work-

flow patterns with their original definition.

Pattern 1 – Sequence

An activity in a workflow process is enabled after the completion of a

preceding activity in the same process. [5]

Synonyms

Sequential routing, serial routing [5].

Pattern 2 – Parallel split

The divergence of a branch into two or more parallel branches each of

which execute concurrently. [5]

Synonyms

AND-split, parallel routing, parallel split, fork [5].

Pattern 3 – Synchronization

The convergence of two or more branches into a single subsequent

branch such that the thread of control is passed to the subsequent

branch when all input branches have been enabled. [5]

Synonyms

AND-join, rendezvous, synchronizer [5].

Pattern 4 - Exclusive Choice

The divergence of a branch into two or more branches. When the incom-

ing branch is enabled, the thread of control is immediately passed to

precisely one of the outgoing branches based on the outcome of a logical

expression associated with the branch. [5]

Synonyms

XOR-split, exclusive OR-split, conditional routing, switch, decision, case

statement [5].

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix B: Control-flow patterns

definitions

2012-06-29

79

Pattern 5 - Simple Merge

The convergence of two or more branches into a single subsequent

branch. Each enablement of an incoming branch results in the thread of

control being passed to the subsequent branch. [5]

Synonyms

XOR-join, exclusive OR-join, asynchronous join, merge [5].

Pattern 6 - Multi-Choice

The divergence of a branch into two or more branches. When the incom-

ing branch is enabled, the thread of control is immediately passed to one

or more of the outgoing branches based the outcome of distinct logical

expressions associated with each of the branches. [5]

Synonyms

Conditional routing, selection, OR-split, multiple choice [5].

Pattern 7 - Structured Synchronizing Merge

The convergence of two or more branches (which diverged earlier in the

process at a uniquely identifiable point) into a single subsequent branch.

The thread of control is passed to the subsequent branch when each

active incoming branch has been enabled. [5]

Synonyms

Synchronizing join, synchronizer [5].

Pattern 8 - Multi-Merge

The convergence of two or more branches into a single subsequent

branch. Each enablement of an incoming branch results in the thread of

control being passed to the subsequent branch. [5]

Pattern 9 - Structured Discriminator

The convergence of two or more branches into a single subsequent

branch following a corresponding divergence earlier in the process

model. The thread of control is passed to the subsequent branch when

the first incoming branch has been enabled. Subsequent enablements of

incoming branches do not result in the thread of control being passed

on. The discriminator construct resets when all incoming branches have

been enabled. [5]

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix B: Control-flow patterns

definitions

2012-06-29

80

Synonyms

1-out-of-M join [5].

Pattern 10 – Arbitrary Cycles

The ability to represent cycles in a process model that have more than

one entry or exit point. [5]

Synonyms

Unstructured loop, iteration, cycle [5].

Pattern 11 - Implicit Termination

A given process (or sub-process) instance should terminate when there

are no remaining work items that are able to be done either now or at

any time in the future. [5]

Pattern 12 - Multiple Instances without Synchronization

Within a given process instance, multiple instances of an activity can be

created. These instances are independent of each other and run concur-

rently. There is no requirement to synchronize them upon completion.

[5]

Synonyms

Multi threading without synchronization, spawn off facility [5].

Pattern 13 - Multiple Instances with a priori Design-Time Knowledge

Within a given process instance, multiple instances of an activity can be

created. The required number of instances is known at design time.

These instances are independent of each other and run concurrently. It

is necessary to synchronize the activity instances at completion before

any subsequent activities can be triggered. [5]

Pattern 14 - Multiple Instances with a priori Run-Time Knowledge

Within a given process instance, multiple instances of an activity can be

created. The required number of instances may depend on a number of

runtime factors, including state data, resource availability and inter-

process communications, but is known before the activity instances

must be created. Once initiated, these instances are independent of each

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix B: Control-flow patterns

definitions

2012-06-29

81

other and run concurrently. It is necessary to synchronize the instances

at completion before any subsequent activities can be triggered. [5]

Pattern 15 - Multiple instances without a priori run-time knowledge

Within a given process instance, multiple instances of an activity can be

created. The required number of instances may depend on a number of

runtime factors, including state data, resource availability and inter-

process communications and is not known until the final instance has

completed. Once initiated, these instances are independent of each other

and run concurrently. At any time, whilst instances are running, it is

possible for additional instances to be initiated. It is necessary to syn-

chronize the instances at completion before any subsequent activities

can be triggered. [5]

Pattern 16 - Deferred Choice

A point in a workflow process where one of several branches is chosen

based on interaction with the operating environment. Prior to the deci-

sion, all branches present possible future courses of execution. The

decision is made by initiating the first activity in one of the branches i.e.

there is no explicit choice but rather a race between different branches.

After the decision is made, execution alternatives in branches other than

the one selected are withdrawn. [5]

Synonyms

External choice, implicit choice, deferred XOR-split [5].

Pattern 17 - Interleaved Parallel Routing

A set of activities has a partial ordering defining the requirements with

respect to the order in which they must be executed. Each activity in the

set must be executed once and they can be completed in any order that

accords with the partial order. However, as an additional requirement,

no two activities can be executed at the same time (i.e. no two activities

can be active for the same process instance at the same time) . [5]

Pattern 18 – Milestone

An activity is only enabled when the process instance (of which it is

part) is in a specific state (typically in a parallel branch). The state is

assumed to be a specific execution point (also known as a milestone) in

the process model. When this execution point is reached the nominated

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix B: Control-flow patterns

definitions

2012-06-29

82

activity can be enabled. If the process instance has progressed beyond

this state, then the activity cannot be enabled now or at any future time

(i.e. the deadline has expired). Note that the execution does not influ-

ence the state itself, i.e. unlike normal control-flow dependencies it is a

test rather than a trigger. [5]

Synonyms

Test arc, deadline, state condition, withdraw message [5].

Pattern 19 - Cancel Activity

An enabled activity is withdrawn prior to it commencing execution. If

the activity has started, it is disabled and, where possible, the currently

running instance is halted and removed. [5]

Synonyms

Withdraw activity.

Pattern 20 - Cancel Case

A complete process instance is removed. This includes currently execut-

ing activities, those which may execute at some future time and all sub-

processes. The process instance is recorded as having completed unsuc-

cessfully. [5]

Synonyms

Withdraw case.

Pattern 21 - Structured Loop

The ability to execute an activity or sub-process repeatedly. The loop has

either a pre-test or post-test condition associated with it that is either

evaluated at the beginning or end of the loop to determine whether it

should continue. The looping structure has a single entry and exit point.

[5]

Pattern 22 - Recursion

The ability of an activity to invoke itself during its execution or an

ancestor in terms of the overall decomposition structure with which it is

associated. [5]

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix B: Control-flow patterns

definitions

2012-06-29

83

Pattern 23 - Transient Trigger

The ability for an activity to be triggered by a signal from another part

of the process or from the external environment. These triggers are

transient in nature and are lost if not acted on immediately by the re-

ceiving activity. [5]

Pattern 24 - Persistent Trigger

The ability for an activity to be triggered by a signal from another part

of the process or from the external environment. These triggers are

persistent in form and are retained by the workflow until they can be

acted on by the receiving activity. [5]

Pattern 25 - Cancel Region

The ability to disable a set of activities in a process instance. If any of the

activities are already executing, then they are withdrawn. The activities

need not be a connected subset of the overall process model. [5]

Pattern 26 - Cancel Multiple Instance Activity

Within a given process instance, multiple instances of an activity can be

created. The required number of instances is known at design time.

These instances are independent of each other and run concurrently. At

any time, the multiple instance activity can be cancelled and any in-

stances which have not completed are withdrawn. This does not affect

activity instances that have already completed. [5]

Pattern 27 - Complete Multiple Instance Activity

Within a given process instance, multiple instances of an activity can be

created. The required number of instances is known at design time.

These instances are independent of each other and run concurrently. It

is necessary to synchronize the instances at completion before any

subsequent activities can be triggered. During the course of execution, it

is possible that the activity needs to be forcibly completed such that any

remaining instances are withdrawn and the thread of control is passed

to subsequent activities. [5]

Pattern 28 - Blocking Discriminator

The convergence of two or more branches into a single subsequent

branch following one or more corresponding divergences earlier in the

process model. The thread of control is passed to the subsequent branch

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix B: Control-flow patterns

definitions

2012-06-29

84

when the first active incoming branch has been enabled. The discrimina-

tor construct resets when all active incoming branches have been ena-

bled once for the same process instance. Subsequent enablements of

incoming branches are blocked until the discriminator has reset. [5]

Pattern 29 - Cancelling Discriminator

The convergence of two or more branches into a single subsequent

branch following one or more corresponding divergences earlier in the

process model. The thread of control is passed to the subsequent branch

when the first active incoming branch has been enabled. Triggering the

discriminator also cancels the execution of all of the other incoming

branches and resets the construct. [5]

Pattern 30 - Structured Partial Join

The convergence of M branches into a single subsequent branch follow-

ing a corresponding divergence earlier in the process model. The thread

of control is passed to the subsequent branch when N of the incoming

branches have been enabled. Subsequent enablements of incoming

branches do not result in the thread of control being passed on. The join

construct resets when all active incoming branches have been enabled.

[5]

Pattern 31 - Blocking Partial Join

The convergence of two or more branches into a single subsequent

branch following one or more corresponding divergences earlier in the

process model. The thread of control is passed to the subsequent branch

when N of the incoming branches have been enabled. The join construct

resets when all active incoming branches have been enabled once for the

same process instance. Subsequent enablements of incoming branches

are blocked until the join has reset. [5]

Pattern 32 - Cancelling Partial Join

The convergence of two or more branches into a single subsequent

branch following one or more corresponding divergences earlier in the

process model. The thread of control is passed to the subsequent branch

when N of the incoming branches have been enabled. Triggering the

join also cancels the execution of all of the other incoming branches and

resets the construct. [5]

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix B: Control-flow patterns

definitions

2012-06-29

85

Pattern 33 - Generalized AND-Join

The convergence of two or more branches into a single subsequent

branch such that the thread of control is passed to the subsequent

branch when all input branches have been enabled. Additional triggers

received on one or more branches between firings of the join persist and

are retained for future firings. [5]

Pattern 34 - Static Partial Join for Multiple Instances

Within a given process instance, multiple concurrent instances of an

activity can be created. The required number of instances is known

when the first activity instance commences. Once N of the activity

instances have completed, the next activity in the process is triggered.

Subsequent completions of the remaining M-N instances are inconse-

quential. [5]

Pattern 35 - Cancelling Partial Join for Multiple Instances

Within a given process instance, multiple concurrent instances of an

activity can be created. The required number of instances is known

when the first activity instance commences. Once N of the activity

instances have completed, the next activity in the process is triggered

and the remaining M-N instances are cancelled. [5]

Pattern 36 - Dynamic Partial Join for Multiple Instances

Within a given process instance, multiple concurrent instances of an

activity can be created. The required number of instances may depend

on a number of runtime factors, including state data, resource availabil-

ity and inter-process communications and is not known until the final

instance has completed. At any time, whilst instances are running, it is

possible for additional instances to be initiated providing the ability to

do so has not been disabled. A completion condition is specified which

is evaluated each time an instance of the activity completes. Once the

completion condition evaluates to true, the next activity in the process is

triggered. Subsequent completions of the remaining activity instances

are inconsequential and no new instances can be created. [5]

Pattern 37 - Acyclic Synchronizing Merge

The convergence of two or more branches which diverged earlier in the

process into a single subsequent branch. The thread of control is passed

to the subsequent branch when each active incoming branch has been

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix B: Control-flow patterns

definitions

2012-06-29

86

enabled. Determination of how many branches require synchronization

is made on the basis of information locally available to the merge con-

struct. This may be communicated directly to the merge by the preced-

ing diverging construct or alternatively it can be determined on the

basis of local data such as the threads of control arriving at the merge.

[5]

Pattern 38 - General Synchronizing Merge

The convergence of two or more branches which diverged earlier in the

process into a single subsequent branch. The thread of control is passed

to the subsequent branch when each active incoming branch has been

enabled or it is not possible that the branch will be enabled at any future

time. [5]

Pattern 39 - Critical Section

Two or more connected subgraphs of a process model are identified as

“critical sections”. At runtime for a given process instance, only activi-

ties in one of these “critical sections” can be active at any given time.

Once execution of the activities in one “critical section” commences, it

must complete before another “critical section” can commence.

Pattern 40 - Interleaved Routing

Each member of a set of activities must be executed once. They can be

executed in any order but no two activities can be executed at the same

time (i.e. no two activities can be active for the same process instance at

the same time). Once all of the activities have completed, the next activi-

ty in the process can be initiated. [5]

Pattern 41 - Thread Merge

At a given point in a process, a nominated number of execution threads

in a single branch of the same process instance should be merged to-

gether into a single thread of execution. [5]

Pattern 42 - Thread Split

At a given point in a process, a nominated number of execution threads

can be initiated in a single branch of the same process instance. [5]

Pattern 43 - Explicit Termination

A given process (or sub-process) instance should terminate when it

reaches a nominated state. Typically this is denoted by a specific end

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix B: Control-flow patterns

definitions

2012-06-29

87

node. When this end node is reached, any remaining work in the pro-

cess instance is cancelled and the overall process instance is recorded as

having completed successfully. [5]

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix C: New Features

2012-06-29

88

Appendix C: New Features Adding multiple company support

1. Changed class org.activiti.explorer.ui.login.ExplorerLoginForm

1. Added field companyCaption [String]

2. Added in constructor companyCaption =

i18nManager.getMessage(Messages.LOGIN_COMPANY);

3. Changed getLoginHTML to include input field for company.

2. Changed class org.activiti.explorer.Messages

1. Added under //login static final String LOGIN_COMPANY =

"login.company";

3. Changed class messages.properties

1. Added under #login, login.company = Company

4. Changed class org.activiti.explorer.identity.LoggedInUser

1. Added method String getCompany();

5. Changed class org.activiti.explorer.identity.LoggedInUserImpl

1. Added field protected String company;

2. Changed constructor to include company public LoggedInUserImpl(String

company, User user, String password)

3. Added method String getCompany();

6. Added class org.activiti.cloud.CloudProcessEngines (see added classes

section)

7. Changed class org.activiti.explorer.ui.login.LoginHandler

1. Added parameter to method authenticate, LoggedInUser authenticate(String

company, String userName, String password);

8. Changed class org.activiti.explorer.ui.login.DefaultLoginHandler

1. Deleted field private IdentityService identityService and setter;

2. Added parameter to method authenticate, public LoggedInUserImpl

authenticate(String company, String userName, String password)

3. Added company check and retrieving the identityService for the given

company using ProcessEngines for authentication.

9. Changed class org.activiti.explorer.ui.login.LoginPage

1. Deleted field identityService

2. Added in method ActivitiLoginListener.onLogin code for retrieving the

company name

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix C: New Features

2012-06-29

89

3. Added company parameter to call to login handler,

loginHandler.authenticate(company, userName, password);

4. Added setTheme to company name in method

ActivitiLoginListener.onLogin

10. Changed class

org.activiti.explorer.ui.profile.ChangePasswordPopupWindow

1. Deleted field identityService

2. Added in method handlePasswordChange IdentityService identityService =

CloudProcessEngines.getIdentityService();

3. Change authenticate in method handlePasswordChange to include company.

11. Changed class org.activiti.explorer.DefaultViewManager

1. Deleted field taskService

2. Deleted field historyService

3. Deleted field identityService

4. Added in method showTaskPage, TaskService taskService =

CloudProcessEngines.getTaskService();

5. Added in method showTaskPage, HistoryService historyService =

CloudProcessEngines.getHistoryService();

6. Added in method getGroupIds, IdentityService identityService =

CloudProcessEngines.getIdentityService();

12. Changed class org.activiti.explorer.navigation.TaskNavigator

1. Deleted field taskService

2. Deleted field historyService

3. Deleted field identityService

4. Added in method directToSpecificTaskPage

1. TaskService taskService = CloudProcessEngines.getTaskService();

2. HistoryService historyService =

CloudProcessEngines.getHistoryService();

3. IdentityService identityService =

CloudProcessEngines.getIdentityService();

5. Added in getGroupIds IdentityService identityService =

CloudProcessEngines.getIdentityService();

13. Changed class

org.activiti.explorer.ui.alfresco.ProcessInstanceTableLazyQuery

1. Deleted field runtimeService

2. Added in method constructQuery RuntimeService runtimeService =

CloudProcessEngines.getRuntimeService();

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix C: New Features

2012-06-29

90

14. Changed class

org.activiti.explorer.ui.content.CreateAttachmentPopupWindow

1. Deleted field taskService

15. Changed class org.activiti.explorer.ui.content.file.ImageAttachmentRenderer

1. Change in getDetailComponent

◦ TaskService taskService =

ProcessEngines.getDefaultProcessEngine().getTaskService();

TaskService taskService = CloudProcessEngines.getTaskService();

◦ taskService =

ProcessEngines.getDefaultProcessEngine().getTaskService();

taskService = CloudProcessEngines.getTaskService();

16. Changed class

org.activiti.explorer.ui.content.url.UrlAttachmentEditorComponent

1. Deleted in constructor taskService =

ProcessEngines.getDefaultProcessEngine().getTaskService();

17. Changed class org.activiti.explorer.ui.custom.TaskListHeader

1. Deleted field taskService

2. Added in method initKeyboardListener TaskService taskService =

CloudProcessEngines.getTaskService();

18. Changed class org.activiti.explorer.ui.custom.UserProfileLink

1. Deleted field identityService

19. Changed class org.activiti.explorer.ui.form.FormPropertiesForm

1. Deleted field formService

20. Changed class org.activiti.explorer.ui.management.db.DatabaseDetailPanel

1. Deleted field managementService

2. Added in method addTableData, ManagementService managementService

= CloudProcessEngines.getManagementService();

21. Changed class org.activiti.explorer.ui.management.db.DatabasePage

1. Deleted field managementService

2. Added in method populateTableList, ManagementService

managementService = CloudProcessEngines.getManagementService();

22. Changed class org.activiti.explorer.ui.management.db.TableDataQuery

1. Deleted field managementService

23. Changed class

org.activiti.explorer.ui.management.deployment.DeleteDeploymentPopup

Window

1. Deleted field repositoryService

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix C: New Features

2012-06-29

91

2. Deleted field runtimeService

3. Added in method addDeleteWarning

1. RuntimeService runtimeService =

CloudProcessEngines.getRuntimeService();

2. RepositoryService repositoryService =

CloudProcessEngines.getRepositoryService();

4. Added in method addButtons, RepositoryService repositoryService =

CloudProcessEngines.getRepositoryService();

24. Changed class

org.activiti.explorer.ui.management.deployment.DeploymentDetailPanel

1. Deleted field repositoryService

2. Added in methods constructor, addProcessDefinitionLinks, addResourceLinks

1. RepositoryService repositoryService =

CloudProcessEngines.getRepositoryService();

25. Changed class

org.activiti.explorer.ui.management.deployment.DeploymentListQuery

1. Deleted field repositoryService

2. Added in methods loadItems, loadSingleResult, size

1. RepositoryService repositoryService =

CloudProcessEngines.getRepositoryService();

26. Changed class

org.activiti.explorer.ui.management.deployment.DeploymentUploadReceive

r

1. Deleted field repositoryService

2. Added in method deployUploadedFile, RepositoryService repositoryService

= CloudProcessEngines.getRepositoryService();

27. Changed class

org.activiti.explorer.ui.management.identity.GroupDetailPanel

1. Deleted field identityService

2. Added in methods constructor, initSaveButton, initDeleteButton,

initAddMembersButton

1. IdentityService identityService =

CloudProcessEngines.getIdentityService();

28. Changed class org.activiti.explorer.ui.management.identity.GroupListQuery

1. Deleted field identityService

2. Added in methods size, loadItems, loadSingleResult

1. IdentityService identityService =

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix C: New Features

2012-06-29

92

CloudProcessEngines.getIdentityService();

29. Changed class

org.activiti.explorer.ui.management.identity.GroupMembersQuery

1. Deleted field identityService

2. Added in methods size, loadItems, GroupMemberItem

1. IdentityService identityService =

CloudProcessEngines.getIdentityService();

30. Changed class

org.activiti.explorer.ui.management.identity.NewGroupPopupWindow

1. Deleted field identityService

2. Added in methods initInputFields, createGroup

1. IdentityService identityService =

CloudProcessEngines.getIdentityService();

31. Changed class

org.activiti.explorer.ui.management.identity.NewUserPopupWindow

1. Deleted field identityService

2. Added in methods initInputFields, createUser

1. IdentityService identityService =

CloudProcessEngines.getIdentityService();

32. Changed class org.activiti.explorer.ui.management.identity.UserDetailPanel

1. Deleted field identityService

2. Added in methods constructor, loadPicture, initSaveButton, initDeleteButton,

initAddGroupsButton, initGroupsTable

1. IdentityService identityService =

CloudProcessEngines.getIdentityService();

33. Changed class org.activiti.explorer.ui.management.identity.UserListQuery

1. Deleted field identityService

2. Added in methods size, loadItems, loadSingleResult

1. IdentityService identityService =

CloudProcessEngines.getIdentityService();

34. Changed class org.activiti.explorer.ui.management.job.JobDetailPanel

1. Deleted field managementService

2. Added in methods constructor, addActions, addJobState

1. ManagementService managementService =

CloudProcessEngines.getManagementService();

35. Changed class org.activiti.explorer.ui.management.job.JobListQuery

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix C: New Features

2012-06-29

93

1. Deleted field repositoryService [ManagementService]

2. Added in methods size, loadItems, loadSingleResult

1. ManagementService managementService =

CloudProcessEngines.getManagementService();

36. Changed class

org.activiti.explorer.ui.management.process.DeleteProcessInstanceClickList

ener

1. Changed in method buttonClick

◦ RuntimeService runtimeService =

ProcessEngines.getDefaultProcessEngine().getRuntimeService();

◦ RuntimeService runtimeService =

CloudProcessEngines.getRuntimeService();

37. Changed class

org.activiti.explorer.ui.management.process.ProcessInstanceDetailPanel

1. Deleted fields runtimeService, repositoryService, taskService,

historyService, identityService

2. Added in method addProcessImage

1. RepositoryService repositoryService =

CloudProcessEngines.getRepositoryService();

2. RuntimeService runtimeService =

CloudProcessEngines.getRuntimeService();

3. Added in method addTasks, HistoryService historyService =

CloudProcessEngines.getHistoryService();

4. Added in method getTaskAssigneeComponent, IdentityService

identityService = CloudProcessEngines.getIdentityService();

5. Added in method addVariables, RuntimeService runtimeService =

CloudProcessEngines.getRuntimeService();

6. Added in method getProcessInstance, RuntimeService runtimeService =

CloudProcessEngines.getRuntimeService();

7. Added in method getHistoricProcessInstance, HistoryService historyService

= CloudProcessEngines.getHistoryService();

8. Added in method getProcessDefinition, RepositoryService repositoryService

= CloudProcessEngines.getRepositoryService();

38. Changed class

org.activiti.explorer.ui.management.process.ProcessInstanceListQuery

1. Deleted fields runtimeService, repositoryService

2. Added in method constructQuery, RuntimeService runtimeService =

CloudProcessEngines.getRuntimeService();

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix C: New Features

2012-06-29

94

3. Added in method getProcessDefinitionName, RepositoryService

repositoryService = CloudProcessEngines.getRepositoryService();

39. Changed class org.activiti.explorer.ui.process.MyProcessInstancesPage

1. Deleted fields historyService, repositoryService

2. Added in method createLazyLoadingQuery

1. RepositoryService repositoryService =

CloudProcessEngines.getRepositoryService();

2. HistoryService historyService =

CloudProcessEngines.getHistoryService();

40. Changed class org.activiti.explorer.ui.process.ProcessDefinitionDetailPanel

1. Deleted fields formService, repositoryService

2. Added in constructor RepositoryService repositoryService =

CloudProcessEngines.getRepositoryService();

3. Added in method showProcessStartForm FormService formService =

CloudProcessEngines.getFormService();

41. Changed class

org.activiti.explorer.ui.process.ProcessDefinitionInfoComponent

1. Deleted field repositoryService

2. Added in initImage RepositoryService repositoryService =

CloudProcessEngines.getRepositoryService();

42. Changed class org.activiti.explorer.ui.process.ProcessDefinitionPage

1. Deleted field repositoryService

2. Added in method createList, RepositoryService repositoryService =

CloudProcessEngines.getRepositoryService();

43. Changed class

org.activiti.explorer.ui.process.listener.StartProcessInstanceClickListener

1. Deleted fields runtimeService, taskService, formService

2. Added in method buttonClick

1. FormService formService = CloudProcessEngines.getFormService();

2. RuntimeService runtimeService =

CloudProcessEngines.getRuntimeService();

3. TaskService taskService = CloudProcessEngines.getTaskService();

44. Changed class org.activiti.explorer.ui.profile.ProfilePanel

1. Deleted field identityService

2. Added in methods loadProfileData, initChangePictureButton,

initSaveProfileButton

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix C: New Features

2012-06-29

95

1. IdentityService identityService =

CloudProcessEngines.getIdentityService();

45. Changed class org.activiti.explorer.ui.task.ArchivedPage

1. Changed in method createDetailComponent

HistoryService historyService =

ProcessEngines.getDefaultProcessEngine().getHistoryService();

HistoryService historyService =

CloudProcessEngines.getHistoryService();

46. Changed class org.activiti.explorer.ui.task.HistoricTaskDetailPanel

1. Deleted fields historyService, taskService

2. Added in methods initParentTaskLink, initSubTasks

1. HistoryService historyService =

CloudProcessEngines.getHistoryService();

3. Added in method initRelatedContent, TaskService taskService =

CloudProcessEngines.getTaskService();

47. Changed class org.activiti.explorer.ui.task.NewCasePopupWindow

1. Deleted field historyService, taskService

2. Added in method handleFormSubmit, TaskService taskService =

CloudProcessEngines.getTaskService();

48. Changed class org.activiti.explorer.ui.task.SubTaskComponent

1. Deleted fields taskService, historyService

2. Added in method initAddSubTaskPanelKeyboardActions, TaskService

taskService = CloudProcessEngines.getTaskService();

3. Added in methods initSubTasks, refreshSubTasks

1. HistoryService historyService =

CloudProcessEngines.getHistoryService();

49. Changed class org.activiti.explorer.ui.task.TaskDetailPanel

1. Deleted fields taskService, formService, repositoryService

2. Added in methods initHeader, initClaimButton, initDescription,

initParentTaskLink, initTaskForm, canUserClaimTask

1. TaskService taskService = CloudProcessEngines.getTaskService();

3. Added in method initProcessLink, RepositoryService repositoryService =

CloudProcessEngines.getRepositoryService();

4. Added in method initTaskForm, final FormService formService =

CloudProcessEngines.getFormService();

50. Changed class org.activiti.explorer.ui.task.TaskEventsPanel

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix C: New Features

2012-06-29

96

1. Deleted fields identityService, taskService

2. Added in methods addTaskEvents, addNewComment

1. TaskService taskService = CloudProcessEngines.getTaskService();

3. Added in method addTaskEventPicture, IdentityService identityService =

CloudProcessEngines.getIdentityService();

51. Changed class org.activiti.explorer.ui.task.TaskInvolvedPeopleComponent

1. Deleted field taskService

2. Added in methods initAddPeopleButton, initInvolvedPeople,

refreshPeopleGrid, refreshAssignee, refreshOwner

1. TaskService taskService = CloudProcessEngines.getTaskService();

52. Changed class org.activiti.explorer.ui.task.TaskMenuBar

1. Deleted field identityService

2. Added in method initItems, IdentityService identityService =

CloudProcessEngines.getIdentityService();

53. Changed class org.activiti.explorer.ui.task.TaskPage

1. Deleted field taskService

2. Added in method createDetailComponent, TaskService taskService =

CloudProcessEngines.getTaskService();

54. Changed class org.activiti.explorer.ui.task.TaskRelatedContentComponent

1. Deleted field taskService

2. Added in methods refreshTaskAttachments, confirmed

1. TaskService taskService = CloudProcessEngines.getTaskService();

55. Changed class org.activiti.explorer.ui.task.UserDetailsComponent

1. Deleted field identityService

2. Added in methods constructor, addUserPicture

1. IdentityService identityService =

CloudProcessEngines.getIdentityService();

56. Changed class org.activiti.explorer.ui.task.data.AbstractTaskListQuery

1. Deleted field taskService

57. Changed class org.activiti.explorer.ui.task.data.ArchivedListQuery

1. Deleted field historyService

2. Added in method createQuery, HistoryService historyService =

CloudProcessEngines.getHistoryService();

58. Changed class org.activiti.explorer.ui.task.data.InboxListQuery

1. Added in method getQuery, TaskService taskService =

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix C: New Features

2012-06-29

97

CloudProcessEngines.getTaskService();

59. Changed class org.activiti.explorer.ui.task.data.InvolvedListQuery

1. Added in method getQuery, TaskService taskService =

CloudProcessEngines.getTaskService();

60. Changed class org.activiti.explorer.ui.task.data.QueuedListQuery

1. Deleted field taskService

2. Added in method getQuery, TaskService taskService =

CloudProcessEngines.getTaskService();

61. Changed class org.activiti.explorer.ui.task.data.TasksListQuery

1. Added in method getQuery, TaskService taskService =

CloudProcessEngines.getTaskService();

62. Changed class

org.activiti.explorer.ui.task.listener.ChangeOwnershipListener

1. Change in method buttonClick

1. ProcessEngines.getDefaultProcessEngine().getTaskService().setOwner(

task.getId(), selectedUser);

2. CloudProcessEngines.getTaskService().setOwner(task.getId(),

selectedUser);

63. Changed class

org.activiti.explorer.ui.task.listener.DeleteSubTaskClickListener

1. Change in method click

final TaskService taskService =

ProcessEngines.getDefaultProcessEngine().getTaskService();

final TaskService taskService = CloudProcessEngines.getTaskService();

64. Changed class org.activiti.explorer.ui.task.listener.ReassignAssigneeListener

1. Change in method buttonClick

ProcessEngines.getDefaultProcessEngine().getTaskService().setAssign

ee(task.getId(), selectedUser);

CloudProcessEngines.getTaskService().setAssignee(task.getId(),

selectedUser);

65. Changed class

org.activiti.explorer.ui.task.listener.RemoveInvolvedPersonListener

1. Deleted fields taskService, identityService

2. Added in method buttonClick

1. IdentityService identityService =

CloudProcessEngines.getIdentityService();

2. TaskService taskService = CloudProcessEngines.getTaskService();

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix C: New Features

2012-06-29

98

66. Changed class org.activiti.explorer.form.UserFormType

1. Change in method convertFormValueToModelValue

long count =

ProcessEngines.getDefaultProcessEngine().getIdentityService().create

UserQuery().userId(propertyValue).count();

long count =

CloudProcessEngines.getIdentityService().createUserQuery().userId(p

ropertyValue).count();

67. Changed class org.activiti.explorer.ui.content.GenericAttachmentRenderer

1. Change in method getDetailComponent

1. TaskService taskService =

ProcessEngines.getDefaultProcessEngine().getTaskService();

2. TaskService taskService = CloudProcessEngines.getTaskService();

68. Changed class org.activiti.explorer.ui.content.email.EmailDetailPanel

1. Deleted field taskService

2. Added in constructor TaskService taskService =

CloudProcessEngines.getTaskService();

69. Changed class

org.activiti.explorer.ui.content.file.FileAttachmentEditorComponent

1. Deleted field taskService

2. Added in method getAttachment, TaskService taskService =

CloudProcessEngines.getTaskService();

70. Changed package org.activiti.explorer.cache

1. Delete all clasdes except for UserCache

2. Add class NoUserCache (see added classes section)

71. Changed package org.activiti.explorer.demo

1. Delete all classes (DemoDataGenerator).

72. Changed xml file applicationContext.xml

1. Delete bean repositoryService

2. Delete bean runtimeService

3. Delete bean taskService

4. Delete bean historyService

5. Delete bean managementService

6. Delete bean identityService

7. Delete bean demoDataGenerator

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix C: New Features

2012-06-29

99

8. Delete bean dataSource

9. Delete bean transactionManager

10. Delete in activitiLoginHandler <property name="identityService"

ref="identityService" />

11. Change bean processEngine

<bean id="processEngine"

class="org.activiti.spring.ProcessEngineFactoryBean" destroy-

method="destroy">

<bean id="processEngine"

class="org.activiti.cloud.CloudProcessEngines" destroy-

method="destroy">

12. Change bean processEngineConfiguration to

<bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">

<property name="jdbcDriver" value="${jdbc.driver}" />

<property name="jdbcUrl" value="${jdbc.url}" />

<property name="jdbcUsername" value="${jdbc.username}" />

<property name="jdbcPassword" value="${jdbc.password}" />

<property name="databaseSchemaUpdate" value="true" />

<property name="jobExecutorActivate" value="true" />

<property name="customFormTypes">

<list>

<ref bean="userFormType" />

<ref bean="textAreaFromType" />

</list>

</property>

</bean>

73. Changed xml file activiti-ui-context.xml

1. Change bean userCache <bean name="userCache"

class="org.activiti.explorer.cache.NoUserCache" />

Textarea component

1. Added class org.activiti.explorer.form.TextAreaFormType (see added classes

section)

2. Added class org.activiti.explorer.ui.form.TextAreaFormPropertyRenderer

(see added classes section)

3. Changed xml applicationContext.xml

Added bean <bean id="textAreaFromType"

class="org.activiti.explorer.form.TextAreaFormType"/>

Added in bean processEngineConfiguration under customFormTypes

<ref bean="textAreaFromType" />

4. Changed xml activiti-ui-context.xml

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix C: New Features

2012-06-29

100

Added in bean formPropertyRendererManager under

propertyRenderers

<bean

class="org.activiti.explorer.ui.form.TextAreaFormPropertyRenderer" />

Custom task forms

1. Added class org.activiti.explorer.ui.form.FormTemplateParser (see added

classes section)

2. Changed class org.activiti.explorer.ui.form.FormPropertiesComponent

1. Added field processInstanceId [String]

2. Added field formkey [String]

3. Deleted field form [Form]

4. Changed type of field propertyComponents to protected

Map<FormProperty, Field>;

5. Changed Constructor to public FormPropertiesComponent(String

processInstanceId, String formkey)

6. Deleted method initForm

7. Deleted method setFormEnabled

8. Changed method setFormProperties to

public void setFormProperties(List<FormProperty> formProperties) {

this.formProperties = formProperties;

removeAllComponents();

if (propertyComponents == null) {

propertyComponents = new LinkedHashMap<FormProperty, Field>();

} else {

propertyComponents.clear();

}

for (FormProperty formProperty : this.formProperties) {

FormPropertyRenderer renderer = getRenderer(formProperty);

propertyComponents.put(formProperty,

renderer.getPropertyField(formProperty));

}

FormTemplateParser formParser = new FormTemplateParser(processInstanceId,

formkey);

VerticalLayout mainFormLayout = formParser

.getFormLayout(propertyComponents);

if (mainFormLayout != null) {

addComponent(mainFormLayout);

}

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix C: New Features

2012-06-29

101

}

9. Changed method getFormPropertyValues to

public Map<String, String> getFormPropertyValues()

throws InvalidValueException {

for (FormProperty formProperty : propertyComponents.keySet()) {

Field field = propertyComponents.get(formProperty);

field.validate();

}

Map<String, String> formPropertyValues = new HashMap<String, String>();

for (FormProperty formProperty : propertyComponents.keySet()) {

if (formProperty.isWritable()) {

Field field = propertyComponents.get(formProperty);

FormPropertyRenderer renderer = getRenderer(formProperty);

String fieldValue = renderer.getFieldValue(formProperty, field);

formPropertyValues.put(formProperty.getId(), fieldValue);

}

}

return formPropertyValues;

}

3. Changed class org.activiti.explorer.ui.form.FormPropertiesForm

1. Added field processInstanceId [String]

2. Added field formkey [String]

3. Changed Constructor to public FormPropertiesForm(String

processInstanceId, String formkey) (set fields)

4. Changed method initFormPropertiesComponent

formPropertiesComponent = new FormPropertiesComponent();

formPropertiesComponent = new

FormPropertiesComponent(processInstanceId, formkey);

5. Added in method initListeners (to catch block)

1. submitFormButton.setComponentError(new

UserError(ive.getMessage()));

4. Changed class org.activiti.explorer.ui.process.ProcessDefinitionDetailPanel

1. Changed method showProcessStartForm

processDefinitionStartForm = new FormPropertiesForm();

processDefinitionStartForm = new FormPropertiesForm(null,

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix C: New Features

2012-06-29

102

startFormData.getFormKey());

5. Changed class org.activiti.explorer.ui.task.TaskDetailPanel

1. Changed method initTaskForm

taskForm = new FormPropertiesForm();

taskForm = new FormPropertiesForm(task.getProcessInstanceId(),

formData.getFormKey());

6. Added in css styles.css

table.divider {

padding:0px;

margin:0px;

width:100%;

}

td.startline {

padding:1px;

margin:0px;

width:16px;

}

td.caption {

padding:1px;

margin:0px;

text-align:left;

white-space:nowrap;

width:1px;

color:#3c3c3c;

font:bold 12px Arial, Helvetica, sans-serif;

}

td.endline {

padding:1px;

margin:0px;

width:auto;

}

Activiti custom form dtd <?xml version="1.0" encoding="UTF-8"?>

<!ELEMENT form (block|row|column|field|divider|a|img|br)*>

<!ELEMENT block (row|column|field|divider|a|img|br)*>

<!ELEMENT row (field|a|img|space)*>

<!ELEMENT column (field|divider|a|img|br)*>

<!ELEMENT field EMPTY>

<!ELEMENT divider (#PCDATA)>

<!ELEMENT a (#PCDATA|img)*>

<!ELEMENT img EMPTY>

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix C: New Features

2012-06-29

103

<!ELEMENT br EMPTY>

<!ELEMENT space EMPTY>

<!ATTLIST block type (divider | panel) #REQUIRED

caption CDATA #IMPLIED

style CDATA #IMPLIED>

<!ATTLIST field id CDATA #REQUIRED

description CDATA #IMPLIED>

<!ATTLIST row expand (true | false) #IMPLIED>

<!ATTLIST a href CDATA #IMPLIED

var CDATA #IMPLIED>

<!ATTLIST img src CDATA #REQUIRED

alt CDATA #IMPLIED

height CDATA #IMPLIED

width CDATA #IMPLIED>

Added Classes

org.activiti.cloud.CloudProcessEngines

package org.activiti.cloud;

import java.sql.Connection;

import java.sql.DriverManager;

import java.sql.ResultSet;

import java.sql.Statement;

import java.util.ArrayList;

import java.util.List;

import org.activiti.cloud.admin.Company;

import org.activiti.engine.FormService;

import org.activiti.engine.HistoryService;

import org.activiti.engine.IdentityService;

import org.activiti.engine.ManagementService;

import org.activiti.engine.ProcessEngine;

import org.activiti.engine.ProcessEngineConfiguration;

import org.activiti.engine.ProcessEngines;

import org.activiti.engine.RepositoryService;

import org.activiti.engine.RuntimeService;

import org.activiti.engine.TaskService;

import org.activiti.explorer.ExplorerApp;

import org.activiti.spring.SpringProcessEngineConfiguration;

import org.apache.commons.dbcp.BasicDataSource;

import org.springframework.jdbc.datasource.DataSourceTransactionManager;

/**

* @author Mikael Nilsson Handles all connections to Activiti Process Engines.

* One Engine is started and registered per company.

*/

public class CloudProcessEngines {

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix C: New Features

2012-06-29

104

private static SpringProcessEngineConfiguration processEngineConfiguration;

public CloudProcessEngines() {

}

public synchronized static void startProcessEngine(ProcessEngine processEngine) {

ProcessEngines.registerProcessEngine(processEngine);

}

public synchronized static boolean startProcessEngine(String company) {

Connection connect = null;

Statement statement = null;

ResultSet resultSet = null;

String driverClassName = processEngineConfiguration.getJdbcDriver();

String url = processEngineConfiguration.getJdbcUrl();

String username = processEngineConfiguration.getJdbcUsername();

String password = processEngineConfiguration.getJdbcPassword();

try {

Class.forName(driverClassName);

connect = DriverManager.getConnection(url + "user=" + username

+ "&password=" + password);

statement = connect.createStatement();

statement.executeUpdate("USE activiti_cloud");

resultSet = statement

.executeQuery("SELECT * FROM `Company` WHERE `CompanyName` = '"

+ company + "'");

if (resultSet.next()) {

BasicDataSource dataSource = new BasicDataSource();

dataSource.setDriverClassName(resultSet.getString("DriverClassName"));

dataSource.setUrl(resultSet.getString("URL"));

dataSource.setUsername(resultSet.getString("UserName"));

dataSource.setPassword(resultSet.getString("Password"));

dataSource.setDefaultAutoCommit(false);

DataSourceTransactionManager transactionManager = new DataSourceTransactionManager();

transactionManager.setDataSource(dataSource);

SpringProcessEngineConfiguration springProcessEngineConfiguration = new

SpringProcessEngineConfiguration();

springProcessEngineConfiguration.setProcessEngineName(resultSet

.getString("CompanyName"));

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix C: New Features

2012-06-29

105

springProcessEngineConfiguration.setDataSource(dataSource);

springProcessEngineConfiguration

.setTransactionManager(transactionManager);

springProcessEngineConfiguration.setDatabaseSchemaUpdate("true");

springProcessEngineConfiguration.setJobExecutorActivate(true);

springProcessEngineConfiguration

.setCustomFormTypes(processEngineConfiguration.getCustomFormTypes());

springProcessEngineConfiguration

.setHistory(ProcessEngineConfiguration.HISTORY_FULL);

springProcessEngineConfiguration.setMailServerHost(resultSet

.getString("MailServerHost"));

springProcessEngineConfiguration.setMailServerUsername(resultSet

.getString("MailServerUserName"));

springProcessEngineConfiguration.setMailServerPassword(resultSet

.getString("MailServerPassword"));

springProcessEngineConfiguration.setMailServerPort(resultSet

.getInt("MailServerPort"));

springProcessEngineConfiguration.setMailServerDefaultFrom(resultSet

.getString("MailServerDefaultFrom"));

springProcessEngineConfiguration.setMailServerUseTLS(resultSet

.getBoolean("MailServerUseTLS"));

startProcessEngine(springProcessEngineConfiguration

.buildProcessEngine());

return true;

}

} catch (Exception e) {

e.printStackTrace();

}

return false;

}

public synchronized static void stopProcessEngine(String company) {

ProcessEngines.unregister(org.activiti.engine.ProcessEngines

.getProcessEngine(company));

}

public static synchronized ProcessEngine getProcessEngine() {

String company = ExplorerApp.get().getLoggedInUser().getCompany();

return org.activiti.engine.ProcessEngines.getProcessEngine(company);

}

public static synchronized RepositoryService getRepositoryService() {

return getProcessEngine().getRepositoryService();

}

public static synchronized RuntimeService getRuntimeService() {

return getProcessEngine().getRuntimeService();

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix C: New Features

2012-06-29

106

}

public static synchronized TaskService getTaskService() {

return getProcessEngine().getTaskService();

}

public static synchronized HistoryService getHistoryService() {

return getProcessEngine().getHistoryService();

}

public static synchronized ManagementService getManagementService() {

return getProcessEngine().getManagementService();

}

public static synchronized IdentityService getIdentityService() {

return getProcessEngine().getIdentityService();

}

public static synchronized FormService getFormService() {

return getProcessEngine().getFormService();

}

public static SpringProcessEngineConfiguration getProcessEngineConfiguration() {

return processEngineConfiguration;

}

public void setProcessEngineConfiguration(

SpringProcessEngineConfiguration processEngineConfiguration) {

CloudProcessEngines.processEngineConfiguration = processEngineConfiguration;

Connection connect = null;

Statement statement = null;

ResultSet resultSet = null;

String driverClassName = processEngineConfiguration.getJdbcDriver();

String url = processEngineConfiguration.getJdbcUrl();

String username = processEngineConfiguration.getJdbcUsername();

String password = processEngineConfiguration.getJdbcPassword();

try {

Class.forName(driverClassName);

connect = DriverManager.getConnection(url + "user=" + username

+ "&password=" + password);

statement = connect.createStatement();

statement.executeUpdate("USE activiti_cloud");

resultSet = statement.executeQuery("SELECT * FROM Company");

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix C: New Features

2012-06-29

107

while (resultSet.next()) {

BasicDataSource dataSource = new BasicDataSource();

dataSource.setDriverClassName(resultSet.getString("DriverClassName"));

dataSource.setUrl(resultSet.getString("URL"));

dataSource.setUsername(resultSet.getString("UserName"));

dataSource.setPassword(resultSet.getString("Password"));

dataSource.setDefaultAutoCommit(false);

DataSourceTransactionManager transactionManager = new DataSourceTransactionManager();

transactionManager.setDataSource(dataSource);

SpringProcessEngineConfiguration springProcessEngineConfiguration = new

SpringProcessEngineConfiguration();

springProcessEngineConfiguration.setProcessEngineName(resultSet

.getString("CompanyName"));

springProcessEngineConfiguration.setDataSource(dataSource);

springProcessEngineConfiguration

.setTransactionManager(transactionManager);

springProcessEngineConfiguration.setDatabaseSchemaUpdate("true");

springProcessEngineConfiguration.setJobExecutorActivate(true);

springProcessEngineConfiguration

.setCustomFormTypes(processEngineConfiguration.getCustomFormTypes());

springProcessEngineConfiguration

.setHistory(ProcessEngineConfiguration.HISTORY_FULL);

springProcessEngineConfiguration.setMailServerHost(resultSet

.getString("MailServerHost"));

springProcessEngineConfiguration.setMailServerUsername(resultSet

.getString("MailServerUserName"));

springProcessEngineConfiguration.setMailServerPassword(resultSet

.getString("MailServerPassword"));

springProcessEngineConfiguration.setMailServerPort(resultSet

.getInt("MailServerPort"));

springProcessEngineConfiguration.setMailServerDefaultFrom(resultSet

.getString("MailServerDefaultFrom"));

springProcessEngineConfiguration.setMailServerUseTLS(resultSet

.getBoolean("MailServerUseTLS"));

startProcessEngine(springProcessEngineConfiguration

.buildProcessEngine());

}

} catch (Exception e) {

e.printStackTrace();

}

}

public synchronized static List<Company> getCompanies() {

List<Company> returList = new ArrayList<Company>();

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix C: New Features

2012-06-29

108

Connection connect = null;

Statement statement = null;

ResultSet resultSet = null;

String driverClassName = processEngineConfiguration.getJdbcDriver();

String url = processEngineConfiguration.getJdbcUrl();

String username = processEngineConfiguration.getJdbcUsername();

String password = processEngineConfiguration.getJdbcPassword();

try {

Class.forName(driverClassName);

connect = DriverManager.getConnection(url + "user=" + username

+ "&password=" + password);

statement = connect.createStatement();

statement.executeUpdate("USE activiti_cloud");

resultSet = statement.executeQuery("SELECT * FROM Company");

while (resultSet.next()) {

String companyName = resultSet.getString("CompanyName");

boolean active = (org.activiti.engine.ProcessEngines

.getProcessEngine(companyName) != null);

returList.add(new Company(companyName, active));

}

} catch (Exception e) {

e.printStackTrace();

}

return returList;

}

public void destroy() {

ProcessEngines.destroy();

}

}

org.activiti.explorer.cache.NoUserCache

package org.activiti.explorer.cache;

import java.util.ArrayList;

import java.util.List;

import org.activiti.cloud.CloudProcessEngines;

import org.activiti.engine.IdentityService;

import org.activiti.engine.identity.User;

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix C: New Features

2012-06-29

109

/**

*

* @author Mikael Nilsson Simple UserCache implementation that reads the users

* from database instead of caching them

*/

public class NoUserCache implements UserCache {

public List<User> findMatchingUsers(String prefix) {

List<User> usersReturn = new ArrayList<User>();

IdentityService identityService = CloudProcessEngines.getIdentityService();

List<User> users = identityService.createUserQuery().list();

for (User user : users) {

if (user.getId().toLowerCase().startsWith(prefix.toLowerCase())

|| prefix.equals("")) {

usersReturn.add(user);

}

}

return usersReturn;

}

public User findUser(String userId) {

IdentityService identityService = CloudProcessEngines.getIdentityService();

return identityService.createUserQuery().userId(userId).singleResult();

}

public void notifyUserDataChanged(String userId) {

}

}

org.activiti.explorer.form.TextAreaFormType

package org.activiti.explorer.form;

import org.activiti.engine.impl.form.AbstractFormType;

/**

* Form type for a textarea component.

* @author Mikael Nilsson

*/

public class TextAreaFormType extends AbstractFormType {

public static final String TYPE_NAME = "textarea";

public TextAreaFormType() {}

public String getName() {

return TYPE_NAME;

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix C: New Features

2012-06-29

110

}

public String getMimeType() {

return "text/plain";

}

public Object convertFormValueToModelValue(String propertyValue) {

return propertyValue;

}

public String convertModelValueToFormValue(Object modelValue) {

return (String) modelValue;

}

}

org.activiti.explorer.ui.form.TextAreaFormPropertyRenderer

package org.activiti.explorer.ui.form;

import org.activiti.engine.form.FormProperty;

import org.activiti.explorer.Messages;

import org.activiti.explorer.form.TextAreaFormType;

import com.vaadin.ui.Field;

import com.vaadin.ui.TextArea;

/**

* @author Mikael Nilsson

*/

public class TextAreaFormPropertyRenderer extends AbstractFormPropertyRenderer {

public TextAreaFormPropertyRenderer() {

super(TextAreaFormType.class);

}

@Override

public Field getPropertyField(FormProperty formProperty) {

TextArea textArea = new TextArea(getPropertyLabel(formProperty));

textArea.setRequired(formProperty.isRequired());

textArea.setEnabled(formProperty.isWritable());

textArea.setRequiredError(getMessage(Messages.FORM_FIELD_REQUIRED, getPropertyLabel(formProperty)));

if (formProperty.getValue() != null) {

textArea.setValue(formProperty.getValue());

}

return textArea;

}

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix C: New Features

2012-06-29

111

}

org.activiti.explorer.ui.form.FormTemplateParser

package org.activiti.explorer.ui.form;

import java.io.IOException;

import java.io.InputStream;

import java.util.ArrayList;

import java.util.List;

import java.util.Map;

import javax.xml.parsers.DocumentBuilder;

import javax.xml.parsers.DocumentBuilderFactory;

import org.activiti.cloud.CloudProcessEngines;

import org.activiti.engine.form.FormProperty;

import org.activiti.engine.repository.ProcessDefinition;

import org.activiti.engine.runtime.ProcessInstance;

import org.w3c.dom.Document;

import org.w3c.dom.NamedNodeMap;

import org.w3c.dom.Node;

import org.w3c.dom.NodeList;

import com.vaadin.ui.AbstractOrderedLayout;

import com.vaadin.ui.Alignment;

import com.vaadin.ui.Component;

import com.vaadin.ui.Field;

import com.vaadin.ui.FormLayout;

import com.vaadin.ui.HorizontalLayout;

import com.vaadin.ui.Label;

import com.vaadin.ui.Panel;

import com.vaadin.ui.VerticalLayout;

/**

*

* @author Mikael Nilsson

* Creates a VerticalLayout with components from the process descriptor (Map).

* The order and placement of the components are read from the form file

* (specified in the formkey field of the task).

* In the case that the form file does not exits all components are arranged

* in a column.

*/

public class FormTemplateParser {

private String formKey;

private Document formXML = null;

private List<FormProperty> formProperties;

private String processInstanceId = null;

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix C: New Features

2012-06-29

112

/**

* @param formKey is the name of the file that holds the xml form template.

*/

public FormTemplateParser(String processInstanceId, String formKey) {

this.processInstanceId = processInstanceId;

this.formKey = formKey;

parseXML();

}

/**

* Parses the form xml and creates a Document.

*/

private void parseXML() {

if (formKey != null && !formKey.equals("")) {

InputStream is = null;

try {

// For Activiti Explorer replace CloudProcessEngines with

// ProcessEngines.getDefaultProcessEngine()

ProcessInstance processInstance = CloudProcessEngines

.getRuntimeService().createProcessInstanceQuery()

.processInstanceId(processInstanceId).singleResult();

ProcessDefinition processDefinition = CloudProcessEngines

.getRepositoryService().createProcessDefinitionQuery()

.processDefinitionId(processInstance.getProcessDefinitionId())

.singleResult();

is = CloudProcessEngines.getRepositoryService().getResourceAsStream(

processDefinition.getDeploymentId(), formKey);

} catch (Exception e) {

} // form key not found in deployment (bar, zip)

try {

// turn of dtd validation

DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();

dbf.setValidating(false);

dbf.setFeature("http://xml.org/sax/features/namespaces", false);

dbf.setFeature("http://xml.org/sax/features/validation", false);

dbf.setFeature(

"http://apache.org/xml/features/nonvalidating/load-dtd-grammar",

false);

dbf.setFeature(

"http://apache.org/xml/features/nonvalidating/load-external-dtd",

false);

DocumentBuilder db = dbf.newDocumentBuilder();

formXML = db.parse(is);

} catch (Exception e) {

formXML = null;

} finally {

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix C: New Features

2012-06-29

113

try {

is.close();

} catch (IOException e) {

}

}

}

}

/**

*

* @param propertyComponents Map file containing all id's and fields.

* @return a VerticalLayout containing all the components

*/

public VerticalLayout getFormLayout(

Map<FormProperty, Field> propertyComponents) {

this.formProperties = new ArrayList<FormProperty>(

propertyComponents.keySet());

VerticalLayout mainLayout = new VerticalLayout();

mainLayout.setMargin(true, false, true, false);

if (formXML != null) {

NodeList forms = formXML.getElementsByTagName("form");

for (int j = 0; j < forms.getLength(); j++) {

Node form = forms.item(j);

NodeList blocks = form.getChildNodes();

for (int i = 0; i < blocks.getLength(); i++) {

Node block = blocks.item(i);

if (block.getNodeName().equals("block")) {

Component componentBlock = getBlock(block, propertyComponents);

if (componentBlock != null) {

mainLayout.addComponent(componentBlock);

}

} else if (block.getNodeName().equals("row")) {

Component componentRow = getRow(block, propertyComponents);

if (componentRow != null) {

mainLayout.addComponent(componentRow);

}

} else if (block.getNodeName().equals("field")) {

Component fieldComponent = getField(block, propertyComponents);

if (fieldComponent != null) {

mainLayout.addComponent(fieldComponent);

}

} else if (block.getNodeName().equals("column")) {

Component columnComponent = getColumn(block, propertyComponents);

if (columnComponent != null) {

mainLayout.addComponent(columnComponent);

}

} else if (block.getNodeName().equals("divider")) {

mainLayout.addComponent(getDividerLabel(block.getTextContent()));

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix C: New Features

2012-06-29

114

} else if (block.getNodeName().equals("a")) {

mainLayout.addComponent(htmlLink(block));

} else if (block.getNodeName().equals("br")) {

mainLayout.addComponent(getBr());

} else if (block.getNodeName().equals("img")) {

mainLayout.addComponent(new Label(imageLink(block),

Label.CONTENT_XHTML));

}

}

}

AbstractOrderedLayout otherComponents = getOtherComponents(

propertyComponents, mainLayout.getComponentCount() == 0);

if (otherComponents.getComponentCount() > 0) {

mainLayout.addComponent(otherComponents);

}

return mainLayout;

}

AbstractOrderedLayout otherComponents = getOtherComponents(

propertyComponents, true);

if (otherComponents.getComponentCount() > 0) {

mainLayout.addComponent(otherComponents);

return mainLayout;

}

return null;

}

/**

*

* @param propertyComponents Map file containing all id's and fields.

* @param useFormLayout if true from layout is used instead of vertical layout

* @return vertical or form layout with unused components

*/

private AbstractOrderedLayout getOtherComponents(

Map<FormProperty, Field> propertyComponents, boolean useFormLayout) {

AbstractOrderedLayout componentsLayout = null;

if (useFormLayout) {

componentsLayout = new FormLayout();

componentsLayout.setSizeFull();

for (FormProperty formProperty : this.formProperties) {

Field field = propertyComponents.get(formProperty);

field.setWidth("100%");

componentsLayout.addComponent(field);

}

} else {

componentsLayout = new VerticalLayout();

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix C: New Features

2012-06-29

115

componentsLayout.setWidth("100%");

for (FormProperty formProperty : this.formProperties) {

Field field = propertyComponents.get(formProperty);

field.setWidth("100%");

componentsLayout.addComponent(field);

}

}

return componentsLayout;

}

/**

*

* @param block xml node describing the block

* @param propertyComponents Map file containing all id's and fields.

* @return a vertical layout with a block of field, rows or columns.

*/

private Component getBlock(Node block,

Map<FormProperty, Field> propertyComponents) {

int dividerCounter = 0;

VerticalLayout layout = new VerticalLayout();

NamedNodeMap blockAttributes = block.getAttributes();

if (blockAttributes.getNamedItem("type").getNodeValue().equals("divider")) {

Node caption = blockAttributes.getNamedItem("caption");

if (caption != null) {

layout.addComponent(getDividerLabel(caption.getNodeValue()));

} else {

layout.addComponent(getDividerLabel(""));

}

dividerCounter++;

}

NodeList rows = block.getChildNodes();

for (int i = 0; i < rows.getLength(); i++) {

Node row = rows.item(i);

if (row.getNodeName().equals("row")) {

Component componentRow = getRow(row, propertyComponents);

if (componentRow != null) {

layout.addComponent(componentRow);

}

} else if (row.getNodeName().equals("field")) {

Component fieldComponent = getField(row, propertyComponents);

if (fieldComponent != null) {

layout.addComponent(fieldComponent);

}

} else if (row.getNodeName().equals("column")) {

Component columnComponent = getColumn(row, propertyComponents);

if (columnComponent != null) {

layout.addComponent(columnComponent);

}

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix C: New Features

2012-06-29

116

} else if (row.getNodeName().equals("divider")) {

Label divider = getDividerLabel(row.getTextContent());

VerticalLayout vl = new VerticalLayout();

vl.addComponent(divider);

vl.setMargin(true, true, false, true);

layout.addComponent(vl);

dividerCounter++;

} else if (row.getNodeName().equals("a")) {

Component link = htmlLink(row);

VerticalLayout vl = new VerticalLayout();

vl.addComponent(link);

vl.setMargin(true, true, false, true);

layout.addComponent(vl);

dividerCounter++;

} else if (row.getNodeName().equals("br")) {

layout.addComponent(getBr());

dividerCounter++;

} else if (row.getNodeName().equals("img")) {

layout.addComponent(new Label(imageLink(row), Label.CONTENT_XHTML));

dividerCounter++;

}

}

if (layout.getComponentCount() > dividerCounter) {

if (blockAttributes.getNamedItem("type").getNodeValue().equals("panel")) {

VerticalLayout vl = new VerticalLayout();

Panel panel = new Panel();

layout.setMargin(true, false, true, false);

panel.setContent(layout);

Node caption = blockAttributes.getNamedItem("caption");

if (caption != null) {

panel.setCaption(caption.getNodeValue());

}

Node style = blockAttributes.getNamedItem("style");

if (style != null) {

panel.addStyleName(style.getNodeValue());

}

vl.addComponent(panel);

return vl;

}

return layout;

}

return null;

}

/**

*

* @param row xml node describing the row

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix C: New Features

2012-06-29

117

* @param propertyComponents Map file containing all id's and fields.

* @return Column of fields in a horizontal layout

*/

private HorizontalLayout getColumn(Node row,

Map<FormProperty, Field> propertyComponents) {

int dividerCounter = 0;

FormLayout formLayout = new FormLayout();

NodeList fields = row.getChildNodes();

for (int i = 0; i < fields.getLength(); i++) {

Node field = fields.item(i);

if (field.getNodeName().equals("field")) {

HorizontalLayout fieldComponent = getField(field, propertyComponents);

if (fieldComponent != null) {

formLayout.addComponent(fieldComponent.getComponent(0));

}

} else if (field.getNodeName().equals("a")) {

formLayout.addComponent(htmlLink(field));

} else if (field.getNodeName().equals("divider")) {

formLayout.addComponent(getDividerLabel(field.getTextContent()));

dividerCounter++;

} else if (field.getNodeName().equals("divider")) {

formLayout.addComponent(getBr());

dividerCounter++;

} else if (field.getNodeName().equals("img")) {

formLayout

.addComponent(new Label(imageLink(field), Label.CONTENT_XHTML));

dividerCounter++;

}

}

if (formLayout.getComponentCount() > dividerCounter) {

HorizontalLayout outerLayout = new HorizontalLayout();

outerLayout.setWidth("100%");

outerLayout.setMargin(false, true, false, true);

outerLayout.addComponent(formLayout);

return outerLayout;

}

return null;

}

/**

*

* @param row xml node describing the row

* @param propertyComponents

* Map file containing all id's and fields.

* @return VAADIN horizontal layout with a row of fields

*/

private HorizontalLayout getRow(Node row,

Map<FormProperty, Field> propertyComponents) {

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix C: New Features

2012-06-29

118

int spaces = 0;

HorizontalLayout rowLayout = new HorizontalLayout();

NamedNodeMap rowAttributes = row.getAttributes();

Node expand = rowAttributes.getNamedItem("expand");

if (expand == null || expand.getNodeValue().equals("true")) {

rowLayout.setSizeFull();

}

NodeList fields = row.getChildNodes();

for (int i = 0; i < fields.getLength(); i++) {

Node field = fields.item(i);

if (field.getNodeName().equals("field")) {

Component fieldComponent = getField(field, propertyComponents);

if (fieldComponent != null) {

rowLayout.addComponent(fieldComponent);

rowLayout

.setComponentAlignment(fieldComponent, Alignment.BOTTOM_LEFT);

}

} else if (field.getNodeName().equals("a")) {

Component link = htmlLink(field);

rowLayout.addComponent(link);

rowLayout.setComponentAlignment(link, Alignment.BOTTOM_LEFT);

} else if (field.getNodeName().equals("space")) {

rowLayout.addComponent(getSpace());

spaces++;

} else if (field.getNodeName().equals("img")) {

rowLayout

.addComponent(new Label(imageLink(field), Label.CONTENT_XHTML));

}

}

if (rowLayout.getComponentCount() > spaces) {

return rowLayout;

}

return null;

}

/**

*

* @param field xml node describing the field

* @param propertyComponents

* Map file containing all id's and fields.

* @return VAADIN field inside a horizontal layout

*/

private HorizontalLayout getField(Node field,

Map<FormProperty, Field> propertyComponents) {

NamedNodeMap fieldAttributes = field.getAttributes();

String id = fieldAttributes.getNamedItem("id").getNodeValue();

Node description = fieldAttributes.getNamedItem("description");

Field componentField = getFieldComponent(propertyComponents, id);

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix C: New Features

2012-06-29

119

if (componentField != null) {

HorizontalLayout componentLayout = new HorizontalLayout();

componentLayout.setSizeFull();

componentLayout.setMargin(false, true, false, true);

if (description != null && !description.getNodeValue().equals("")) {

componentField.setDescription(description.getNodeValue());

}

componentField.setWidth("100%");

componentLayout.addComponent(componentField);

return componentLayout;

}

return null;

}

/**

*

* @param caption label in the divider line

* @return VAADIN Label with the divider

*/

private Label getDividerLabel(String caption) {

if (caption != null && !caption.equals("")) {

StringBuffer sb = new StringBuffer();

sb.append("<table class=\"divider\">");

sb.append("<tr>");

sb.append("<td class=\"startline\"><hr /></td>");

sb.append("<td class=\"caption\">" + caption + "</td>");

sb.append("<td class=\"endline\"><hr /></td>");

sb.append("</tr>");

sb.append("</table>");

return new Label(sb.toString(), Label.CONTENT_XHTML);

}

return new Label("<hr />", Label.CONTENT_XHTML);

}

private Label getSpace() {

return new Label("&nbsp;", Label.CONTENT_XHTML);

}

private Label getBr() {

return new Label("<br />", Label.CONTENT_XHTML);

}

/**

*

* @param propertyComponents Map file containing all id's and fields.

* @param name id of the field to be returned

* @return VAADIN Field

*/

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix C: New Features

2012-06-29

120

private Field getFieldComponent(Map<FormProperty, Field> propertyComponents,

String name) {

for (FormProperty formProperty : propertyComponents.keySet()) {

if (formProperty.getId().equals(name)) {

formProperties.remove(formProperty);

return propertyComponents.get(formProperty);

}

}

return null;

}

/**

*

* @param a xml node describing the link

* @return VAADIN component describing a html link

*/

private Component htmlLink(Node a) {

VerticalLayout vl = new VerticalLayout();

NodeList images = a.getChildNodes();

NamedNodeMap linkAttributes = a.getAttributes();

Node staticLink = linkAttributes.getNamedItem("href");

Node varLink = linkAttributes.getNamedItem("var");

String link = null;

if (staticLink != null) {

link = staticLink.getNodeValue();

} else if (processInstanceId != null && varLink != null) {

String linkVar = varLink.getNodeValue();

if (linkVar != null) {

Object varValue = CloudProcessEngines.getRuntimeService().getVariable(

processInstanceId, varLink.getNodeValue());

if (varValue != null) {

link = varValue.toString();

}

}

}

String tagContent = a.getTextContent();

for (int i = 0; i < images.getLength(); i++) {

Node image = images.item(i);

if (image.getNodeName().endsWith("img")) {

tagContent = imageLink(image);

break;

}

}

vl.addComponent(new Label("<a href=\"" + link + "\" target=\"_blank\">"

+ tagContent + "</a>", Label.CONTENT_XHTML));

return vl;

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix C: New Features

2012-06-29

121

}

/**

*

* @param img xml node describing a html image tag

* @return html image tag

*/

private String imageLink(Node img) {

NamedNodeMap imageAttributes = img.getAttributes();

String src = imageAttributes.getNamedItem("src").getNodeValue();

Node alt = imageAttributes.getNamedItem("alt");

Node height = imageAttributes.getNamedItem("height");

Node width = imageAttributes.getNamedItem("width");

StringBuffer contentBuffer = new StringBuffer("<img src=\"" + src

+ "\" border=0 ");

if (alt != null) {

contentBuffer.append("alt=\"" + alt.getNodeValue() + "\" ");

}

if (height != null) {

contentBuffer.append("height=\"" + height.getNodeValue() + "\" ");

}

if (width != null) {

contentBuffer.append("width=\"" + width.getNodeValue() + "\" ");

}

contentBuffer.append(" />");

return contentBuffer.toString();

}

}

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix D: Improvements and

bug fixes

2012-06-29

122

Appendix D: Improvements and bug fixes Date Field component improvement

74. Changed class org.activiti.explorer.ui.form.DateFormPropertyRenderer

1. Added to method getPropertyField

dateField.setResolution(getResolution(datePattern));

2. Added method getResolution

private int getResolution(String datePattern) {

if(datePattern.contains("S")) {

return PopupDateField.RESOLUTION_MSEC;

} else if(datePattern.contains("s")) {

return PopupDateField.RESOLUTION_SEC;

} else if(datePattern.contains("m")) {

return PopupDateField.RESOLUTION_MIN;

} else if(datePattern.contains("h")) {

return PopupDateField.RESOLUTION_HOUR;

} else if(datePattern.contains("d")) {

return PopupDateField.RESOLUTION_DAY;

} else if(datePattern.contains("M")) {

return PopupDateField.RESOLUTION_MONTH;

} else if(datePattern.contains("y")) {

return PopupDateField.RESOLUTION_YEAR;

}

return PopupDateField.RESOLUTION_MIN;

}

Enum component improvement

Changed class org.activiti.explorer.ui.form.EnumFormPropertyRenderer

◦ Added in method getPropertyField

if(formProperty.isRequired()) {

comboBox.setNullSelectionAllowed(false);

}

Change Panel order on user task page

Changed class org.activiti.explorer.ui.task.TaskDetailPanel

◦ Changed execution order in method init to

initHeader();

initDescriptionAndClaimButton();

initProcessLink();

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix D: Improvements and

bug fixes

2012-06-29

123

initTaskForm();

initRelatedContent();

initParentTaskLink();

initPeopleDetails();

initSubTasks();

Auto Update GUI on task complete

3. Changed class org.activiti.explorer.ui.form.FormPropertiesForm

1. Added in method initListeners

ExplorerApp.get().getViewManager().showInboxPage();

Large Screen support

Changed css styles.css

◦ Deleted line in body segment max-width:1920px;

Increase Visibility of disabled fields

Changed css styles.css

◦ Adding section

.v-app .v-textfield.v-disabled,

.v-app .v-caption.v-disabled,

.v-app .v-textarea.v-disabled,

.v-app .v-checkbox.v-disabled

{

color:black;

opacity:0.5;

}

Boolean Component bug

Changed class org.activiti.explorer.ui.form.BooleanFormPropertyRenderer

◦ Changed method getPropertyField

5. checkBox.setValue(formProperty.getValue());

6. checkBox.setValue(Boolean.valueOf(formProperty.getValue()));

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

124

Appendix E: XML implementation of the supported patterns Pattern 1 – Sequence <?xml version="1.0" encoding="UTF-8"?>

<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:activiti="http://activiti.org/bpmn"

xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"

xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC"

xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI"

typeLanguage="http://www.w3.org/2001/XMLSchema"

expressionLanguage="http://www.w3.org/1999/XPath"

targetNamespace="http://www.activiti.org/patterns">

<process id="Pattern1Sequence" name="Pattern 1 Sequence">

<documentation>Implementation of Pattern 1 Sequence</documentation>

<startEvent id="startevent1" name="Start"

activiti:initiator="initiator"></startEvent>

<userTask id="usertask1" name="Start Task"

activiti:assignee="${initiator}"></userTask>

<userTask id="usertask2" name="Middle Task"

activiti:assignee="${initiator}"></userTask>

<userTask id="usertask3" name="End Task"

activiti:assignee="${initiator}"></userTask>

<endEvent id="endevent1" name="End"></endEvent>

<sequenceFlow id="flow1" name="" sourceRef="startevent1"

targetRef="usertask1"></sequenceFlow>

<sequenceFlow id="flow2" name="" sourceRef="usertask1"

targetRef="usertask2"></sequenceFlow>

<sequenceFlow id="flow3" name="" sourceRef="usertask2"

targetRef="usertask3"></sequenceFlow>

<sequenceFlow id="flow4" name="" sourceRef="usertask3"

targetRef="endevent1"></sequenceFlow>

</process>

<bpmndi:BPMNDiagram id="BPMNDiagram_Pattern1Sequence">

<bpmndi:BPMNPlane bpmnElement="Pattern1Sequence"

id="BPMNPlane_Pattern1Sequence">

<bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">

<omgdc:Bounds height="35" width="35" x="60" y="240"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1">

<omgdc:Bounds height="55" width="105" x="150" y="230"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask2" id="BPMNShape_usertask2">

<omgdc:Bounds height="55" width="105" x="310" y="230"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask3" id="BPMNShape_usertask3">

<omgdc:Bounds height="55" width="105" x="470" y="230"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

125

<omgdc:Bounds height="35" width="35" x="620" y="240"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">

<omgdi:waypoint x="95" y="257"></omgdi:waypoint>

<omgdi:waypoint x="150" y="257"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">

<omgdi:waypoint x="255" y="257"></omgdi:waypoint>

<omgdi:waypoint x="310" y="257"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">

<omgdi:waypoint x="415" y="257"></omgdi:waypoint>

<omgdi:waypoint x="470" y="257"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">

<omgdi:waypoint x="575" y="257"></omgdi:waypoint>

<omgdi:waypoint x="620" y="257"></omgdi:waypoint>

</bpmndi:BPMNEdge>

</bpmndi:BPMNPlane>

</bpmndi:BPMNDiagram>

</definitions>

Pattern 2 – Parallel split <?xml version="1.0" encoding="UTF-8"?>

<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:activiti="http://activiti.org/bpmn"

xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"

xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC"

xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI"

typeLanguage="http://www.w3.org/2001/XMLSchema"

expressionLanguage="http://www.w3.org/1999/XPath"

targetNamespace="http://www.activiti.org/patterns">

<process id="Pattern2ParallelSplit" name="Pattern 2 Parallel Split">

<documentation>Implementation of Pattern 2 Parallel Split</documentation>

<startEvent id="startevent1" name="Start"

activiti:initiator="initiator"></startEvent>

<userTask id="usertask1" name="Start Task"

activiti:assignee="${initiator}"></userTask>

<sequenceFlow id="flow1" name="" sourceRef="startevent1"

targetRef="usertask1"></sequenceFlow>

<sequenceFlow id="flow2" name="" sourceRef="usertask1"

targetRef="parallelgateway1"></sequenceFlow>

<parallelGateway id="parallelgateway1" name="Parallel

Gateway"></parallelGateway>

<userTask id="usertask2" name="Branch 1 Task"

activiti:assignee="${initiator}"></userTask>

<sequenceFlow id="flow3" name="" sourceRef="parallelgateway1"

targetRef="usertask2"></sequenceFlow>

<userTask id="usertask3" name="Branch 2 Task"

activiti:assignee="${initiator}"></userTask>

<sequenceFlow id="flow4" name="" sourceRef="parallelgateway1"

targetRef="usertask3"></sequenceFlow>

<endEvent id="endevent3" name="End"></endEvent>

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

126

<sequenceFlow id="flow5" name="" sourceRef="usertask2"

targetRef="endevent3"></sequenceFlow>

<endEvent id="endevent4" name="End"></endEvent>

<sequenceFlow id="flow6" name="" sourceRef="usertask3"

targetRef="endevent4"></sequenceFlow>

</process>

<bpmndi:BPMNDiagram id="BPMNDiagram_Pattern2ParallelSplit">

<bpmndi:BPMNPlane bpmnElement="Pattern2ParallelSplit"

id="BPMNPlane_Pattern2ParallelSplit">

<bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">

<omgdc:Bounds height="35" width="35" x="73" y="180"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1">

<omgdc:Bounds height="55" width="105" x="153" y="170"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="parallelgateway1"

id="BPMNShape_parallelgateway1">

<omgdc:Bounds height="40" width="40" x="313" y="177"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask2" id="BPMNShape_usertask2">

<omgdc:Bounds height="55" width="105" x="390" y="90"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask3" id="BPMNShape_usertask3">

<omgdc:Bounds height="55" width="105" x="390" y="250"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="endevent3" id="BPMNShape_endevent3">

<omgdc:Bounds height="35" width="35" x="550" y="100"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="endevent4" id="BPMNShape_endevent4">

<omgdc:Bounds height="35" width="35" x="550" y="260"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">

<omgdi:waypoint x="108" y="197"></omgdi:waypoint>

<omgdi:waypoint x="153" y="197"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">

<omgdi:waypoint x="258" y="197"></omgdi:waypoint>

<omgdi:waypoint x="313" y="197"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">

<omgdi:waypoint x="333" y="177"></omgdi:waypoint>

<omgdi:waypoint x="333" y="117"></omgdi:waypoint>

<omgdi:waypoint x="390" y="117"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">

<omgdi:waypoint x="333" y="217"></omgdi:waypoint>

<omgdi:waypoint x="333" y="277"></omgdi:waypoint>

<omgdi:waypoint x="390" y="277"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

127

<omgdi:waypoint x="495" y="117"></omgdi:waypoint>

<omgdi:waypoint x="550" y="117"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">

<omgdi:waypoint x="495" y="277"></omgdi:waypoint>

<omgdi:waypoint x="550" y="277"></omgdi:waypoint>

</bpmndi:BPMNEdge>

</bpmndi:BPMNPlane>

</bpmndi:BPMNDiagram>

</definitions>

Pattern 3 – Synchronization <?xml version="1.0" encoding="UTF-8"?>

<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:activiti="http://activiti.org/bpmn"

xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"

xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC"

xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI"

typeLanguage="http://www.w3.org/2001/XMLSchema"

expressionLanguage="http://www.w3.org/1999/XPath"

targetNamespace="http://www.activiti.org/patterns">

<process id="Pattern3Synchronization" name="Pattern 3 Synchronization">

<documentation>Implementation of Pattern 3 Synchronization</documentation>

<startEvent id="startevent1" name="Start"

activiti:initiator="initiator"></startEvent>

<parallelGateway id="parallelgateway1" name="Parallel

Gateway"></parallelGateway>

<sequenceFlow id="flow1" name="" sourceRef="startevent1"

targetRef="parallelgateway1"></sequenceFlow>

<userTask id="usertask1" name="Branch 1 Task"

activiti:assignee="${initiator}"></userTask>

<sequenceFlow id="flow2" name="" sourceRef="parallelgateway1"

targetRef="usertask1"></sequenceFlow>

<userTask id="usertask2" name="Branch 2 Task"

activiti:assignee="${initiator}"></userTask>

<sequenceFlow id="flow3" name="" sourceRef="parallelgateway1"

targetRef="usertask2"></sequenceFlow>

<sequenceFlow id="flow4" name="" sourceRef="usertask1"

targetRef="parallelgateway2"></sequenceFlow>

<sequenceFlow id="flow5" name="" sourceRef="usertask2"

targetRef="parallelgateway2"></sequenceFlow>

<userTask id="usertask3" name="End Task"

activiti:assignee="${initiator}"></userTask>

<sequenceFlow id="flow6" name="" sourceRef="parallelgateway2"

targetRef="usertask3"></sequenceFlow>

<endEvent id="endevent1" name="End"></endEvent>

<sequenceFlow id="flow7" name="" sourceRef="usertask3"

targetRef="endevent1"></sequenceFlow>

<parallelGateway id="parallelgateway2" name="Parallel

Gateway"></parallelGateway>

</process>

<bpmndi:BPMNDiagram id="BPMNDiagram_Pattern3Synchronization">

<bpmndi:BPMNPlane bpmnElement="Pattern3Synchronization"

id="BPMNPlane_Pattern3Synchronization">

<bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

128

<omgdc:Bounds height="35" width="35" x="45" y="160"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="parallelgateway1"

id="BPMNShape_parallelgateway1">

<omgdc:Bounds height="40" width="40" x="125" y="157"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1">

<omgdc:Bounds height="55" width="105" x="215" y="60"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask2" id="BPMNShape_usertask2">

<omgdc:Bounds height="55" width="105" x="215" y="240"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask3" id="BPMNShape_usertask3">

<omgdc:Bounds height="55" width="105" x="460" y="150"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">

<omgdc:Bounds height="35" width="35" x="620" y="160"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="parallelgateway2"

id="BPMNShape_parallelgateway2">

<omgdc:Bounds height="40" width="40" x="375" y="157"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">

<omgdi:waypoint x="80" y="177"></omgdi:waypoint>

<omgdi:waypoint x="125" y="177"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">

<omgdi:waypoint x="145" y="157"></omgdi:waypoint>

<omgdi:waypoint x="145" y="87"></omgdi:waypoint>

<omgdi:waypoint x="215" y="87"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">

<omgdi:waypoint x="145" y="197"></omgdi:waypoint>

<omgdi:waypoint x="145" y="267"></omgdi:waypoint>

<omgdi:waypoint x="215" y="267"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">

<omgdi:waypoint x="320" y="87"></omgdi:waypoint>

<omgdi:waypoint x="395" y="87"></omgdi:waypoint>

<omgdi:waypoint x="395" y="157"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">

<omgdi:waypoint x="320" y="267"></omgdi:waypoint>

<omgdi:waypoint x="395" y="267"></omgdi:waypoint>

<omgdi:waypoint x="395" y="197"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">

<omgdi:waypoint x="415" y="177"></omgdi:waypoint>

<omgdi:waypoint x="460" y="177"></omgdi:waypoint>

</bpmndi:BPMNEdge>

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

129

<bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7">

<omgdi:waypoint x="565" y="177"></omgdi:waypoint>

<omgdi:waypoint x="620" y="177"></omgdi:waypoint>

</bpmndi:BPMNEdge>

</bpmndi:BPMNPlane>

</bpmndi:BPMNDiagram>

Pattern 4 - Exclusive Choice <?xml version="1.0" encoding="UTF-8"?>

<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:activiti="http://activiti.org/bpmn"

xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"

xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC"

xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI"

typeLanguage="http://www.w3.org/2001/XMLSchema"

expressionLanguage="http://www.w3.org/1999/XPath"

targetNamespace="http://www.activiti.org/patterns">

<process id="Pattern4ExclusiveChoice" name="Pattern 4 Exclusive Choice">

<documentation>Implementation of Pattern 4 Exclusive Choice</documentation>

<startEvent id="startevent1" name="Start"

activiti:initiator="initiator"></startEvent>

<userTask id="usertask1" name="Start Task" activiti:assignee="${initiator}">

<extensionElements>

<activiti:formProperty id="choice" name="Choice" type="enum"

required="true" readable="true" writable="true">

<activiti:value id="1" name="Choice 1"></activiti:value>

<activiti:value id="2" name="Choice 2"></activiti:value>

</activiti:formProperty>

</extensionElements>

</userTask>

<exclusiveGateway id="exclusivegateway1" name="Exclusive Gateway" />

<userTask id="usertask3" name="Choice 1"

activiti:assignee="${initiator}"></userTask>

<userTask id="usertask4" name="Choice 2"

activiti:assignee="${initiator}"></userTask>

<endEvent id="endevent1" name="End"></endEvent>

<endEvent id="endevent2" name="End"></endEvent>

<sequenceFlow id="flow1" name="" sourceRef="startevent1"

targetRef="usertask1"></sequenceFlow>

<sequenceFlow id="flow2" name="" sourceRef="usertask1"

targetRef="exclusivegateway1"></sequenceFlow>

<sequenceFlow id="flow4" name="" sourceRef="exclusivegateway1"

targetRef="usertask3">

<conditionExpression xsi:type="tFormalExpression"><![CDATA[${choice ==

1}]]></conditionExpression>

</sequenceFlow>

<sequenceFlow id="flow5" name="" sourceRef="exclusivegateway1"

targetRef="usertask4">

<conditionExpression xsi:type="tFormalExpression"><![CDATA[${choice !=

1}]]></conditionExpression>

</sequenceFlow>

<sequenceFlow id="flow6" name="" sourceRef="usertask3"

targetRef="endevent1"></sequenceFlow>

<sequenceFlow id="flow7" name="" sourceRef="usertask4"

targetRef="endevent2"></sequenceFlow>

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

130

</process>

<bpmndi:BPMNDiagram id="BPMNDiagram_Pattern4ExclusiveChoice">

<bpmndi:BPMNPlane bpmnElement="Pattern4ExclusiveChoice"

id="BPMNPlane_Pattern4ExclusiveChoice">

<bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">

<omgdc:Bounds height="35" width="35" x="40" y="150"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1">

<omgdc:Bounds height="55" width="105" x="120" y="140"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="exclusivegateway1"

id="BPMNShape_exclusivegateway1">

<omgdc:Bounds height="40" width="40" x="280" y="147"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask3" id="BPMNShape_usertask3">

<omgdc:Bounds height="55" width="105" x="360" y="40"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask4" id="BPMNShape_usertask4">

<omgdc:Bounds height="55" width="105" x="360" y="240"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">

<omgdc:Bounds height="35" width="35" x="500" y="50"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="endevent2" id="BPMNShape_endevent2">

<omgdc:Bounds height="35" width="35" x="500" y="250"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">

<omgdi:waypoint x="75" y="167"></omgdi:waypoint>

<omgdi:waypoint x="120" y="167"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">

<omgdi:waypoint x="225" y="167"></omgdi:waypoint>

<omgdi:waypoint x="280" y="167"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">

<omgdi:waypoint x="300" y="147"></omgdi:waypoint>

<omgdi:waypoint x="300" y="67"></omgdi:waypoint>

<omgdi:waypoint x="360" y="67"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">

<omgdi:waypoint x="300" y="187"></omgdi:waypoint>

<omgdi:waypoint x="300" y="267"></omgdi:waypoint>

<omgdi:waypoint x="360" y="267"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">

<omgdi:waypoint x="465" y="67"></omgdi:waypoint>

<omgdi:waypoint x="500" y="67"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7">

<omgdi:waypoint x="465" y="267"></omgdi:waypoint>

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

131

<omgdi:waypoint x="500" y="267"></omgdi:waypoint>

</bpmndi:BPMNEdge>

</bpmndi:BPMNPlane>

</bpmndi:BPMNDiagram>

</definitions>

Pattern 5 - Simple Merge <?xml version="1.0" encoding="UTF-8"?>

<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:activiti="http://activiti.org/bpmn"

xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"

xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC"

xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI"

typeLanguage="http://www.w3.org/2001/XMLSchema"

expressionLanguage="http://www.w3.org/1999/XPath"

targetNamespace="http://www.activiti.org/patterns">

<process id="Pattern5SimpleMerge" name="Pattern 5 Simple Merge">

<documentation>Implementation of Pattern 5 Simple Merge</documentation>

<startEvent id="startevent1" name="Start"

activiti:initiator="initiator"></startEvent>

<userTask id="usertask1" name="Start Task" activiti:assignee="${initiator}">

<extensionElements>

<activiti:formProperty id="choice" name="choice" type="enum"

required="true" readable="true" writable="true">

<activiti:value id="1" name="Choice 1"></activiti:value>

<activiti:value id="2" name="Choice 2"></activiti:value>

<activiti:value id="3" name="Choice 1 &amp; 2"></activiti:value>

</activiti:formProperty>

</extensionElements>

</userTask>

<sequenceFlow id="flow1" name="" sourceRef="startevent1"

targetRef="usertask1"></sequenceFlow>

<sequenceFlow id="flow2" name="" sourceRef="usertask1"

targetRef="inclusivegateway1"></sequenceFlow>

<userTask id="usertask3" name="Choice 1"

activiti:assignee="${initiator}"></userTask>

<sequenceFlow id="flow4" name="" sourceRef="inclusivegateway1"

targetRef="usertask3">

<conditionExpression xsi:type="tFormalExpression"><![CDATA[${choice == 1

|| choice == 3}]]></conditionExpression>

</sequenceFlow>

<userTask id="usertask4" name="Choice 2"

activiti:assignee="${initiator}"></userTask>

<sequenceFlow id="flow5" name="" sourceRef="inclusivegateway1"

targetRef="usertask4">

<conditionExpression xsi:type="tFormalExpression"><![CDATA[${choice !=

1}]]></conditionExpression>

</sequenceFlow>

<exclusiveGateway id="exclusivegateway2" name="Exclusive

Gateway"></exclusiveGateway>

<sequenceFlow id="flow6" name="" sourceRef="usertask3"

targetRef="exclusivegateway2"></sequenceFlow>

<sequenceFlow id="flow7" name="" sourceRef="usertask4"

targetRef="exclusivegateway2"></sequenceFlow>

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

132

<userTask id="usertask5" name="End Task"

activiti:assignee="${initiator}"></userTask>

<sequenceFlow id="flow8" name="" sourceRef="exclusivegateway2"

targetRef="usertask5"></sequenceFlow>

<endEvent id="endevent1" name="End"></endEvent>

<sequenceFlow id="flow9" name="" sourceRef="usertask5"

targetRef="endevent1"></sequenceFlow>

<inclusiveGateway id="inclusivegateway1" name="Inclusive

Gateway"></inclusiveGateway>

</process>

<bpmndi:BPMNDiagram id="BPMNDiagram_Pattern5SimpleMerge">

<bpmndi:BPMNPlane bpmnElement="Pattern5SimpleMerge"

id="BPMNPlane_Pattern5SimpleMerge">

<bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">

<omgdc:Bounds height="35" width="35" x="50" y="159"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1">

<omgdc:Bounds height="55" width="105" x="130" y="149"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask3" id="BPMNShape_usertask3">

<omgdc:Bounds height="55" width="105" x="380" y="49"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask4" id="BPMNShape_usertask4">

<omgdc:Bounds height="55" width="105" x="380" y="249"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="exclusivegateway2"

id="BPMNShape_exclusivegateway2">

<omgdc:Bounds height="40" width="40" x="523" y="156"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask5" id="BPMNShape_usertask5">

<omgdc:Bounds height="55" width="105" x="608" y="149"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">

<omgdc:Bounds height="35" width="35" x="768" y="159"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="inclusivegateway1"

id="BPMNShape_inclusivegateway1">

<omgdc:Bounds height="40" width="40" x="290" y="156"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">

<omgdi:waypoint x="85" y="176"></omgdi:waypoint>

<omgdi:waypoint x="130" y="176"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">

<omgdi:waypoint x="235" y="176"></omgdi:waypoint>

<omgdi:waypoint x="290" y="176"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">

<omgdi:waypoint x="310" y="156"></omgdi:waypoint>

<omgdi:waypoint x="310" y="76"></omgdi:waypoint>

<omgdi:waypoint x="380" y="76"></omgdi:waypoint>

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

133

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">

<omgdi:waypoint x="310" y="196"></omgdi:waypoint>

<omgdi:waypoint x="310" y="276"></omgdi:waypoint>

<omgdi:waypoint x="380" y="276"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">

<omgdi:waypoint x="485" y="76"></omgdi:waypoint>

<omgdi:waypoint x="543" y="76"></omgdi:waypoint>

<omgdi:waypoint x="543" y="156"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7">

<omgdi:waypoint x="485" y="276"></omgdi:waypoint>

<omgdi:waypoint x="543" y="276"></omgdi:waypoint>

<omgdi:waypoint x="543" y="196"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow8" id="BPMNEdge_flow8">

<omgdi:waypoint x="563" y="176"></omgdi:waypoint>

<omgdi:waypoint x="608" y="176"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow9" id="BPMNEdge_flow9">

<omgdi:waypoint x="713" y="176"></omgdi:waypoint>

<omgdi:waypoint x="768" y="176"></omgdi:waypoint>

</bpmndi:BPMNEdge>

</bpmndi:BPMNPlane>

</bpmndi:BPMNDiagram>

</definitions>

Pattern 6 - Multi-Choice <?xml version="1.0" encoding="UTF-8"?>

<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:activiti="http://activiti.org/bpmn"

xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"

xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC"

xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI"

typeLanguage="http://www.w3.org/2001/XMLSchema"

expressionLanguage="http://www.w3.org/1999/XPath"

targetNamespace="http://www.activiti.org/patterns">

<process id="Pattern6MultiChoice" name="Pattern 6 Multi Choice">

<documentation>Implementation of Pattern 6 Multi Choice</documentation>

<startEvent id="startevent1" name="Start"

activiti:initiator="initiator"></startEvent>

<userTask id="usertask1" name="Choice" activiti:assignee="${initiator}">

<extensionElements>

<activiti:formProperty id="choice" name="Choice" type="enum"

required="true" readable="true" writable="true">

<activiti:value id="1" name="Task 1"></activiti:value>

<activiti:value id="2" name="Task 2"></activiti:value>

<activiti:value id="3" name="Task 1 and 2"></activiti:value>

</activiti:formProperty>

</extensionElements>

</userTask>

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

134

<inclusiveGateway id="inclusivegateway1" name="Inclusive Gateway" />

<userTask id="usertask2" name="Task 1"

activiti:assignee="${initiator}"></userTask>

<userTask id="usertask3" name="Task 2"

activiti:assignee="${initiator}"></userTask>

<endEvent id="endevent1" name="End"></endEvent>

<endEvent id="endevent2" name="End"></endEvent>

<sequenceFlow id="flow1" name="" sourceRef="startevent1"

targetRef="usertask1"></sequenceFlow>

<sequenceFlow id="flow2" name="" sourceRef="usertask1"

targetRef="inclusivegateway1"></sequenceFlow>

<sequenceFlow id="flow3" name="" sourceRef="inclusivegateway1"

targetRef="usertask2">

<conditionExpression xsi:type="tFormalExpression"><![CDATA[${choice == 3

|| choice == 1}]]></conditionExpression>

</sequenceFlow>

<sequenceFlow id="flow4" name="" sourceRef="inclusivegateway1"

targetRef="usertask3">

<conditionExpression xsi:type="tFormalExpression"><![CDATA[${choice !=

1}]]></conditionExpression>

</sequenceFlow>

<sequenceFlow id="flow5" name="" sourceRef="usertask2"

targetRef="endevent1"></sequenceFlow>

<sequenceFlow id="flow6" name="" sourceRef="usertask3"

targetRef="endevent2"></sequenceFlow>

</process>

<bpmndi:BPMNDiagram id="BPMNDiagram_Pattern6MultiChoice">

<bpmndi:BPMNPlane bpmnElement="Pattern6MultiChoice"

id="BPMNPlane_Pattern6MultiChoice">

<bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">

<omgdc:Bounds height="35" width="35" x="30" y="140"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1">

<omgdc:Bounds height="55" width="105" x="110" y="130"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="inclusivegateway1"

id="BPMNShape_inclusivegateway1">

<omgdc:Bounds height="40" width="40" x="270" y="137"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask2" id="BPMNShape_usertask2">

<omgdc:Bounds height="55" width="105" x="350" y="30"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask3" id="BPMNShape_usertask3">

<omgdc:Bounds height="55" width="105" x="350" y="240"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">

<omgdc:Bounds height="35" width="35" x="510" y="40"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="endevent2" id="BPMNShape_endevent2">

<omgdc:Bounds height="35" width="35" x="510" y="250"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">

<omgdi:waypoint x="65" y="157"></omgdi:waypoint>

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

135

<omgdi:waypoint x="110" y="157"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">

<omgdi:waypoint x="215" y="157"></omgdi:waypoint>

<omgdi:waypoint x="270" y="157"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">

<omgdi:waypoint x="290" y="137"></omgdi:waypoint>

<omgdi:waypoint x="290" y="57"></omgdi:waypoint>

<omgdi:waypoint x="350" y="57"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">

<omgdi:waypoint x="290" y="177"></omgdi:waypoint>

<omgdi:waypoint x="290" y="267"></omgdi:waypoint>

<omgdi:waypoint x="350" y="267"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">

<omgdi:waypoint x="455" y="57"></omgdi:waypoint>

<omgdi:waypoint x="510" y="57"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">

<omgdi:waypoint x="455" y="267"></omgdi:waypoint>

<omgdi:waypoint x="510" y="267"></omgdi:waypoint>

</bpmndi:BPMNEdge>

</bpmndi:BPMNPlane>

</bpmndi:BPMNDiagram>

</definitions>

Pattern 7 - Structured Synchronizing Merge <?xml version="1.0" encoding="UTF-8"?>

<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:activiti="http://activiti.org/bpmn"

xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"

xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC"

xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI"

typeLanguage="http://www.w3.org/2001/XMLSchema"

expressionLanguage="http://www.w3.org/1999/XPath"

targetNamespace="http://www.activiti.org/patterns">

<process id="Pattern7StructuredSynchronizingMerge" name="Pattern 7 Structured

Synchronizing Merge">

<documentation>Implementation of Pattern 7 Structured Synchronizing

Merge</documentation>

<startEvent id="startevent1" name="Start"

activiti:initiator="initiator"></startEvent>

<userTask id="usertask1" name="Choice" activiti:assignee="${initiator}">

<extensionElements>

<activiti:formProperty id="choice" name="Choice" type="enum"

required="true" readable="true" writable="true">

<activiti:value id="1" name="Task 1"></activiti:value>

<activiti:value id="2" name="Task 2"></activiti:value>

<activiti:value id="3" name="Task 1 &amp; 2"></activiti:value>

</activiti:formProperty>

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

136

</extensionElements>

</userTask>

<sequenceFlow id="flow1" name="" sourceRef="startevent1"

targetRef="usertask1"></sequenceFlow>

<inclusiveGateway id="inclusivegateway1" name="Inclusive

Gateway"></inclusiveGateway>

<sequenceFlow id="flow2" name="" sourceRef="usertask1"

targetRef="inclusivegateway1"></sequenceFlow>

<userTask id="usertask2" name="Task 1"

activiti:assignee="${initiator}"></userTask>

<sequenceFlow id="flow3" name="" sourceRef="inclusivegateway1"

targetRef="usertask2">

<conditionExpression xsi:type="tFormalExpression"><![CDATA[${choice == 1

|| choice == 3}]]></conditionExpression>

</sequenceFlow>

<userTask id="usertask3" name="Task 2"

activiti:assignee="${initiator}"></userTask>

<sequenceFlow id="flow4" name="" sourceRef="inclusivegateway1"

targetRef="usertask3">

<conditionExpression xsi:type="tFormalExpression"><![CDATA[${choice !=

1}]]></conditionExpression>

</sequenceFlow>

<sequenceFlow id="flow5" name="" sourceRef="usertask3"

targetRef="inclusivegateway2"></sequenceFlow>

<sequenceFlow id="flow6" name="" sourceRef="usertask2"

targetRef="inclusivegateway2"></sequenceFlow>

<userTask id="usertask4" name="End Task"

activiti:assignee="${initiator}"></userTask>

<sequenceFlow id="flow7" name="" sourceRef="inclusivegateway2"

targetRef="usertask4"></sequenceFlow>

<endEvent id="endevent1" name="End"></endEvent>

<sequenceFlow id="flow8" name="" sourceRef="usertask4"

targetRef="endevent1"></sequenceFlow>

<inclusiveGateway id="inclusivegateway2" name="Inclusive

Gateway"></inclusiveGateway>

</process>

<bpmndi:BPMNDiagram id="BPMNDiagram_Pattern7StructuredSynchronizingMerge">

<bpmndi:BPMNPlane bpmnElement="Pattern7StructuredSynchronizingMerge"

id="BPMNPlane_Pattern7StructuredSynchronizingMerge">

<bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">

<omgdc:Bounds height="35" width="35" x="60" y="150"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1">

<omgdc:Bounds height="55" width="105" x="140" y="140"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="inclusivegateway1"

id="BPMNShape_inclusivegateway1">

<omgdc:Bounds height="40" width="40" x="300" y="147"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask2" id="BPMNShape_usertask2">

<omgdc:Bounds height="55" width="105" x="380" y="40"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask3" id="BPMNShape_usertask3">

<omgdc:Bounds height="55" width="105" x="380" y="250"></omgdc:Bounds>

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

137

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask4" id="BPMNShape_usertask4">

<omgdc:Bounds height="55" width="105" x="605" y="140"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">

<omgdc:Bounds height="35" width="35" x="765" y="150"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="inclusivegateway2"

id="BPMNShape_inclusivegateway2">

<omgdc:Bounds height="40" width="40" x="520" y="147"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">

<omgdi:waypoint x="95" y="167"></omgdi:waypoint>

<omgdi:waypoint x="140" y="167"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">

<omgdi:waypoint x="245" y="167"></omgdi:waypoint>

<omgdi:waypoint x="300" y="167"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">

<omgdi:waypoint x="320" y="147"></omgdi:waypoint>

<omgdi:waypoint x="320" y="67"></omgdi:waypoint>

<omgdi:waypoint x="380" y="67"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">

<omgdi:waypoint x="320" y="187"></omgdi:waypoint>

<omgdi:waypoint x="320" y="277"></omgdi:waypoint>

<omgdi:waypoint x="380" y="277"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">

<omgdi:waypoint x="485" y="277"></omgdi:waypoint>

<omgdi:waypoint x="540" y="277"></omgdi:waypoint>

<omgdi:waypoint x="540" y="187"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">

<omgdi:waypoint x="485" y="67"></omgdi:waypoint>

<omgdi:waypoint x="540" y="67"></omgdi:waypoint>

<omgdi:waypoint x="540" y="147"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7">

<omgdi:waypoint x="560" y="167"></omgdi:waypoint>

<omgdi:waypoint x="605" y="167"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow8" id="BPMNEdge_flow8">

<omgdi:waypoint x="710" y="167"></omgdi:waypoint>

<omgdi:waypoint x="765" y="167"></omgdi:waypoint>

</bpmndi:BPMNEdge>

</bpmndi:BPMNPlane>

</bpmndi:BPMNDiagram>

</definitions>

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

138

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

<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:activiti="http://activiti.org/bpmn"

xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"

xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC"

xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI"

typeLanguage="http://www.w3.org/2001/XMLSchema"

expressionLanguage="http://www.w3.org/1999/XPath"

targetNamespace="http://www.activiti.org/patterns">

<process id="Pattern8MultiMerge" name="Pattern 8 Multi Merge">

<documentation>Implementation of Pattern 8 Multi Merge</documentation>

<startEvent id="startevent1" name="Start"

activiti:initiator="initiator"></startEvent>

<userTask id="usertask1" name="Choice" activiti:assignee="${initiator}">

<extensionElements>

<activiti:formProperty id="choice" name="Choice" type="enum"

required="true" readable="true" writable="true">

<activiti:value id="1" name="Task 1"></activiti:value>

<activiti:value id="2" name="Task 2"></activiti:value>

<activiti:value id="3" name="Task 1 &amp; 2"></activiti:value>

</activiti:formProperty>

</extensionElements>

</userTask>

<sequenceFlow id="flow1" name="" sourceRef="startevent1"

targetRef="usertask1"></sequenceFlow>

<inclusiveGateway id="inclusivegateway1" name="Inclusive

Gateway"></inclusiveGateway>

<sequenceFlow id="flow2" name="" sourceRef="usertask1"

targetRef="inclusivegateway1"></sequenceFlow>

<userTask id="usertask2" name="Task 1"

activiti:assignee="${initiator}"></userTask>

<sequenceFlow id="flow3" name="" sourceRef="inclusivegateway1"

targetRef="usertask2">

<conditionExpression xsi:type="tFormalExpression"><![CDATA[${choice == 1

|| choice == 3}]]></conditionExpression>

</sequenceFlow>

<userTask id="usertask3" name="Task 2"

activiti:assignee="${initiator}"></userTask>

<sequenceFlow id="flow4" name="" sourceRef="inclusivegateway1"

targetRef="usertask3">

<conditionExpression xsi:type="tFormalExpression"><![CDATA[${choice !=

1}]]></conditionExpression>

</sequenceFlow>

<sequenceFlow id="flow5" name="" sourceRef="usertask3"

targetRef="exclusivegateway1"></sequenceFlow>

<sequenceFlow id="flow6" name="" sourceRef="usertask2"

targetRef="exclusivegateway1"></sequenceFlow>

<userTask id="usertask4" name="End Task"

activiti:assignee="${initiator}"></userTask>

<sequenceFlow id="flow7" name="" sourceRef="exclusivegateway1"

targetRef="usertask4"></sequenceFlow>

<endEvent id="endevent1" name="End"></endEvent>

<sequenceFlow id="flow8" name="" sourceRef="usertask4"

targetRef="endevent1"></sequenceFlow>

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

139

<exclusiveGateway id="exclusivegateway1" name="Exclusive

Gateway"></exclusiveGateway>

</process>

<bpmndi:BPMNDiagram id="BPMNDiagram_Pattern8MultiMerge">

<bpmndi:BPMNPlane bpmnElement="Pattern8MultiMerge"

id="BPMNPlane_Pattern8MultiMerge">

<bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">

<omgdc:Bounds height="35" width="35" x="60" y="150"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1">

<omgdc:Bounds height="55" width="105" x="140" y="140"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="inclusivegateway1"

id="BPMNShape_inclusivegateway1">

<omgdc:Bounds height="40" width="40" x="300" y="147"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask2" id="BPMNShape_usertask2">

<omgdc:Bounds height="55" width="105" x="380" y="40"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask3" id="BPMNShape_usertask3">

<omgdc:Bounds height="55" width="105" x="380" y="250"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask4" id="BPMNShape_usertask4">

<omgdc:Bounds height="55" width="105" x="605" y="140"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">

<omgdc:Bounds height="35" width="35" x="765" y="150"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="exclusivegateway1"

id="BPMNShape_exclusivegateway1">

<omgdc:Bounds height="40" width="40" x="520" y="147"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">

<omgdi:waypoint x="95" y="167"></omgdi:waypoint>

<omgdi:waypoint x="140" y="167"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">

<omgdi:waypoint x="245" y="167"></omgdi:waypoint>

<omgdi:waypoint x="300" y="167"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">

<omgdi:waypoint x="320" y="147"></omgdi:waypoint>

<omgdi:waypoint x="320" y="67"></omgdi:waypoint>

<omgdi:waypoint x="380" y="67"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">

<omgdi:waypoint x="320" y="187"></omgdi:waypoint>

<omgdi:waypoint x="320" y="277"></omgdi:waypoint>

<omgdi:waypoint x="380" y="277"></omgdi:waypoint>

</bpmndi:BPMNEdge>

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

140

<bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">

<omgdi:waypoint x="485" y="277"></omgdi:waypoint>

<omgdi:waypoint x="540" y="277"></omgdi:waypoint>

<omgdi:waypoint x="540" y="187"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">

<omgdi:waypoint x="485" y="67"></omgdi:waypoint>

<omgdi:waypoint x="540" y="67"></omgdi:waypoint>

<omgdi:waypoint x="540" y="147"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7">

<omgdi:waypoint x="560" y="167"></omgdi:waypoint>

<omgdi:waypoint x="605" y="167"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow8" id="BPMNEdge_flow8">

<omgdi:waypoint x="710" y="167"></omgdi:waypoint>

<omgdi:waypoint x="765" y="167"></omgdi:waypoint>

</bpmndi:BPMNEdge>

</bpmndi:BPMNPlane>

</bpmndi:BPMNDiagram>

</definitions>

Pattern 10 – Arbitrary Cycles <?xml version="1.0" encoding="UTF-8"?>

<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:activiti="http://activiti.org/bpmn"

xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"

xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC"

xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI"

typeLanguage="http://www.w3.org/2001/XMLSchema"

expressionLanguage="http://www.w3.org/1999/XPath"

targetNamespace="http://www.activiti.org/patterns">

<process id="Pattern10ArbitraryCycles" name="Pattern 10 Arbitrary Cycles">

<documentation>Implementation of Pattern 10 Arbitrary Cycles</documentation>

<startEvent id="startevent1" name="Start"

activiti:initiator="initiator"></startEvent>

<userTask id="usertask1" name="Start Task"

activiti:assignee="${initiator}"></userTask>

<exclusiveGateway id="exclusivegateway1" name="Exclusive

Gateway"></exclusiveGateway>

<sequenceFlow id="flow2" name="" sourceRef="usertask1"

targetRef="exclusivegateway1"></sequenceFlow>

<userTask id="usertask2" name="Task 1"

activiti:assignee="${initiator}"></userTask>

<sequenceFlow id="flow3" name="" sourceRef="exclusivegateway1"

targetRef="usertask2"></sequenceFlow>

<exclusiveGateway id="exclusivegateway2" name="Exclusive

Gateway"></exclusiveGateway>

<sequenceFlow id="flow4" name="" sourceRef="usertask2"

targetRef="exclusivegateway2"></sequenceFlow>

<userTask id="usertask3" name="Choice 1" activiti:assignee="${initiator}">

<extensionElements>

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

141

<activiti:formProperty id="goback" name="Go back to task 2"

type="boolean" required="true" readable="true"

writable="true"></activiti:formProperty>

</extensionElements>

</userTask>

<sequenceFlow id="flow5" name="" sourceRef="exclusivegateway2"

targetRef="usertask3"></sequenceFlow>

<exclusiveGateway id="exclusivegateway3" name="Exclusive

Gateway"></exclusiveGateway>

<sequenceFlow id="flow6" name="" sourceRef="usertask3"

targetRef="exclusivegateway3"></sequenceFlow>

<userTask id="usertask4" name="Choice 2" activiti:assignee="${initiator}">

<extensionElements>

<activiti:formProperty id="goback" name="Go back to task 3"

type="boolean" required="true" readable="true"

writable="true"></activiti:formProperty>

</extensionElements>

</userTask>

<sequenceFlow id="flow7" name="" sourceRef="exclusivegateway3"

targetRef="usertask4">

<conditionExpression

xsi:type="tFormalExpression"><![CDATA[${!goback}]]></conditionExpression>

</sequenceFlow>

<exclusiveGateway id="exclusivegateway4" name="Exclusive

Gateway"></exclusiveGateway>

<sequenceFlow id="flow8" name="" sourceRef="usertask4"

targetRef="exclusivegateway4"></sequenceFlow>

<userTask id="usertask5" name="End Task"

activiti:assignee="${initiator}"></userTask>

<sequenceFlow id="flow9" name="" sourceRef="exclusivegateway4"

targetRef="usertask5">

<conditionExpression

xsi:type="tFormalExpression"><![CDATA[${!goback}]]></conditionExpression>

</sequenceFlow>

<endEvent id="endevent1" name="End"></endEvent>

<sequenceFlow id="flow10" name="" sourceRef="usertask5"

targetRef="endevent1"></sequenceFlow>

<userTask id="usertask6" name="Choice" activiti:assignee="${initiator}">

<extensionElements>

<activiti:formProperty id="choice" name="Choice" type="enum"

required="true" readable="true" writable="true">

<activiti:value id="1" name="Start Task"></activiti:value>

<activiti:value id="2" name="Choice 1"></activiti:value>

</activiti:formProperty>

</extensionElements>

</userTask>

<sequenceFlow id="flow13" name="" sourceRef="startevent1"

targetRef="usertask6"></sequenceFlow>

<exclusiveGateway id="exclusivegateway5" name="Exclusive

Gateway"></exclusiveGateway>

<sequenceFlow id="flow14" name="" sourceRef="usertask6"

targetRef="exclusivegateway5"></sequenceFlow>

<sequenceFlow id="flow15" name="" sourceRef="exclusivegateway5"

targetRef="usertask1">

<conditionExpression xsi:type="tFormalExpression"><![CDATA[${choice ==

1}]]></conditionExpression>

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

142

</sequenceFlow>

<sequenceFlow id="flow16" name="" sourceRef="exclusivegateway5"

targetRef="exclusivegateway2">

<conditionExpression xsi:type="tFormalExpression"><![CDATA[${choice ==

2}]]></conditionExpression>

</sequenceFlow>

<sequenceFlow id="flow17" name="" sourceRef="exclusivegateway4"

targetRef="exclusivegateway2">

<conditionExpression

xsi:type="tFormalExpression"><![CDATA[${goback}]]></conditionExpression>

</sequenceFlow>

<sequenceFlow id="flow18" name="" sourceRef="exclusivegateway3"

targetRef="exclusivegateway1">

<conditionExpression

xsi:type="tFormalExpression"><![CDATA[${goback}]]></conditionExpression>

</sequenceFlow>

</process>

<bpmndi:BPMNDiagram id="BPMNDiagram_Pattern10ArbitraryCycles">

<bpmndi:BPMNPlane bpmnElement="Pattern10ArbitraryCycles"

id="BPMNPlane_Pattern10ArbitraryCycles">

<bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">

<omgdc:Bounds height="35" width="35" x="65" y="220"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1">

<omgdc:Bounds height="55" width="105" x="425" y="100"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="exclusivegateway1"

id="BPMNShape_exclusivegateway1">

<omgdc:Bounds height="40" width="40" x="585" y="107"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask2" id="BPMNShape_usertask2">

<omgdc:Bounds height="55" width="105" x="670" y="100"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="exclusivegateway2"

id="BPMNShape_exclusivegateway2">

<omgdc:Bounds height="40" width="40" x="830" y="107"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask3" id="BPMNShape_usertask3">

<omgdc:Bounds height="55" width="105" x="915" y="100"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="exclusivegateway3"

id="BPMNShape_exclusivegateway3">

<omgdc:Bounds height="40" width="40" x="1075" y="107"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask4" id="BPMNShape_usertask4">

<omgdc:Bounds height="55" width="105" x="1160" y="100"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="exclusivegateway4"

id="BPMNShape_exclusivegateway4">

<omgdc:Bounds height="40" width="40" x="1320" y="107"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask5" id="BPMNShape_usertask5">

<omgdc:Bounds height="55" width="105" x="1405" y="100"></omgdc:Bounds>

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

143

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">

<omgdc:Bounds height="35" width="35" x="1565" y="110"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask6" id="BPMNShape_usertask6">

<omgdc:Bounds height="55" width="105" x="145" y="210"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="exclusivegateway5"

id="BPMNShape_exclusivegateway5">

<omgdc:Bounds height="40" width="40" x="305" y="217"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">

<omgdi:waypoint x="530" y="127"></omgdi:waypoint>

<omgdi:waypoint x="585" y="127"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">

<omgdi:waypoint x="625" y="127"></omgdi:waypoint>

<omgdi:waypoint x="670" y="127"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">

<omgdi:waypoint x="775" y="127"></omgdi:waypoint>

<omgdi:waypoint x="830" y="127"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">

<omgdi:waypoint x="870" y="127"></omgdi:waypoint>

<omgdi:waypoint x="915" y="127"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">

<omgdi:waypoint x="1020" y="127"></omgdi:waypoint>

<omgdi:waypoint x="1075" y="127"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7">

<omgdi:waypoint x="1115" y="127"></omgdi:waypoint>

<omgdi:waypoint x="1160" y="127"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow8" id="BPMNEdge_flow8">

<omgdi:waypoint x="1265" y="127"></omgdi:waypoint>

<omgdi:waypoint x="1320" y="127"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow9" id="BPMNEdge_flow9">

<omgdi:waypoint x="1360" y="127"></omgdi:waypoint>

<omgdi:waypoint x="1405" y="127"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow10" id="BPMNEdge_flow10">

<omgdi:waypoint x="1510" y="127"></omgdi:waypoint>

<omgdi:waypoint x="1565" y="127"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow13" id="BPMNEdge_flow13">

<omgdi:waypoint x="100" y="237"></omgdi:waypoint>

<omgdi:waypoint x="145" y="237"></omgdi:waypoint>

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

144

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow14" id="BPMNEdge_flow14">

<omgdi:waypoint x="250" y="237"></omgdi:waypoint>

<omgdi:waypoint x="305" y="237"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow15" id="BPMNEdge_flow15">

<omgdi:waypoint x="325" y="217"></omgdi:waypoint>

<omgdi:waypoint x="325" y="127"></omgdi:waypoint>

<omgdi:waypoint x="425" y="127"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow16" id="BPMNEdge_flow16">

<omgdi:waypoint x="345" y="237"></omgdi:waypoint>

<omgdi:waypoint x="850" y="237"></omgdi:waypoint>

<omgdi:waypoint x="850" y="147"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow17" id="BPMNEdge_flow17">

<omgdi:waypoint x="1340" y="147"></omgdi:waypoint>

<omgdi:waypoint x="1340" y="237"></omgdi:waypoint>

<omgdi:waypoint x="850" y="237"></omgdi:waypoint>

<omgdi:waypoint x="850" y="147"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow18" id="BPMNEdge_flow18">

<omgdi:waypoint x="1095" y="107"></omgdi:waypoint>

<omgdi:waypoint x="1095" y="24"></omgdi:waypoint>

<omgdi:waypoint x="850" y="24"></omgdi:waypoint>

<omgdi:waypoint x="605" y="24"></omgdi:waypoint>

<omgdi:waypoint x="605" y="107"></omgdi:waypoint>

</bpmndi:BPMNEdge>

</bpmndi:BPMNPlane>

</bpmndi:BPMNDiagram>

</definitions>

Pattern 11 - Implicit Termination <?xml version="1.0" encoding="UTF-8"?>

<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:activiti="http://activiti.org/bpmn"

xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"

xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC"

xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI"

typeLanguage="http://www.w3.org/2001/XMLSchema"

expressionLanguage="http://www.w3.org/1999/XPath"

targetNamespace="http://www.activiti.org/patterns">

<process id="Pattern11ImplicitTermination" name="Pattern 11 Implicit

Termination">

<documentation>Implementation of Pattern 11 Implicit

Termination</documentation>

<startEvent id="startevent1" name="Start"

activiti:initiator="initiator"></startEvent>

<userTask id="usertask1" name="Start Task"

activiti:assignee="${initiator}"></userTask>

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

145

<sequenceFlow id="flow1" name="" sourceRef="startevent1"

targetRef="usertask1"></sequenceFlow>

<parallelGateway id="parallelgateway1" name="Parallel

Gateway"></parallelGateway>

<sequenceFlow id="flow2" name="" sourceRef="usertask1"

targetRef="parallelgateway1"></sequenceFlow>

<userTask id="usertask2" name="Branch 1 Task 1"

activiti:assignee="${initiator}"></userTask>

<sequenceFlow id="flow3" name="" sourceRef="parallelgateway1"

targetRef="usertask2"></sequenceFlow>

<userTask id="usertask3" name="Branch 2 Task 1"

activiti:assignee="${initiator}"></userTask>

<sequenceFlow id="flow4" name="" sourceRef="parallelgateway1"

targetRef="usertask3"></sequenceFlow>

<userTask id="usertask4" name="Branch 1 Task 2"

activiti:assignee="${initiator}"></userTask>

<sequenceFlow id="flow5" name="" sourceRef="usertask2"

targetRef="usertask4"></sequenceFlow>

<userTask id="usertask5" name="Branch 2 Task 2"

activiti:assignee="${initiator}"></userTask>

<sequenceFlow id="flow6" name="" sourceRef="usertask3"

targetRef="usertask5"></sequenceFlow>

<endEvent id="endevent1" name="End"></endEvent>

<sequenceFlow id="flow7" name="" sourceRef="usertask5"

targetRef="endevent1"></sequenceFlow>

<endEvent id="endevent2" name="End"></endEvent>

<sequenceFlow id="flow8" name="" sourceRef="usertask4"

targetRef="endevent2"></sequenceFlow>

</process>

<bpmndi:BPMNDiagram id="BPMNDiagram_Pattern11ImplicitTermination">

<bpmndi:BPMNPlane bpmnElement="Pattern11ImplicitTermination"

id="BPMNPlane_Pattern11ImplicitTermination">

<bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">

<omgdc:Bounds height="35" width="35" x="50" y="180"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1">

<omgdc:Bounds height="55" width="105" x="140" y="170"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="parallelgateway1"

id="BPMNShape_parallelgateway1">

<omgdc:Bounds height="40" width="40" x="290" y="177"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask2" id="BPMNShape_usertask2">

<omgdc:Bounds height="55" width="105" x="361" y="60"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask3" id="BPMNShape_usertask3">

<omgdc:Bounds height="55" width="105" x="361" y="280"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask4" id="BPMNShape_usertask4">

<omgdc:Bounds height="55" width="105" x="521" y="60"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask5" id="BPMNShape_usertask5">

<omgdc:Bounds height="55" width="105" x="521" y="280"></omgdc:Bounds>

</bpmndi:BPMNShape>

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

146

<bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">

<omgdc:Bounds height="35" width="35" x="681" y="290"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="endevent2" id="BPMNShape_endevent2">

<omgdc:Bounds height="35" width="35" x="681" y="70"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">

<omgdi:waypoint x="85" y="197"></omgdi:waypoint>

<omgdi:waypoint x="140" y="197"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">

<omgdi:waypoint x="245" y="197"></omgdi:waypoint>

<omgdi:waypoint x="290" y="197"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">

<omgdi:waypoint x="310" y="177"></omgdi:waypoint>

<omgdi:waypoint x="308" y="87"></omgdi:waypoint>

<omgdi:waypoint x="361" y="87"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">

<omgdi:waypoint x="310" y="217"></omgdi:waypoint>

<omgdi:waypoint x="310" y="306"></omgdi:waypoint>

<omgdi:waypoint x="361" y="307"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">

<omgdi:waypoint x="466" y="87"></omgdi:waypoint>

<omgdi:waypoint x="521" y="87"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">

<omgdi:waypoint x="466" y="307"></omgdi:waypoint>

<omgdi:waypoint x="521" y="307"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7">

<omgdi:waypoint x="626" y="307"></omgdi:waypoint>

<omgdi:waypoint x="681" y="307"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow8" id="BPMNEdge_flow8">

<omgdi:waypoint x="626" y="87"></omgdi:waypoint>

<omgdi:waypoint x="681" y="87"></omgdi:waypoint>

</bpmndi:BPMNEdge>

</bpmndi:BPMNPlane>

</bpmndi:BPMNDiagram>

</definitions>

Pattern 12 - Multiple Instances without Synchronization <?xml version="1.0" encoding="UTF-8"?>

<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:activiti="http://activiti.org/bpmn"

xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"

xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC"

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

147

xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLan-

guage="http://www.w3.org/2001/XMLSchema" expressionLan-

guage="http://www.w3.org/1999/XPath" target-

Namespace="http://www.activiti.org/patterns">

<process id="Pattern12MultipleInstancesWithoutSynchronization" name="Pattern

12 Multiple Instances without Synchronization">

<documentation>Implementation of Pattern 12 Multiple Instances without

Synchronization</documentation>

<startEvent id="startevent1" name="Start" activi-

ti:initiator="initiator"></startEvent>

<userTask id="usertask1" name="Start Task" activi-

ti:assignee="${initiator}"></userTask>

<userTask id="usertask3" name="End Task" activi-

ti:assignee="${initiator}"></userTask>

<endEvent id="endevent1" name="End"></endEvent>

<userTask id="usertask4" name="Multiple Tasks" activi-

ti:assignee="${initiator}">

<multiInstanceLoopCharacteristics isSequential="false">

<loopCardinality>3</loopCardinality>

</multiInstanceLoopCharacteristics>

</userTask>

<endEvent id="endevent2" name="End"></endEvent>

<sequenceFlow id="flow1" name="" sourceRef="startevent1" tar-

getRef="usertask1"></sequenceFlow>

<sequenceFlow id="flow4" name="" sourceRef="usertask3" tar-

getRef="endevent1"></sequenceFlow>

<sequenceFlow id="flow8" name="" sourceRef="usertask4" tar-

getRef="endevent2"></sequenceFlow>

<sequenceFlow id="flow9" name="" sourceRef="usertask1" tar-

getRef="parallelgateway1"></sequenceFlow>

<parallelGateway id="parallelgateway1" name="Exclusive Gate-

way"></parallelGateway>

<sequenceFlow id="flow10" name="" sourceRef="parallelgateway1" tar-

getRef="usertask3"></sequenceFlow>

<sequenceFlow id="flow11" name="" sourceRef="parallelgateway1" tar-

getRef="usertask4"></sequenceFlow>

</process>

<bpmndi:BPMNDiagram

id="BPMNDiagram_Pattern12MultipleInstancesWithoutSynchronization">

<bpmndi:BPMNPlane bpmnEle-

ment="Pattern12MultipleInstancesWithoutSynchronization"

id="BPMNPlane_Pattern12MultipleInstancesWithoutSynchronization">

<bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">

<omgdc:Bounds height="35" width="35" x="40" y="320"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1">

<omgdc:Bounds height="55" width="105" x="140" y="310"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask3" id="BPMNShape_usertask3">

<omgdc:Bounds height="55" width="105" x="430" y="310"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">

<omgdc:Bounds height="35" width="35" x="600" y="320"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask4" id="BPMNShape_usertask4">

<omgdc:Bounds height="55" width="105" x="288" y="200"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="endevent2" id="BPMNShape_endevent2">

<omgdc:Bounds height="35" width="35" x="600" y="210"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="parallelgateway1"

id="BPMNShape_parallelgateway1">

<omgdc:Bounds height="40" width="40" x="320" y="317"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">

<omgdi:waypoint x="75" y="337"></omgdi:waypoint>

<omgdi:waypoint x="140" y="337"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">

<omgdi:waypoint x="535" y="337"></omgdi:waypoint>

<omgdi:waypoint x="600" y="337"></omgdi:waypoint>

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

148

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow8" id="BPMNEdge_flow8">

<omgdi:waypoint x="393" y="227"></omgdi:waypoint>

<omgdi:waypoint x="600" y="227"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow9" id="BPMNEdge_flow9">

<omgdi:waypoint x="245" y="337"></omgdi:waypoint>

<omgdi:waypoint x="320" y="337"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow10" id="BPMNEdge_flow10">

<omgdi:waypoint x="360" y="337"></omgdi:waypoint>

<omgdi:waypoint x="430" y="337"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow11" id="BPMNEdge_flow11">

<omgdi:waypoint x="340" y="317"></omgdi:waypoint>

<omgdi:waypoint x="340" y="255"></omgdi:waypoint>

</bpmndi:BPMNEdge>

</bpmndi:BPMNPlane>

</bpmndi:BPMNDiagram>

</definitions>

Pattern 13 - Multiple Instances with a priori Design-Time Knowledge <?xml version="1.0" encoding="UTF-8"?>

<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:activiti="http://activiti.org/bpmn"

xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"

xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC"

xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI"

typeLanguage="http://www.w3.org/2001/XMLSchema"

expressionLanguage="http://www.w3.org/1999/XPath"

targetNamespace="http://www.activiti.org/patterns">

<process id="Pattern13MultipleInstancesWithAPrioriDesign-TimeKnowledge"

name="Pattern 13 Multiple Instances with a priori Design-Time Knowledge">

<documentation>Implementation of Pattern 13 Multiple Instances with a priori

Design-Time Knowledge</documentation>

<startEvent id="startevent1" name="Start"

activiti:initiator="initiator"></startEvent>

<userTask id="usertask1" name="Start Task"

activiti:assignee="${initiator}"></userTask>

<sequenceFlow id="flow1" name="" sourceRef="startevent1"

targetRef="usertask1"></sequenceFlow>

<userTask id="usertask2" name="Multiple Tasks"

activiti:assignee="${initiator}">

<multiInstanceLoopCharacteristics isSequential="false">

<loopCardinality>3</loopCardinality>

<completionCondition>${nrOfActiveInstances == 0}</completionCondition>

</multiInstanceLoopCharacteristics>

</userTask>

<sequenceFlow id="flow2" name="" sourceRef="usertask1"

targetRef="usertask2"></sequenceFlow>

<userTask id="usertask3" name="End Task"

activiti:assignee="${initiator}"></userTask>

<sequenceFlow id="flow3" name="" sourceRef="usertask2"

targetRef="usertask3"></sequenceFlow>

<endEvent id="endevent1" name="End"></endEvent>

<sequenceFlow id="flow4" name="" sourceRef="usertask3"

targetRef="endevent1"></sequenceFlow>

</process>

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

149

<bpmndi:BPMNDiagram

id="BPMNDiagram_Pattern13MultipleInstancesWithAPrioriDesign-TimeKnowledge">

<bpmndi:BPMNPlane bpmnElement="Pattern13MultipleInstancesWithAPrioriDesign-

TimeKnowledge" id="BPMNPlane_Pattern13MultipleInstancesWithAPrioriDesign-

TimeKnowledge">

<bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">

<omgdc:Bounds height="35" width="35" x="40" y="90"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1">

<omgdc:Bounds height="55" width="105" x="120" y="80"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask2" id="BPMNShape_usertask2">

<omgdc:Bounds height="55" width="105" x="280" y="80"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask3" id="BPMNShape_usertask3">

<omgdc:Bounds height="55" width="105" x="440" y="80"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">

<omgdc:Bounds height="35" width="35" x="600" y="90"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">

<omgdi:waypoint x="75" y="107"></omgdi:waypoint>

<omgdi:waypoint x="120" y="107"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">

<omgdi:waypoint x="225" y="107"></omgdi:waypoint>

<omgdi:waypoint x="280" y="107"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">

<omgdi:waypoint x="385" y="107"></omgdi:waypoint>

<omgdi:waypoint x="440" y="107"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">

<omgdi:waypoint x="545" y="107"></omgdi:waypoint>

<omgdi:waypoint x="600" y="107"></omgdi:waypoint>

</bpmndi:BPMNEdge>

</bpmndi:BPMNPlane>

</bpmndi:BPMNDiagram>

</definitions>

Pattern 14 - Multiple Instances with a priori Run-Time Knowledge <?xml version="1.0" encoding="UTF-8"?>

<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:activiti="http://activiti.org/bpmn"

xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"

xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC"

xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI"

typeLanguage="http://www.w3.org/2001/XMLSchema"

expressionLanguage="http://www.w3.org/1999/XPath"

targetNamespace="http://www.activiti.org/patterns">

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

150

<process id="Pattern14MultipleInstancesWithAPrioriRun-TimeKnowledge"

name="Pattern 14 Multiple Instances with a priori Run-Time Knowledge">

<documentation>Implementation of Pattern 14 Multiple Instances with a priori

Run-Time Knowledge</documentation>

<startEvent id="startevent1" name="Start"

activiti:initiator="initiator"></startEvent>

<userTask id="usertask1" name="Choice" activiti:assignee="${initiator}">

<extensionElements>

<activiti:formProperty id="instances" name="Number of task instances"

type="long" required="true" readable="true"

writable="true"></activiti:formProperty>

</extensionElements>

</userTask>

<userTask id="usertask2" name="Multiple Tasks"

activiti:assignee="${initiator}">

<multiInstanceLoopCharacteristics isSequential="false">

<loopCardinality>${instances}</loopCardinality>

</multiInstanceLoopCharacteristics>

</userTask>

<userTask id="usertask3" name="End Task"

activiti:assignee="${initiator}"></userTask>

<endEvent id="endevent1" name="End"></endEvent>

<sequenceFlow id="flow1" name="" sourceRef="startevent1"

targetRef="usertask1"></sequenceFlow>

<sequenceFlow id="flow2" name="" sourceRef="usertask1"

targetRef="usertask2"></sequenceFlow>

<sequenceFlow id="flow3" name="" sourceRef="usertask2"

targetRef="usertask3"></sequenceFlow>

<sequenceFlow id="flow4" name="" sourceRef="usertask3"

targetRef="endevent1"></sequenceFlow>

</process>

<bpmndi:BPMNDiagram id="BPMNDiagram_Pattern14MultipleInstancesWithAPrioriRun-

TimeKnowledge">

<bpmndi:BPMNPlane bpmnElement="Pattern14MultipleInstancesWithAPrioriRun-

TimeKnowledge" id="BPMNPlane_Pattern14MultipleInstancesWithAPrioriRun-

TimeKnowledge">

<bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">

<omgdc:Bounds height="35" width="35" x="50" y="60"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1">

<omgdc:Bounds height="55" width="105" x="130" y="50"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask2" id="BPMNShape_usertask2">

<omgdc:Bounds height="55" width="105" x="290" y="50"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask3" id="BPMNShape_usertask3">

<omgdc:Bounds height="55" width="105" x="450" y="50"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">

<omgdc:Bounds height="35" width="35" x="610" y="60"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">

<omgdi:waypoint x="85" y="77"></omgdi:waypoint>

<omgdi:waypoint x="130" y="77"></omgdi:waypoint>

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

151

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">

<omgdi:waypoint x="235" y="77"></omgdi:waypoint>

<omgdi:waypoint x="290" y="77"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">

<omgdi:waypoint x="395" y="77"></omgdi:waypoint>

<omgdi:waypoint x="450" y="77"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">

<omgdi:waypoint x="555" y="77"></omgdi:waypoint>

<omgdi:waypoint x="610" y="77"></omgdi:waypoint>

</bpmndi:BPMNEdge>

</bpmndi:BPMNPlane>

</bpmndi:BPMNDiagram>

</definitions>

Pattern 16 - Deferred Choice <?xml version="1.0" encoding="UTF-8"?>

<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:activiti="http://activiti.org/bpmn"

xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"

xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC"

xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI"

typeLanguage="http://www.w3.org/2001/XMLSchema"

expressionLanguage="http://www.w3.org/1999/XPath"

targetNamespace="http://www.activiti.org/patterns">

<process id="Pattern16DeferredChoice" name="Pattern 16 Deferred Choice">

<documentation>Implementation of Pattern 16 Deferred Choice</documentation>

<startEvent id="startevent1" name="Start"

activiti:initiator="initiator"></startEvent>

<userTask id="usertask1" name="Start Task"

activiti:assignee="${initiator}"></userTask>

<subProcess id="subprocess1" name="Sub Process">

<startEvent id="startevent2" name="Start"

activiti:initiator="initiator"></startEvent>

<parallelGateway id="parallelgateway1" name="Parallel

Gateway"></parallelGateway>

<userTask id="usertask3" name="Task 2"

activiti:assignee="${initiator}"></userTask>

<endEvent id="endevent1" name="ErrorEnd">

<errorEventDefinition errorRef="errortask2"></errorEventDefinition>

</endEvent>

<endEvent id="endevent2" name="ErrorEnd">

<errorEventDefinition errorRef="errortask1"></errorEventDefinition>

</endEvent>

<sequenceFlow id="flow3" name="" sourceRef="startevent2"

targetRef="parallelgateway1"></sequenceFlow>

<sequenceFlow id="flow5" name="" sourceRef="parallelgateway1"

targetRef="usertask3"></sequenceFlow>

<sequenceFlow id="flow6" name="" sourceRef="usertask3"

targetRef="endevent1"></sequenceFlow>

<intermediateCatchEvent id="timerintermediatecatchevent1"

name="TimerCatchEvent">

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

152

<timerEventDefinition>

<timeDuration>PT30S</timeDuration>

</timerEventDefinition>

</intermediateCatchEvent>

<sequenceFlow id="flow12" name="" sourceRef="timerintermediatecatchevent1"

targetRef="endevent2"></sequenceFlow>

<sequenceFlow id="flow13" name="" sourceRef="parallelgateway1"

targetRef="timerintermediatecatchevent1"></sequenceFlow>

</subProcess>

<boundaryEvent id="boundaryerror1" cancelActivity="true"

attachedToRef="subprocess1">

<errorEventDefinition errorRef="errortask1"></errorEventDefinition>

</boundaryEvent>

<boundaryEvent id="boundaryerror2" cancelActivity="true"

attachedToRef="subprocess1">

<errorEventDefinition errorRef="errortask2"></errorEventDefinition>

</boundaryEvent>

<userTask id="usertask4" name="End Task 1"

activiti:assignee="${initiator}"></userTask>

<endEvent id="endevent3" name="End"></endEvent>

<userTask id="usertask5" name="End Task 2"

activiti:assignee="${initiator}"></userTask>

<endEvent id="endevent4" name="End"></endEvent>

<sequenceFlow id="flow1" name="" sourceRef="startevent1"

targetRef="usertask1"></sequenceFlow>

<sequenceFlow id="flow2" name="" sourceRef="usertask1"

targetRef="subprocess1"></sequenceFlow>

<sequenceFlow id="flow8" name="" sourceRef="boundaryerror1"

targetRef="usertask4"></sequenceFlow>

<sequenceFlow id="flow9" name="" sourceRef="usertask4"

targetRef="endevent3"></sequenceFlow>

<sequenceFlow id="flow10" name="" sourceRef="usertask5"

targetRef="endevent4"></sequenceFlow>

<sequenceFlow id="flow11" name="" sourceRef="boundaryerror2"

targetRef="usertask5"></sequenceFlow>

</process>

<bpmndi:BPMNDiagram id="BPMNDiagram_Pattern16DeferredChoice">

<bpmndi:BPMNPlane bpmnElement="Pattern16DeferredChoice"

id="BPMNPlane_Pattern16DeferredChoice">

<bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">

<omgdc:Bounds height="35" width="35" x="20" y="256"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1">

<omgdc:Bounds height="55" width="105" x="100" y="246"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="subprocess1" id="BPMNShape_subprocess1"

isExpanded="true">

<omgdc:Bounds height="361" width="461" x="260" y="93"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="startevent2" id="BPMNShape_startevent2">

<omgdc:Bounds height="35" width="35" x="280" y="253"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="parallelgateway1"

id="BPMNShape_parallelgateway1">

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

153

<omgdc:Bounds height="40" width="40" x="380" y="250"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask3" id="BPMNShape_usertask3">

<omgdc:Bounds height="55" width="105" x="460" y="358"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">

<omgdc:Bounds height="35" width="35" x="620" y="368"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="endevent2" id="BPMNShape_endevent2">

<omgdc:Bounds height="35" width="35" x="620" y="148"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="timerintermediatecatchevent1"

id="BPMNShape_timerintermediatecatchevent1">

<omgdc:Bounds height="35" width="35" x="480" y="148"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">

<omgdi:waypoint x="315" y="270"></omgdi:waypoint>

<omgdi:waypoint x="380" y="270"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">

<omgdi:waypoint x="400" y="290"></omgdi:waypoint>

<omgdi:waypoint x="400" y="385"></omgdi:waypoint>

<omgdi:waypoint x="460" y="385"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">

<omgdi:waypoint x="565" y="385"></omgdi:waypoint>

<omgdi:waypoint x="620" y="385"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow12" id="BPMNEdge_flow12">

<omgdi:waypoint x="515" y="165"></omgdi:waypoint>

<omgdi:waypoint x="620" y="165"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow13" id="BPMNEdge_flow13">

<omgdi:waypoint x="400" y="250"></omgdi:waypoint>

<omgdi:waypoint x="400" y="165"></omgdi:waypoint>

<omgdi:waypoint x="480" y="165"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNShape bpmnElement="boundaryerror1"

id="BPMNShape_boundaryerror1">

<omgdc:Bounds height="30" width="30" x="690" y="151"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="boundaryerror2"

id="BPMNShape_boundaryerror2">

<omgdc:Bounds height="30" width="30" x="690" y="371"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask4" id="BPMNShape_usertask4">

<omgdc:Bounds height="55" width="105" x="770" y="138"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="endevent3" id="BPMNShape_endevent3">

<omgdc:Bounds height="35" width="35" x="930" y="148"></omgdc:Bounds>

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

154

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask5" id="BPMNShape_usertask5">

<omgdc:Bounds height="55" width="105" x="770" y="358"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="endevent4" id="BPMNShape_endevent4">

<omgdc:Bounds height="35" width="35" x="930" y="368"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">

<omgdi:waypoint x="55" y="273"></omgdi:waypoint>

<omgdi:waypoint x="100" y="273"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">

<omgdi:waypoint x="205" y="273"></omgdi:waypoint>

<omgdi:waypoint x="260" y="273"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow8" id="BPMNEdge_flow8">

<omgdi:waypoint x="705" y="181"></omgdi:waypoint>

<omgdi:waypoint x="770" y="165"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow9" id="BPMNEdge_flow9">

<omgdi:waypoint x="875" y="165"></omgdi:waypoint>

<omgdi:waypoint x="930" y="165"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow10" id="BPMNEdge_flow10">

<omgdi:waypoint x="875" y="385"></omgdi:waypoint>

<omgdi:waypoint x="930" y="385"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow11" id="BPMNEdge_flow11">

<omgdi:waypoint x="705" y="401"></omgdi:waypoint>

<omgdi:waypoint x="770" y="385"></omgdi:waypoint>

</bpmndi:BPMNEdge>

</bpmndi:BPMNPlane>

</bpmndi:BPMNDiagram>

</definitions>

Pattern 19 - Cancel Activity <?xml version="1.0" encoding="UTF-8"?>

<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:activiti="http://activiti.org/bpmn"

xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"

xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC"

xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI"

typeLanguage="http://www.w3.org/2001/XMLSchema"

expressionLanguage="http://www.w3.org/1999/XPath"

targetNamespace="http://www.activiti.org/patterns">

<process id="Pattern19CancelTask" name="Pattern 19 Cancel Task">

<documentation>Implementation of Pattern 19 Cancel Task</documentation>

<startEvent id="startevent1" name="Start"

activiti:initiator="initiator"></startEvent>

<userTask id="usertask1" name="Start Task"

activiti:assignee="${initiator}"></userTask>

<subProcess id="subprocess1" name="Sub Process">

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

155

<startEvent id="startevent2" name="Start"

activiti:initiator="initiator"></startEvent>

<userTask id="usertask3" name="Choice" activiti:assignee="${initiator}">

<extensionElements>

<activiti:formProperty id="error" name="Error" type="boolean"

required="true" readable="true" writable="true"></activiti:formProperty>

</extensionElements>

</userTask>

<exclusiveGateway id="exclusivegateway1" name="Exclusive

Gateway"></exclusiveGateway>

<endEvent id="endevent2" name="End"></endEvent>

<endEvent id="endevent3" name="ErrorEnd">

<errorEventDefinition errorRef="task2error"></errorEventDefinition>

</endEvent>

<parallelGateway id="parallelgateway1" name="Parallel

Gateway"></parallelGateway>

<userTask id="usertask4" name="Task 1"

activiti:assignee="${initiator}"></userTask>

<userTask id="usertask5" name="Task 2"

activiti:assignee="${initiator}"></userTask>

<endEvent id="endevent5" name="End"></endEvent>

<sequenceFlow id="flow6" name="" sourceRef="usertask3"

targetRef="exclusivegateway1"></sequenceFlow>

<sequenceFlow id="flow7" name="" sourceRef="exclusivegateway1"

targetRef="endevent2">

<conditionExpression

xsi:type="tFormalExpression"><![CDATA[${!error}]]></conditionExpression>

</sequenceFlow>

<sequenceFlow id="flow8" name="" sourceRef="exclusivegateway1"

targetRef="endevent3">

<conditionExpression

xsi:type="tFormalExpression"><![CDATA[${error}]]></conditionExpression>

</sequenceFlow>

<sequenceFlow id="flow10" name="" sourceRef="startevent2"

targetRef="parallelgateway1"></sequenceFlow>

<sequenceFlow id="flow11" name="" sourceRef="parallelgateway1"

targetRef="usertask3"></sequenceFlow>

<sequenceFlow id="flow12" name="" sourceRef="parallelgateway1"

targetRef="usertask4"></sequenceFlow>

<sequenceFlow id="flow13" name="" sourceRef="usertask4"

targetRef="usertask5"></sequenceFlow>

<sequenceFlow id="flow14" name="" sourceRef="usertask5"

targetRef="endevent5"></sequenceFlow>

</subProcess>

<boundaryEvent id="boundaryerror1" name="" cancelActivity="true"

attachedToRef="subprocess1">

<errorEventDefinition errorRef="task2error"></errorEventDefinition>

</boundaryEvent>

<userTask id="usertask2" name="End Task"

activiti:assignee="${initiator}"></userTask>

<endEvent id="endevent1" name="End"></endEvent>

<endEvent id="endevent4" name="End"></endEvent>

<sequenceFlow id="flow1" name="" sourceRef="startevent1"

targetRef="usertask1"></sequenceFlow>

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

156

<sequenceFlow id="flow2" name="" sourceRef="usertask1"

targetRef="subprocess1"></sequenceFlow>

<sequenceFlow id="flow3" name="" sourceRef="subprocess1"

targetRef="usertask2"></sequenceFlow>

<sequenceFlow id="flow4" name="" sourceRef="usertask2"

targetRef="endevent1"></sequenceFlow>

<sequenceFlow id="flow9" name="" sourceRef="boundaryerror1"

targetRef="endevent4"></sequenceFlow>

</process>

<bpmndi:BPMNDiagram id="BPMNDiagram_Pattern19CancelTask">

<bpmndi:BPMNPlane bpmnElement="Pattern19CancelTask"

id="BPMNPlane_Pattern19CancelTask">

<bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">

<omgdc:Bounds height="35" width="35" x="40" y="182"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1">

<omgdc:Bounds height="55" width="105" x="107" y="172"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="subprocess1" id="BPMNShape_subprocess1"

isExpanded="true">

<omgdc:Bounds height="300" width="531" x="260" y="50"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="startevent2" id="BPMNShape_startevent2">

<omgdc:Bounds height="35" width="35" x="270" y="165"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask3" id="BPMNShape_usertask3">

<omgdc:Bounds height="55" width="105" x="420" y="228"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="exclusivegateway1"

id="BPMNShape_exclusivegateway1">

<omgdc:Bounds height="40" width="40" x="580" y="235"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="endevent2" id="BPMNShape_endevent2">

<omgdc:Bounds height="35" width="35" x="665" y="178"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="endevent3" id="BPMNShape_endevent3">

<omgdc:Bounds height="35" width="35" x="665" y="298"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="parallelgateway1"

id="BPMNShape_parallelgateway1">

<omgdc:Bounds height="40" width="40" x="350" y="162"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask4" id="BPMNShape_usertask4">

<omgdc:Bounds height="55" width="105" x="420" y="85"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask5" id="BPMNShape_usertask5">

<omgdc:Bounds height="55" width="105" x="580" y="85"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="endevent5" id="BPMNShape_endevent5">

<omgdc:Bounds height="35" width="35" x="730" y="95"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

157

<omgdi:waypoint x="525" y="255"></omgdi:waypoint>

<omgdi:waypoint x="580" y="255"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7">

<omgdi:waypoint x="600" y="235"></omgdi:waypoint>

<omgdi:waypoint x="600" y="195"></omgdi:waypoint>

<omgdi:waypoint x="665" y="195"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow8" id="BPMNEdge_flow8">

<omgdi:waypoint x="600" y="275"></omgdi:waypoint>

<omgdi:waypoint x="600" y="315"></omgdi:waypoint>

<omgdi:waypoint x="665" y="315"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow10" id="BPMNEdge_flow10">

<omgdi:waypoint x="305" y="182"></omgdi:waypoint>

<omgdi:waypoint x="350" y="182"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow11" id="BPMNEdge_flow11">

<omgdi:waypoint x="370" y="202"></omgdi:waypoint>

<omgdi:waypoint x="370" y="255"></omgdi:waypoint>

<omgdi:waypoint x="420" y="255"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow12" id="BPMNEdge_flow12">

<omgdi:waypoint x="370" y="162"></omgdi:waypoint>

<omgdi:waypoint x="370" y="111"></omgdi:waypoint>

<omgdi:waypoint x="420" y="112"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow13" id="BPMNEdge_flow13">

<omgdi:waypoint x="525" y="112"></omgdi:waypoint>

<omgdi:waypoint x="580" y="112"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow14" id="BPMNEdge_flow14">

<omgdi:waypoint x="685" y="112"></omgdi:waypoint>

<omgdi:waypoint x="730" y="112"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNShape bpmnElement="boundaryerror1"

id="BPMNShape_boundaryerror1">

<omgdc:Bounds height="30" width="30" x="446" y="330"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask2" id="BPMNShape_usertask2">

<omgdc:Bounds height="55" width="105" x="850" y="172"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">

<omgdc:Bounds height="35" width="35" x="1010" y="182"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="endevent4" id="BPMNShape_endevent4">

<omgdc:Bounds height="35" width="35" x="443" y="405"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">

<omgdi:waypoint x="75" y="199"></omgdi:waypoint>

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

158

<omgdi:waypoint x="107" y="199"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">

<omgdi:waypoint x="212" y="199"></omgdi:waypoint>

<omgdi:waypoint x="260" y="200"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">

<omgdi:waypoint x="791" y="200"></omgdi:waypoint>

<omgdi:waypoint x="850" y="199"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">

<omgdi:waypoint x="955" y="199"></omgdi:waypoint>

<omgdi:waypoint x="1010" y="199"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow9" id="BPMNEdge_flow9">

<omgdi:waypoint x="461" y="360"></omgdi:waypoint>

<omgdi:waypoint x="460" y="405"></omgdi:waypoint>

</bpmndi:BPMNEdge>

</bpmndi:BPMNPlane>

</bpmndi:BPMNDiagram>

</definitions>

Pattern 20 - Cancel Case <?xml version="1.0" encoding="UTF-8"?>

<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:activiti="http://activiti.org/bpmn"

xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"

xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC"

xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI"

typeLanguage="http://www.w3.org/2001/XMLSchema"

expressionLanguage="http://www.w3.org/1999/XPath"

targetNamespace="http://www.activiti.org/patterns">

<process id="Pattern20CancelCase" name="Pattern 20 Cancel Case">

<documentation>Implementation of Pattern 20 Cancel Case.</documentation>

<startEvent id="startevent1" name="Start"

activiti:initiator="initiator"></startEvent>

<subProcess id="subprocess1" name="Sub Process">

<startEvent id="startevent2" name="Start"></startEvent>

<userTask id="usertask1" name="Start Task"

activiti:assignee="${initiator}"></userTask>

<parallelGateway id="parallelgateway1" name="Parallel

Gateway"></parallelGateway>

<userTask id="usertask2" name="Task 1"

activiti:assignee="${initiator}"></userTask>

<userTask id="usertask3" name="Choice" activiti:assignee="${initiator}">

<extensionElements>

<activiti:formProperty id="cancel" name="Cancel" type="boolean"

required="true" readable="true" writable="true"></activiti:formProperty>

</extensionElements>

</userTask>

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

159

<userTask id="usertask4" name="End Task"

activiti:assignee="${initiator}"></userTask>

<exclusiveGateway id="exclusivegateway1" name="Exclusive

Gateway"></exclusiveGateway>

<endEvent id="endevent3" name="End"></endEvent>

<endEvent id="endevent4" name="End"></endEvent>

<endEvent id="endevent5" name="ErrorEnd">

<errorEventDefinition errorRef="cancelerror"></errorEventDefinition>

</endEvent>

<sequenceFlow id="flow4" name="" sourceRef="startevent2"

targetRef="usertask1"></sequenceFlow>

<sequenceFlow id="flow5" name="" sourceRef="usertask1"

targetRef="parallelgateway1"></sequenceFlow>

<sequenceFlow id="flow6" name="" sourceRef="parallelgateway1"

targetRef="usertask2"></sequenceFlow>

<sequenceFlow id="flow7" name="" sourceRef="parallelgateway1"

targetRef="usertask3"></sequenceFlow>

<sequenceFlow id="flow8" name="" sourceRef="usertask2"

targetRef="usertask4"></sequenceFlow>

<sequenceFlow id="flow9" name="" sourceRef="usertask3"

targetRef="exclusivegateway1"></sequenceFlow>

<sequenceFlow id="flow11" name="" sourceRef="usertask4"

targetRef="endevent4"></sequenceFlow>

<sequenceFlow id="flow12" name="" sourceRef="exclusivegateway1"

targetRef="endevent5">

<conditionExpression xsi:type="tFormalExpression"><![CDATA[${cancel}

]]></conditionExpression>

</sequenceFlow>

<sequenceFlow id="flow13" name="" sourceRef="exclusivegateway1"

targetRef="endevent3">

<conditionExpression xsi:type="tFormalExpression"><![CDATA[ ${!cancel}

]]></conditionExpression>

</sequenceFlow>

</subProcess>

<boundaryEvent id="boundaryerror1" name="Error" cancelActivity="true"

attachedToRef="subprocess1">

<errorEventDefinition errorRef="cancelerror"></errorEventDefinition>

</boundaryEvent>

<endEvent id="endevent1" name="End"></endEvent>

<sequenceFlow id="flow1" name="" sourceRef="startevent1"

targetRef="subprocess1"></sequenceFlow>

<sequenceFlow id="flow2" name="" sourceRef="subprocess1"

targetRef="endevent1"></sequenceFlow>

<endEvent id="endevent6" name="End"></endEvent>

<sequenceFlow id="flow14" name="" sourceRef="boundaryerror1"

targetRef="endevent6"></sequenceFlow>

</process>

<bpmndi:BPMNDiagram id="BPMNDiagram_Pattern20CancelCase">

<bpmndi:BPMNPlane bpmnElement="Pattern20CancelCase"

id="BPMNPlane_Pattern20CancelCase">

<bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">

<omgdc:Bounds height="35" width="35" x="40" y="173"></omgdc:Bounds>

</bpmndi:BPMNShape>

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

160

<bpmndi:BPMNShape bpmnElement="subprocess1" id="BPMNShape_subprocess1"

isExpanded="true">

<omgdc:Bounds height="321" width="711" x="140" y="30"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="startevent2" id="BPMNShape_startevent2">

<omgdc:Bounds height="35" width="35" x="160" y="176"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1">

<omgdc:Bounds height="55" width="105" x="240" y="166"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="parallelgateway1"

id="BPMNShape_parallelgateway1">

<omgdc:Bounds height="40" width="40" x="400" y="173"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask2" id="BPMNShape_usertask2">

<omgdc:Bounds height="55" width="105" x="480" y="80"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask3" id="BPMNShape_usertask3">

<omgdc:Bounds height="55" width="105" x="480" y="250"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask4" id="BPMNShape_usertask4">

<omgdc:Bounds height="55" width="105" x="640" y="80"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="exclusivegateway1"

id="BPMNShape_exclusivegateway1">

<omgdc:Bounds height="40" width="40" x="630" y="257"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="endevent3" id="BPMNShape_endevent3">

<omgdc:Bounds height="35" width="35" x="710" y="220"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="endevent4" id="BPMNShape_endevent4">

<omgdc:Bounds height="35" width="35" x="790" y="90"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="endevent5" id="BPMNShape_endevent5">

<omgdc:Bounds height="35" width="35" x="710" y="297"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">

<omgdi:waypoint x="195" y="193"></omgdi:waypoint>

<omgdi:waypoint x="240" y="193"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">

<omgdi:waypoint x="345" y="193"></omgdi:waypoint>

<omgdi:waypoint x="400" y="193"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">

<omgdi:waypoint x="420" y="173"></omgdi:waypoint>

<omgdi:waypoint x="420" y="108"></omgdi:waypoint>

<omgdi:waypoint x="480" y="107"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7">

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

161

<omgdi:waypoint x="420" y="213"></omgdi:waypoint>

<omgdi:waypoint x="420" y="276"></omgdi:waypoint>

<omgdi:waypoint x="480" y="277"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow8" id="BPMNEdge_flow8">

<omgdi:waypoint x="585" y="107"></omgdi:waypoint>

<omgdi:waypoint x="640" y="107"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow9" id="BPMNEdge_flow9">

<omgdi:waypoint x="585" y="277"></omgdi:waypoint>

<omgdi:waypoint x="630" y="277"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow11" id="BPMNEdge_flow11">

<omgdi:waypoint x="745" y="107"></omgdi:waypoint>

<omgdi:waypoint x="790" y="107"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow12" id="BPMNEdge_flow12">

<omgdi:waypoint x="650" y="297"></omgdi:waypoint>

<omgdi:waypoint x="650" y="314"></omgdi:waypoint>

<omgdi:waypoint x="710" y="314"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow13" id="BPMNEdge_flow13">

<omgdi:waypoint x="650" y="257"></omgdi:waypoint>

<omgdi:waypoint x="650" y="237"></omgdi:waypoint>

<omgdi:waypoint x="710" y="237"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNShape bpmnElement="boundaryerror1"

id="BPMNShape_boundaryerror1">

<omgdc:Bounds height="30" width="30" x="803" y="330"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">

<omgdc:Bounds height="35" width="35" x="920" y="173"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="endevent6" id="BPMNShape_endevent6">

<omgdc:Bounds height="35" width="35" x="800" y="400"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">

<omgdi:waypoint x="75" y="190"></omgdi:waypoint>

<omgdi:waypoint x="140" y="190"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">

<omgdi:waypoint x="851" y="190"></omgdi:waypoint>

<omgdi:waypoint x="920" y="190"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow14" id="BPMNEdge_flow14">

<omgdi:waypoint x="818" y="360"></omgdi:waypoint>

<omgdi:waypoint x="817" y="400"></omgdi:waypoint>

</bpmndi:BPMNEdge>

</bpmndi:BPMNPlane>

</bpmndi:BPMNDiagram>

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

162

</definitions>

Pattern 21 - Structured Loop (post-test) <?xml version="1.0" encoding="UTF-8"?>

<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:activiti="http://activiti.org/bpmn"

xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"

xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC"

xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI"

typeLanguage="http://www.w3.org/2001/XMLSchema"

expressionLanguage="http://www.w3.org/1999/XPath"

targetNamespace="http://www.activiti.org/patterns">

<process id="Pattern21StructuredLoop" name="Pattern 21 Structured Loop">

<documentation>Implementation of Pattern 21 Structured Loop</documentation>

<startEvent id="startevent1" name="Start"

activiti:initiator="initiator"></startEvent>

<userTask id="usertask1" name="While" activiti:assignee="${initiator}">

<extensionElements>

<activiti:formProperty id="repeat" name="Repeat" type="boolean"

required="true" readable="true" writable="true"></activiti:formProperty>

</extensionElements>

</userTask>

<exclusiveGateway id="exclusivegateway1" name="Exclusive

Gateway"></exclusiveGateway>

<userTask id="usertask2" name="Loop Task 1"

activiti:assignee="${initiator}"></userTask>

<exclusiveGateway id="exclusivegateway2" name="Exclusive

Gateway"></exclusiveGateway>

<userTask id="usertask4" name="End task"

activiti:assignee="${initiator}"></userTask>

<endEvent id="endevent1" name="End"></endEvent>

<sequenceFlow id="flow2" name="" sourceRef="usertask1"

targetRef="exclusivegateway1"></sequenceFlow>

<sequenceFlow id="flow3" name="" sourceRef="exclusivegateway1"

targetRef="usertask2">

<conditionExpression

xsi:type="tFormalExpression"><![CDATA[${repeat}]]></conditionExpression>

</sequenceFlow>

<sequenceFlow id="flow5" name="" sourceRef="startevent1"

targetRef="exclusivegateway2"></sequenceFlow>

<sequenceFlow id="flow6" name="" sourceRef="exclusivegateway2"

targetRef="usertask1"></sequenceFlow>

<sequenceFlow id="flow8" name="" sourceRef="exclusivegateway1"

targetRef="usertask4">

<conditionExpression

xsi:type="tFormalExpression"><![CDATA[${!repeat}]]></conditionExpression>

</sequenceFlow>

<sequenceFlow id="flow9" name="" sourceRef="usertask4"

targetRef="endevent1"></sequenceFlow>

<sequenceFlow id="flow10" name="" sourceRef="usertask2"

targetRef="exclusivegateway2"></sequenceFlow>

</process>

<bpmndi:BPMNDiagram id="BPMNDiagram_Pattern21StructuredLoop">

<bpmndi:BPMNPlane bpmnElement="Pattern21StructuredLoop"

id="BPMNPlane_Pattern21StructuredLoop">

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

163

<bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">

<omgdc:Bounds height="35" width="35" x="35" y="50"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1">

<omgdc:Bounds height="55" width="105" x="230" y="40"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="exclusivegateway1"

id="BPMNShape_exclusivegateway1">

<omgdc:Bounds height="40" width="40" x="660" y="47"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask2" id="BPMNShape_usertask2">

<omgdc:Bounds height="55" width="105" x="415" y="140"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="exclusivegateway2"

id="BPMNShape_exclusivegateway2">

<omgdc:Bounds height="40" width="40" x="145" y="47"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask4" id="BPMNShape_usertask4">

<omgdc:Bounds height="55" width="105" x="745" y="40"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">

<omgdc:Bounds height="35" width="35" x="905" y="50"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">

<omgdi:waypoint x="335" y="67"></omgdi:waypoint>

<omgdi:waypoint x="660" y="67"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">

<omgdi:waypoint x="680" y="87"></omgdi:waypoint>

<omgdi:waypoint x="680" y="167"></omgdi:waypoint>

<omgdi:waypoint x="520" y="167"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">

<omgdi:waypoint x="70" y="67"></omgdi:waypoint>

<omgdi:waypoint x="145" y="67"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">

<omgdi:waypoint x="185" y="67"></omgdi:waypoint>

<omgdi:waypoint x="230" y="67"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow8" id="BPMNEdge_flow8">

<omgdi:waypoint x="700" y="67"></omgdi:waypoint>

<omgdi:waypoint x="745" y="67"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow9" id="BPMNEdge_flow9">

<omgdi:waypoint x="850" y="67"></omgdi:waypoint>

<omgdi:waypoint x="905" y="67"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow10" id="BPMNEdge_flow10">

<omgdi:waypoint x="415" y="167"></omgdi:waypoint>

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

164

<omgdi:waypoint x="165" y="167"></omgdi:waypoint>

<omgdi:waypoint x="165" y="87"></omgdi:waypoint>

</bpmndi:BPMNEdge>

</bpmndi:BPMNPlane>

</bpmndi:BPMNDiagram>

</definitions>

Pattern 21 - Structured Loop (pre-test) <?xml version="1.0" encoding="UTF-8"?>

<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:activiti="http://activiti.org/bpmn"

xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"

xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC"

xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI"

typeLanguage="http://www.w3.org/2001/XMLSchema"

expressionLanguage="http://www.w3.org/1999/XPath"

targetNamespace="http://www.activiti.org/patterns">

<process id="Pattern21StructuredLoop2" name="Pattern 21 Structured Loop 2">

<documentation>Implementation of Pattern 21 Structured Loop

2</documentation>

<startEvent id="startevent1" name="Start"

activiti:initiator="initiator"></startEvent>

<exclusiveGateway id="exclusivegateway1" name="Exclusive

Gateway"></exclusiveGateway>

<userTask id="usertask1" name="Loop Task 1"

activiti:assignee="${initiator}"></userTask>

<sequenceFlow id="flow2" name="" sourceRef="exclusivegateway1"

targetRef="usertask1"></sequenceFlow>

<userTask id="usertask2" name="Repeat" activiti:assignee="${initiator}">

<extensionElements>

<activiti:formProperty id="repeat" name="Repeat" type="boolean"

required="true" readable="true" writable="true"></activiti:formProperty>

</extensionElements>

</userTask>

<sequenceFlow id="flow3" name="" sourceRef="usertask1"

targetRef="usertask2"></sequenceFlow>

<exclusiveGateway id="exclusivegateway2" name="Exclusive

Gateway"></exclusiveGateway>

<sequenceFlow id="flow4" name="" sourceRef="usertask2"

targetRef="exclusivegateway2"></sequenceFlow>

<sequenceFlow id="flow5" name="" sourceRef="exclusivegateway2"

targetRef="exclusivegateway1">

<conditionExpression

xsi:type="tFormalExpression"><![CDATA[${repeat}]]></conditionExpression>

</sequenceFlow>

<userTask id="usertask3" name="End Task"

activiti:assignee="${initiator}"></userTask>

<sequenceFlow id="flow6" name="" sourceRef="exclusivegateway2"

targetRef="usertask3">

<conditionExpression

xsi:type="tFormalExpression"><![CDATA[${!repeat}]]></conditionExpression>

</sequenceFlow>

<endEvent id="endevent1" name="End"></endEvent>

<sequenceFlow id="flow7" name="" sourceRef="usertask3"

targetRef="endevent1"></sequenceFlow>

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

165

<userTask id="usertask4" name="Start Task"

activiti:assignee="${initiator}"></userTask>

<sequenceFlow id="flow8" name="" sourceRef="startevent1"

targetRef="usertask4"></sequenceFlow>

<sequenceFlow id="flow9" name="" sourceRef="usertask4"

targetRef="exclusivegateway1"></sequenceFlow>

</process>

<bpmndi:BPMNDiagram id="BPMNDiagram_Pattern21StructuredLoop2">

<bpmndi:BPMNPlane bpmnElement="Pattern21StructuredLoop2"

id="BPMNPlane_Pattern21StructuredLoop2">

<bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">

<omgdc:Bounds height="35" width="35" x="40" y="50"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="exclusivegateway1"

id="BPMNShape_exclusivegateway1">

<omgdc:Bounds height="40" width="40" x="271" y="47"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1">

<omgdc:Bounds height="55" width="105" x="356" y="40"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask2" id="BPMNShape_usertask2">

<omgdc:Bounds height="55" width="105" x="521" y="40"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="exclusivegateway2"

id="BPMNShape_exclusivegateway2">

<omgdc:Bounds height="40" width="40" x="676" y="47"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask3" id="BPMNShape_usertask3">

<omgdc:Bounds height="55" width="105" x="761" y="40"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">

<omgdc:Bounds height="35" width="35" x="931" y="50"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask4" id="BPMNShape_usertask4">

<omgdc:Bounds height="55" width="105" x="120" y="40"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">

<omgdi:waypoint x="311" y="67"></omgdi:waypoint>

<omgdi:waypoint x="356" y="67"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">

<omgdi:waypoint x="461" y="67"></omgdi:waypoint>

<omgdi:waypoint x="521" y="67"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">

<omgdi:waypoint x="626" y="67"></omgdi:waypoint>

<omgdi:waypoint x="676" y="67"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">

<omgdi:waypoint x="696" y="87"></omgdi:waypoint>

<omgdi:waypoint x="696" y="154"></omgdi:waypoint>

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

166

<omgdi:waypoint x="487" y="154"></omgdi:waypoint>

<omgdi:waypoint x="291" y="154"></omgdi:waypoint>

<omgdi:waypoint x="291" y="87"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">

<omgdi:waypoint x="716" y="67"></omgdi:waypoint>

<omgdi:waypoint x="761" y="67"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7">

<omgdi:waypoint x="866" y="67"></omgdi:waypoint>

<omgdi:waypoint x="931" y="67"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow8" id="BPMNEdge_flow8">

<omgdi:waypoint x="75" y="67"></omgdi:waypoint>

<omgdi:waypoint x="120" y="67"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow9" id="BPMNEdge_flow9">

<omgdi:waypoint x="225" y="67"></omgdi:waypoint>

<omgdi:waypoint x="271" y="67"></omgdi:waypoint>

</bpmndi:BPMNEdge>

</bpmndi:BPMNPlane>

</bpmndi:BPMNDiagram>

</definitions>

Pattern 25 - Cancel Region <?xml version="1.0" encoding="UTF-8"?>

<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:activiti="http://activiti.org/bpmn"

xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"

xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC"

xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI"

typeLanguage="http://www.w3.org/2001/XMLSchema"

expressionLanguage="http://www.w3.org/1999/XPath"

targetNamespace="http://www.activiti.org/patterns">

<process id="Pattern25CancelRegion" name="Pattern 25 Cancel Region">

<documentation>Implementation of Pattern 25 Cancel Region</documentation>

<startEvent id="startevent1" name="Start"

activiti:initiator="initiator"></startEvent>

<userTask id="usertask1" name="Start Task"

activiti:assignee="${initiator}"></userTask>

<subProcess id="subprocess1" name="Sub Process">

<startEvent id="startevent2" name="Start"

activiti:initiator="initiator"></startEvent>

<userTask id="usertask2" name="Sub Task 1"

activiti:assignee="${initiator}">

<extensionElements>

<activiti:formProperty id="cancel" name="Cancel" type="boolean"

required="true" readable="true" writable="true"></activiti:formProperty>

</extensionElements>

</userTask>

<userTask id="usertask3" name="Sub Task 2"

activiti:assignee="${initiator}">

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

167

<extensionElements>

<activiti:formProperty id="cancel" name="Cancel" type="boolean"

variable="cancel" required="true" readable="true"

writable="true"></activiti:formProperty>

</extensionElements>

</userTask>

<endEvent id="endevent1" name="End"></endEvent>

<exclusiveGateway id="exclusivegateway1" name="Exclusive

Gateway"></exclusiveGateway>

<exclusiveGateway id="exclusivegateway2" name="Exclusive

Gateway"></exclusiveGateway>

<endEvent id="endevent2" name="ErrorEnd">

<errorEventDefinition errorRef="cancelerror"></errorEventDefinition>

</endEvent>

<endEvent id="endevent3" name="ErrorEnd">

<errorEventDefinition errorRef="cancelerror"></errorEventDefinition>

</endEvent>

<parallelGateway id="parallelgateway1" name="Parallel

Gateway"></parallelGateway>

<userTask id="usertask5" name="Parallel Sub Task"

activiti:assignee="${initiator}">

<extensionElements>

<activiti:formProperty id="cancel2" name="Cancel" type="boolean"

required="true" readable="true" writable="true"></activiti:formProperty>

</extensionElements>

</userTask>

<exclusiveGateway id="exclusivegateway3" name="Exclusive

Gateway"></exclusiveGateway>

<endEvent id="endevent6" name="End"></endEvent>

<endEvent id="endevent7" name="ErrorEnd">

<errorEventDefinition errorRef="cancelerror"></errorEventDefinition>

</endEvent>

<sequenceFlow id="flow6" name="" sourceRef="usertask2"

targetRef="exclusivegateway1"></sequenceFlow>

<sequenceFlow id="flow7" name="" sourceRef="exclusivegateway1"

targetRef="usertask3">

<conditionExpression

xsi:type="tFormalExpression"><![CDATA[${!cancel}]]></conditionExpression>

</sequenceFlow>

<sequenceFlow id="flow8" name="" sourceRef="usertask3"

targetRef="exclusivegateway2"></sequenceFlow>

<sequenceFlow id="flow9" name="" sourceRef="exclusivegateway2"

targetRef="endevent1">

<conditionExpression

xsi:type="tFormalExpression"><![CDATA[${!cancel}]]></conditionExpression>

</sequenceFlow>

<sequenceFlow id="flow10" name="" sourceRef="exclusivegateway2"

targetRef="endevent2">

<conditionExpression

xsi:type="tFormalExpression"><![CDATA[${cancel}]]></conditionExpression>

</sequenceFlow>

<sequenceFlow id="flow11" name="" sourceRef="exclusivegateway1"

targetRef="endevent3">

<conditionExpression

xsi:type="tFormalExpression"><![CDATA[${cancel}]]></conditionExpression>

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

168

</sequenceFlow>

<sequenceFlow id="flow15" name="" sourceRef="startevent2"

targetRef="parallelgateway1"></sequenceFlow>

<sequenceFlow id="flow16" name="" sourceRef="parallelgateway1"

targetRef="usertask2"></sequenceFlow>

<sequenceFlow id="flow17" name="" sourceRef="parallelgateway1"

targetRef="usertask5"></sequenceFlow>

<sequenceFlow id="flow18" name="" sourceRef="usertask5"

targetRef="exclusivegateway3"></sequenceFlow>

<sequenceFlow id="flow19" name="" sourceRef="exclusivegateway3"

targetRef="endevent6">

<conditionExpression

xsi:type="tFormalExpression"><![CDATA[${!cancel2}]]></conditionExpression>

</sequenceFlow>

<sequenceFlow id="flow20" name="" sourceRef="exclusivegateway3"

targetRef="endevent7">

<conditionExpression

xsi:type="tFormalExpression"><![CDATA[${cancel2}]]></conditionExpression>

</sequenceFlow>

</subProcess>

<boundaryEvent id="boundaryerror1" name="" cancelActivity="true"

attachedToRef="subprocess1">

<errorEventDefinition errorRef="cancelerror"></errorEventDefinition>

</boundaryEvent>

<userTask id="usertask4" name="End Task"

activiti:assignee="${initiator}"></userTask>

<endEvent id="endevent4" name="End"></endEvent>

<endEvent id="endevent5" name="End"></endEvent>

<sequenceFlow id="flow1" name="" sourceRef="startevent1"

targetRef="usertask1"></sequenceFlow>

<sequenceFlow id="flow2" name="" sourceRef="usertask1"

targetRef="subprocess1"></sequenceFlow>

<sequenceFlow id="flow12" name="" sourceRef="subprocess1"

targetRef="usertask4"></sequenceFlow>

<sequenceFlow id="flow13" name="" sourceRef="usertask4"

targetRef="endevent4"></sequenceFlow>

<sequenceFlow id="flow14" name="" sourceRef="boundaryerror1"

targetRef="endevent5"></sequenceFlow>

</process>

<bpmndi:BPMNDiagram id="BPMNDiagram_Pattern25CancelRegion">

<bpmndi:BPMNPlane bpmnElement="Pattern25CancelRegion"

id="BPMNPlane_Pattern25CancelRegion">

<bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">

<omgdc:Bounds height="35" width="35" x="20" y="165"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1">

<omgdc:Bounds height="55" width="105" x="90" y="155"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="subprocess1" id="BPMNShape_subprocess1"

isExpanded="true">

<omgdc:Bounds height="326" width="751" x="230" y="20"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="startevent2" id="BPMNShape_startevent2">

<omgdc:Bounds height="35" width="35" x="250" y="165"></omgdc:Bounds>

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

169

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask2" id="BPMNShape_usertask2">

<omgdc:Bounds height="55" width="105" x="450" y="53"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask3" id="BPMNShape_usertask3">

<omgdc:Bounds height="55" width="105" x="690" y="53"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">

<omgdc:Bounds height="35" width="35" x="920" y="63"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="exclusivegateway1"

id="BPMNShape_exclusivegateway1">

<omgdc:Bounds height="40" width="40" x="600" y="60"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="exclusivegateway2"

id="BPMNShape_exclusivegateway2">

<omgdc:Bounds height="40" width="40" x="840" y="60"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="endevent2" id="BPMNShape_endevent2">

<omgdc:Bounds height="35" width="35" x="843" y="145"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="endevent3" id="BPMNShape_endevent3">

<omgdc:Bounds height="35" width="35" x="603" y="145"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="parallelgateway1"

id="BPMNShape_parallelgateway1">

<omgdc:Bounds height="40" width="40" x="330" y="162"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask5" id="BPMNShape_usertask5">

<omgdc:Bounds height="55" width="105" x="450" y="255"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="exclusivegateway3"

id="BPMNShape_exclusivegateway3">

<omgdc:Bounds height="40" width="40" x="610" y="262"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="endevent6" id="BPMNShape_endevent6">

<omgdc:Bounds height="35" width="35" x="695" y="302"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="endevent7" id="BPMNShape_endevent7">

<omgdc:Bounds height="35" width="35" x="695" y="228"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">

<omgdi:waypoint x="555" y="80"></omgdi:waypoint>

<omgdi:waypoint x="600" y="80"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7">

<omgdi:waypoint x="640" y="80"></omgdi:waypoint>

<omgdi:waypoint x="690" y="80"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow8" id="BPMNEdge_flow8">

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

170

<omgdi:waypoint x="795" y="80"></omgdi:waypoint>

<omgdi:waypoint x="840" y="80"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow9" id="BPMNEdge_flow9">

<omgdi:waypoint x="880" y="80"></omgdi:waypoint>

<omgdi:waypoint x="920" y="80"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow10" id="BPMNEdge_flow10">

<omgdi:waypoint x="860" y="100"></omgdi:waypoint>

<omgdi:waypoint x="860" y="145"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow11" id="BPMNEdge_flow11">

<omgdi:waypoint x="620" y="100"></omgdi:waypoint>

<omgdi:waypoint x="620" y="145"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow15" id="BPMNEdge_flow15">

<omgdi:waypoint x="285" y="182"></omgdi:waypoint>

<omgdi:waypoint x="330" y="182"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow16" id="BPMNEdge_flow16">

<omgdi:waypoint x="350" y="162"></omgdi:waypoint>

<omgdi:waypoint x="350" y="80"></omgdi:waypoint>

<omgdi:waypoint x="450" y="80"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow17" id="BPMNEdge_flow17">

<omgdi:waypoint x="350" y="202"></omgdi:waypoint>

<omgdi:waypoint x="350" y="282"></omgdi:waypoint>

<omgdi:waypoint x="450" y="282"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow18" id="BPMNEdge_flow18">

<omgdi:waypoint x="555" y="282"></omgdi:waypoint>

<omgdi:waypoint x="610" y="282"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow19" id="BPMNEdge_flow19">

<omgdi:waypoint x="630" y="302"></omgdi:waypoint>

<omgdi:waypoint x="631" y="319"></omgdi:waypoint>

<omgdi:waypoint x="695" y="319"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow20" id="BPMNEdge_flow20">

<omgdi:waypoint x="630" y="262"></omgdi:waypoint>

<omgdi:waypoint x="631" y="245"></omgdi:waypoint>

<omgdi:waypoint x="695" y="245"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNShape bpmnElement="boundaryerror1"

id="BPMNShape_boundaryerror1">

<omgdc:Bounds height="30" width="30" x="943" y="330"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask4" id="BPMNShape_usertask4">

<omgdc:Bounds height="55" width="105" x="1032" y="155"></omgdc:Bounds>

</bpmndi:BPMNShape>

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

171

<bpmndi:BPMNShape bpmnElement="endevent4" id="BPMNShape_endevent4">

<omgdc:Bounds height="35" width="35" x="1171" y="165"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="endevent5" id="BPMNShape_endevent5">

<omgdc:Bounds height="35" width="35" x="940" y="405"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">

<omgdi:waypoint x="55" y="182"></omgdi:waypoint>

<omgdi:waypoint x="90" y="182"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">

<omgdi:waypoint x="195" y="182"></omgdi:waypoint>

<omgdi:waypoint x="230" y="183"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow12" id="BPMNEdge_flow12">

<omgdi:waypoint x="981" y="183"></omgdi:waypoint>

<omgdi:waypoint x="1032" y="182"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow13" id="BPMNEdge_flow13">

<omgdi:waypoint x="1137" y="182"></omgdi:waypoint>

<omgdi:waypoint x="1171" y="182"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow14" id="BPMNEdge_flow14">

<omgdi:waypoint x="958" y="360"></omgdi:waypoint>

<omgdi:waypoint x="957" y="405"></omgdi:waypoint>

</bpmndi:BPMNEdge>

</bpmndi:BPMNPlane>

</bpmndi:BPMNDiagram>

</definitions>

Pattern 26 - Cancel Multiple Instance Activity <?xml version="1.0" encoding="UTF-8"?>

<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:activiti="http://activiti.org/bpmn"

xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"

xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC"

xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI"

typeLanguage="http://www.w3.org/2001/XMLSchema"

expressionLanguage="http://www.w3.org/1999/XPath"

targetNamespace="http://www.activiti.org/patterns">

<process id="Pattern26CancelMultipleInstanceTask" name="Pattern 26 Cancel

Multiple Instance Task">

<documentation>Implementation of Pattern 26 Cancel Multiple Instance

Task</documentation>

<startEvent id="startevent1" name="Start"

activiti:initiator="initiator"></startEvent>

<userTask id="usertask1" name="Start Task"

activiti:assignee="${initiator}"></userTask>

<userTask id="usertask3" name="End Task"

activiti:assignee="${initiator}"></userTask>

<endEvent id="endevent1" name="End"></endEvent>

<subProcess id="subprocess1" name="Sub Process">

<multiInstanceLoopCharacteristics isSequential="false">

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

172

<loopCardinality>3</loopCardinality>

</multiInstanceLoopCharacteristics>

<startEvent id="startevent2" name="Start"

activiti:initiator="initiator"></startEvent>

<userTask id="usertask4" name="User Task"

activiti:assignee="${initiator}">

<extensionElements>

<activiti:formProperty id="cancel" name="Cancel" type="boolean"

required="true" readable="true" writable="true"></activiti:formProperty>

</extensionElements>

</userTask>

<exclusiveGateway id="exclusivegateway1" name="Exclusive

Gateway"></exclusiveGateway>

<endEvent id="endevent2" name="End"></endEvent>

<endEvent id="endevent3" name="ErrorEnd">

<errorEventDefinition errorRef="cancelerror"></errorEventDefinition>

</endEvent>

<sequenceFlow id="flow5" name="" sourceRef="startevent2"

targetRef="usertask4"></sequenceFlow>

<sequenceFlow id="flow6" name="" sourceRef="usertask4"

targetRef="exclusivegateway1"></sequenceFlow>

<sequenceFlow id="flow7" name="" sourceRef="exclusivegateway1"

targetRef="endevent2">

<conditionExpression

xsi:type="tFormalExpression"><![CDATA[${!cancel}]]></conditionExpression>

</sequenceFlow>

<sequenceFlow id="flow8" name="" sourceRef="exclusivegateway1"

targetRef="endevent3">

<conditionExpression

xsi:type="tFormalExpression"><![CDATA[${cancel}]]></conditionExpression>

</sequenceFlow>

</subProcess>

<boundaryEvent id="boundaryerror1" name="" cancelActivity="true"

attachedToRef="subprocess1">

<errorEventDefinition errorRef="cancelerror"></errorEventDefinition>

</boundaryEvent>

<endEvent id="endevent4" name="End"></endEvent>

<sequenceFlow id="flow1" name="" sourceRef="startevent1"

targetRef="usertask1"></sequenceFlow>

<sequenceFlow id="flow4" name="" sourceRef="usertask3"

targetRef="endevent1"></sequenceFlow>

<sequenceFlow id="flow10" name="" sourceRef="usertask1"

targetRef="subprocess1"></sequenceFlow>

<sequenceFlow id="flow14" name="" sourceRef="boundaryerror1"

targetRef="endevent4"></sequenceFlow>

<sequenceFlow id="flow15" name="" sourceRef="subprocess1"

targetRef="usertask3"></sequenceFlow>

</process>

<bpmndi:BPMNDiagram id="BPMNDiagram_Pattern26CancelMultipleInstanceTask">

<bpmndi:BPMNPlane bpmnElement="Pattern26CancelMultipleInstanceTask"

id="BPMNPlane_Pattern26CancelMultipleInstanceTask">

<bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">

<omgdc:Bounds height="35" width="35" x="50" y="130"></omgdc:Bounds>

</bpmndi:BPMNShape>

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

173

<bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1">

<omgdc:Bounds height="55" width="105" x="130" y="120"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask3" id="BPMNShape_usertask3">

<omgdc:Bounds height="55" width="105" x="755" y="120"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">

<omgdc:Bounds height="35" width="35" x="895" y="130"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="subprocess1" id="BPMNShape_subprocess1"

isExpanded="true">

<omgdc:Bounds height="205" width="421" x="280" y="45"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="startevent2" id="BPMNShape_startevent2">

<omgdc:Bounds height="35" width="35" x="305" y="101"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask4" id="BPMNShape_usertask4">

<omgdc:Bounds height="55" width="105" x="390" y="91"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="exclusivegateway1"

id="BPMNShape_exclusivegateway1">

<omgdc:Bounds height="40" width="40" x="545" y="98"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="endevent2" id="BPMNShape_endevent2">

<omgdc:Bounds height="35" width="35" x="630" y="101"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="endevent3" id="BPMNShape_endevent3">

<omgdc:Bounds height="35" width="35" x="548" y="169"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">

<omgdi:waypoint x="340" y="118"></omgdi:waypoint>

<omgdi:waypoint x="390" y="118"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">

<omgdi:waypoint x="495" y="118"></omgdi:waypoint>

<omgdi:waypoint x="545" y="118"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7">

<omgdi:waypoint x="585" y="118"></omgdi:waypoint>

<omgdi:waypoint x="630" y="118"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow8" id="BPMNEdge_flow8">

<omgdi:waypoint x="565" y="138"></omgdi:waypoint>

<omgdi:waypoint x="565" y="169"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNShape bpmnElement="boundaryerror1"

id="BPMNShape_boundaryerror1">

<omgdc:Bounds height="30" width="30" x="658" y="232"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="endevent4" id="BPMNShape_endevent4">

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

174

<omgdc:Bounds height="35" width="35" x="655" y="302"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">

<omgdi:waypoint x="85" y="147"></omgdi:waypoint>

<omgdi:waypoint x="130" y="147"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">

<omgdi:waypoint x="860" y="147"></omgdi:waypoint>

<omgdi:waypoint x="895" y="147"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow10" id="BPMNEdge_flow10">

<omgdi:waypoint x="235" y="147"></omgdi:waypoint>

<omgdi:waypoint x="280" y="147"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow14" id="BPMNEdge_flow14">

<omgdi:waypoint x="673" y="262"></omgdi:waypoint>

<omgdi:waypoint x="672" y="302"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow15" id="BPMNEdge_flow15">

<omgdi:waypoint x="701" y="147"></omgdi:waypoint>

<omgdi:waypoint x="755" y="147"></omgdi:waypoint>

</bpmndi:BPMNEdge>

</bpmndi:BPMNPlane>

</bpmndi:BPMNDiagram>

</definitions>

Pattern 27 - Complete Multiple Instance Activity (Boundary event) <?xml version="1.0" encoding="UTF-8"?>

<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:activiti="http://activiti.org/bpmn"

xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"

xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC"

xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI"

typeLanguage="http://www.w3.org/2001/XMLSchema"

expressionLanguage="http://www.w3.org/1999/XPath"

targetNamespace="http://www.activiti.org/patterns">

<process id="Pattern27CompleteMultipleInstanceTask" name="Pattern 27 Complete

Multiple Instance Task">

<documentation>Implementation of Pattern 27 Complete Multiple Instance

Task</documentation>

<startEvent id="startevent1" name="Start"

activiti:initiator="initiator"></startEvent>

<userTask id="usertask1" name="Start Task"

activiti:assignee="${initiator}"></userTask>

<userTask id="usertask2" name="Multiple Task"

activiti:assignee="${initiator}">

<multiInstanceLoopCharacteristics isSequential="false">

<loopCardinality>5</loopCardinality>

<completionCondition>${nrOfActiveInstances == 0}</completionCondition>

</multiInstanceLoopCharacteristics>

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

175

</userTask>

<boundaryEvent id="boundarytimer1" name="" cancelActivity="true"

attachedToRef="usertask2">

<timerEventDefinition>

<timeDuration>PT1M</timeDuration>

</timerEventDefinition>

</boundaryEvent>

<userTask id="usertask3" name="End Task"

activiti:assignee="${initiator}"></userTask>

<endEvent id="endevent1" name="End"></endEvent>

<exclusiveGateway id="exclusivegateway1" name="Exclusive

Gateway"></exclusiveGateway>

<sequenceFlow id="flow1" name="" sourceRef="startevent1"

targetRef="usertask1"></sequenceFlow>

<sequenceFlow id="flow2" name="" sourceRef="usertask1"

targetRef="usertask2"></sequenceFlow>

<sequenceFlow id="flow4" name="" sourceRef="usertask3"

targetRef="endevent1"></sequenceFlow>

<sequenceFlow id="flow5" name="" sourceRef="usertask2"

targetRef="exclusivegateway1"></sequenceFlow>

<sequenceFlow id="flow6" name="" sourceRef="exclusivegateway1"

targetRef="usertask3"></sequenceFlow>

<sequenceFlow id="flow7" name="" sourceRef="boundarytimer1"

targetRef="exclusivegateway1"></sequenceFlow>

</process>

<bpmndi:BPMNDiagram id="BPMNDiagram_Pattern27CompleteMultipleInstanceTask">

<bpmndi:BPMNPlane bpmnElement="Pattern27CompleteMultipleInstanceTask"

id="BPMNPlane_Pattern27CompleteMultipleInstanceTask">

<bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">

<omgdc:Bounds height="35" width="35" x="190" y="190"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1">

<omgdc:Bounds height="55" width="105" x="280" y="180"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask2" id="BPMNShape_usertask2">

<omgdc:Bounds height="55" width="105" x="430" y="180"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="boundarytimer1"

id="BPMNShape_boundarytimer1">

<omgdc:Bounds height="30" width="30" x="505" y="224"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask3" id="BPMNShape_usertask3">

<omgdc:Bounds height="55" width="105" x="680" y="180"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">

<omgdc:Bounds height="35" width="35" x="840" y="190"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="exclusivegateway1"

id="BPMNShape_exclusivegateway1">

<omgdc:Bounds height="40" width="40" x="590" y="187"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">

<omgdi:waypoint x="225" y="207"></omgdi:waypoint>

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

176

<omgdi:waypoint x="280" y="207"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">

<omgdi:waypoint x="385" y="207"></omgdi:waypoint>

<omgdi:waypoint x="430" y="207"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">

<omgdi:waypoint x="785" y="207"></omgdi:waypoint>

<omgdi:waypoint x="840" y="207"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">

<omgdi:waypoint x="535" y="207"></omgdi:waypoint>

<omgdi:waypoint x="590" y="207"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">

<omgdi:waypoint x="630" y="207"></omgdi:waypoint>

<omgdi:waypoint x="680" y="207"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7">

<omgdi:waypoint x="520" y="254"></omgdi:waypoint>

<omgdi:waypoint x="519" y="277"></omgdi:waypoint>

<omgdi:waypoint x="610" y="277"></omgdi:waypoint>

<omgdi:waypoint x="610" y="239"></omgdi:waypoint>

<omgdi:waypoint x="610" y="227"></omgdi:waypoint>

</bpmndi:BPMNEdge>

</bpmndi:BPMNPlane>

</bpmndi:BPMNDiagram>

</definitions>

Pattern 27 - Complete Multiple Instance Activity (completion condition) <?xml version="1.0" encoding="UTF-8"?>

<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:activiti="http://activiti.org/bpmn"

xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"

xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC"

xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI"

typeLanguage="http://www.w3.org/2001/XMLSchema"

expressionLanguage="http://www.w3.org/1999/XPath"

targetNamespace="http://www.activiti.org/patterns">

<process id="Pattern27CompleteMultipleInstanceTask2" name="Pattern 27 Complete

Multiple Instance Task 2">

<documentation>Implementation of Pattern 27 Complete Multiple Instance Task

2

</documentation>

<startEvent id="startevent1" name="Start"

activiti:initiator="initiator"></startEvent>

<userTask id="usertask1" name="Start Task"

activiti:assignee="${initiator}"></userTask>

<userTask id="usertask2" name="Multiple Task"

activiti:assignee="${initiator}">

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

177

<extensionElements>

<activiti:formProperty id="cancel" name="Cancel" type="boolean"

required="true" readable="true" writable="true"></activiti:formProperty>

</extensionElements>

<multiInstanceLoopCharacteristics isSequential="false">

<loopCardinality>5</loopCardinality>

<completionCondition>${cancel || nrOfActiveInstances ==

0}</completionCondition>

</multiInstanceLoopCharacteristics>

</userTask>

<userTask id="usertask3" name="End Task"

activiti:assignee="${initiator}"></userTask>

<endEvent id="endevent1" name="End"></endEvent>

<sequenceFlow id="flow1" name="" sourceRef="startevent1"

targetRef="usertask1"></sequenceFlow>

<sequenceFlow id="flow2" name="" sourceRef="usertask1"

targetRef="usertask2"></sequenceFlow>

<sequenceFlow id="flow3" name="" sourceRef="usertask2"

targetRef="usertask3"></sequenceFlow>

<sequenceFlow id="flow4" name="" sourceRef="usertask3"

targetRef="endevent1"></sequenceFlow>

</process>

<bpmndi:BPMNDiagram id="BPMNDiagram_Pattern27CompleteMultipleInstanceTask2">

<bpmndi:BPMNPlane bpmnElement="Pattern27CompleteMultipleInstanceTask2"

id="BPMNPlane_Pattern27CompleteMultipleInstanceTask2">

<bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">

<omgdc:Bounds height="35" width="35" x="30" y="50"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1">

<omgdc:Bounds height="55" width="105" x="110" y="40"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask2" id="BPMNShape_usertask2">

<omgdc:Bounds height="55" width="105" x="270" y="40"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask3" id="BPMNShape_usertask3">

<omgdc:Bounds height="55" width="105" x="430" y="40"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">

<omgdc:Bounds height="35" width="35" x="590" y="50"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">

<omgdi:waypoint x="65" y="67"></omgdi:waypoint>

<omgdi:waypoint x="110" y="67"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">

<omgdi:waypoint x="215" y="67"></omgdi:waypoint>

<omgdi:waypoint x="270" y="67"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">

<omgdi:waypoint x="375" y="67"></omgdi:waypoint>

<omgdi:waypoint x="430" y="67"></omgdi:waypoint>

</bpmndi:BPMNEdge>

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

178

<bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">

<omgdi:waypoint x="535" y="67"></omgdi:waypoint>

<omgdi:waypoint x="590" y="67"></omgdi:waypoint>

</bpmndi:BPMNEdge>

</bpmndi:BPMNPlane>

</bpmndi:BPMNDiagram>

</definitions>

Pattern 29 - Cancelling Discriminator <?xml version="1.0" encoding="UTF-8"?>

<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:activiti="http://activiti.org/bpmn"

xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"

xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC"

xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI"

typeLanguage="http://www.w3.org/2001/XMLSchema"

expressionLanguage="http://www.w3.org/1999/XPath"

targetNamespace="http://www.activiti.org/patterns">

<process id="Pattern29CancellingDiscriminator" name="Pattern 29 Cancelling

Discriminator">

<documentation>Implementation of Pattern 29 Cancelling

Discriminator</documentation>

<startEvent id="startevent1" name="Start"

activiti:initiator="initiator"></startEvent>

<subProcess id="subprocess1" name="Sub Process">

<userTask id="usertask1" name="Task 1"

activiti:assignee="${initiator}"></userTask>

<startEvent id="startevent2" name="Start"

activiti:initiator="initiator"></startEvent>

<sequenceFlow id="flow2" name="" sourceRef="startevent2"

targetRef="parallelgateway1"></sequenceFlow>

<parallelGateway id="parallelgateway1" name="Parallel

Gateway"></parallelGateway>

<sequenceFlow id="flow3" name="" sourceRef="parallelgateway1"

targetRef="usertask1"></sequenceFlow>

<userTask id="usertask2" name="Task 2"

activiti:assignee="${initiator}"></userTask>

<sequenceFlow id="flow4" name="" sourceRef="parallelgateway1"

targetRef="usertask2"></sequenceFlow>

<exclusiveGateway id="exclusivegateway1" name="Exclusive

Gateway"></exclusiveGateway>

<sequenceFlow id="flow5" name="" sourceRef="usertask1"

targetRef="exclusivegateway1"></sequenceFlow>

<sequenceFlow id="flow6" name="" sourceRef="usertask2"

targetRef="exclusivegateway1"></sequenceFlow>

<endEvent id="endevent1" name="ErrorEnd">

<errorEventDefinition errorRef="continue"></errorEventDefinition>

</endEvent>

<sequenceFlow id="flow7" name="" sourceRef="exclusivegateway1"

targetRef="endevent1"></sequenceFlow>

</subProcess>

<boundaryEvent id="boundaryerror1" attachedToRef="subprocess1">

<errorEventDefinition errorRef="continue"></errorEventDefinition>

</boundaryEvent>

<userTask id="usertask3" name="End Task"

activiti:assignee="${initiator}"></userTask>

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

179

<sequenceFlow id="flow8" name="" sourceRef="boundaryerror1"

targetRef="usertask3"></sequenceFlow>

<endEvent id="endevent2" name="End"></endEvent>

<sequenceFlow id="flow9" name="" sourceRef="usertask3"

targetRef="endevent2"></sequenceFlow>

<userTask id="usertask4" name="Start Task"

activiti:assignee="${initiator}"></userTask>

<sequenceFlow id="flow10" name="" sourceRef="startevent1"

targetRef="usertask4"></sequenceFlow>

<sequenceFlow id="flow11" name="" sourceRef="usertask4"

targetRef="subprocess1"></sequenceFlow>

</process>

<bpmndi:BPMNDiagram id="BPMNDiagram_Pattern29CancellingDiscriminator">

<bpmndi:BPMNPlane bpmnElement="Pattern29CancellingDiscriminator"

id="BPMNPlane_Pattern29CancellingDiscriminator">

<bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">

<omgdc:Bounds height="35" width="35" x="60" y="139"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="subprocess1" id="BPMNShape_subprocess1">

<omgdc:Bounds height="211" width="520" x="300" y="52"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1">

<omgdc:Bounds height="55" width="105" x="490" y="72"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="startevent2" id="BPMNShape_startevent2">

<omgdc:Bounds height="35" width="35" x="320" y="139"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="parallelgateway1"

id="BPMNShape_parallelgateway1">

<omgdc:Bounds height="40" width="40" x="400" y="136"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask2" id="BPMNShape_usertask2">

<omgdc:Bounds height="55" width="105" x="490" y="192"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="exclusivegateway1"

id="BPMNShape_exclusivegateway1">

<omgdc:Bounds height="40" width="40" x="640" y="139"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">

<omgdc:Bounds height="35" width="35" x="730" y="142"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">

<omgdi:waypoint x="355" y="156"></omgdi:waypoint>

<omgdi:waypoint x="400" y="156"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">

<omgdi:waypoint x="420" y="136"></omgdi:waypoint>

<omgdi:waypoint x="420" y="99"></omgdi:waypoint>

<omgdi:waypoint x="490" y="99"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">

<omgdi:waypoint x="420" y="176"></omgdi:waypoint>

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

180

<omgdi:waypoint x="420" y="219"></omgdi:waypoint>

<omgdi:waypoint x="490" y="219"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">

<omgdi:waypoint x="595" y="99"></omgdi:waypoint>

<omgdi:waypoint x="660" y="99"></omgdi:waypoint>

<omgdi:waypoint x="660" y="139"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">

<omgdi:waypoint x="595" y="219"></omgdi:waypoint>

<omgdi:waypoint x="660" y="219"></omgdi:waypoint>

<omgdi:waypoint x="660" y="179"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7">

<omgdi:waypoint x="680" y="159"></omgdi:waypoint>

<omgdi:waypoint x="730" y="159"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNShape bpmnElement="boundaryerror1"

id="BPMNShape_boundaryerror1">

<omgdc:Bounds height="30" width="30" x="803" y="145"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask3" id="BPMNShape_usertask3">

<omgdc:Bounds height="55" width="105" x="880" y="132"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="endevent2" id="BPMNShape_endevent2">

<omgdc:Bounds height="35" width="35" x="1030" y="142"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask4" id="BPMNShape_usertask4">

<omgdc:Bounds height="55" width="105" x="140" y="129"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNEdge bpmnElement="flow8" id="BPMNEdge_flow8">

<omgdi:waypoint x="818" y="175"></omgdi:waypoint>

<omgdi:waypoint x="880" y="159"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow9" id="BPMNEdge_flow9">

<omgdi:waypoint x="985" y="159"></omgdi:waypoint>

<omgdi:waypoint x="1030" y="159"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow10" id="BPMNEdge_flow10">

<omgdi:waypoint x="95" y="156"></omgdi:waypoint>

<omgdi:waypoint x="140" y="156"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow11" id="BPMNEdge_flow11">

<omgdi:waypoint x="245" y="156"></omgdi:waypoint>

<omgdi:waypoint x="300" y="157"></omgdi:waypoint>

</bpmndi:BPMNEdge>

</bpmndi:BPMNPlane>

</bpmndi:BPMNDiagram>

</definitions>

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

181

Pattern 35 - Cancelling Partial Join for Multiple Instances <?xml version="1.0" encoding="UTF-8"?>

<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:activiti="http://activiti.org/bpmn"

xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"

xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC"

xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI"

typeLanguage="http://www.w3.org/2001/XMLSchema"

expressionLanguage="http://www.w3.org/1999/XPath"

targetNamespace="http://www.activiti.org/patterns">

<process id="Pattern35CancellingPartialJoinForMultipleInstances" name="Pattern

35 Cancelling Partial Join for Multiple Instances">

<documentation>Implementation of Pattern 35 Cancelling Partial Join for

Multiple Instances.</documentation>

<startEvent id="startevent1" name="Start"

activiti:initiator="initiator"></startEvent>

<userTask id="usertask1" name="Start Task" activiti:assignee="${initiator}">

<extensionElements>

<activiti:formProperty id="nrInstances" name="Nr of instances"

type="long" required="true" readable="true"

writable="true"></activiti:formProperty>

<activiti:formProperty id="nrInstancesToComplete" name="Nr of instances

to complete" type="long" required="true" readable="true"

writable="true"></activiti:formProperty>

</extensionElements>

</userTask>

<userTask id="usertask2" name="Multi Task" activiti:assignee="${initiator}">

<multiInstanceLoopCharacteristics isSequential="false">

<loopCardinality>${nrInstances}</loopCardinality>

<completionCondition>${nrInstancesToComplete ==

nrOfCompletedInstances}</completionCondition>

</multiInstanceLoopCharacteristics>

</userTask>

<userTask id="usertask3" name="End Task"

activiti:assignee="${initiator}"></userTask>

<endEvent id="endevent1" name="End"></endEvent>

<sequenceFlow id="flow1" name="" sourceRef="startevent1"

targetRef="usertask1"></sequenceFlow>

<sequenceFlow id="flow2" name="" sourceRef="usertask1"

targetRef="usertask2"></sequenceFlow>

<sequenceFlow id="flow3" name="" sourceRef="usertask2"

targetRef="usertask3"></sequenceFlow>

<sequenceFlow id="flow4" name="" sourceRef="usertask3"

targetRef="endevent1"></sequenceFlow>

</process>

<bpmndi:BPMNDiagram

id="BPMNDiagram_Pattern35CancellingPartialJoinForMultipleInstances">

<bpmndi:BPMNPlane

bpmnElement="Pattern35CancellingPartialJoinForMultipleInstances"

id="BPMNPlane_Pattern35CancellingPartialJoinForMultipleInstances">

<bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">

<omgdc:Bounds height="35" width="35" x="70" y="80"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1">

<omgdc:Bounds height="55" width="105" x="150" y="70"></omgdc:Bounds>

Open-source Workflow

Evaluation - An evaluation of the

Activiti BPM Platform

Mikael Nilsson

Appendix E: XML implementation

of the supported patterns

2012-06-29

182

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask2" id="BPMNShape_usertask2">

<omgdc:Bounds height="55" width="105" x="310" y="70"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="usertask3" id="BPMNShape_usertask3">

<omgdc:Bounds height="55" width="105" x="470" y="70"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">

<omgdc:Bounds height="35" width="35" x="630" y="80"></omgdc:Bounds>

</bpmndi:BPMNShape>

<bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">

<omgdi:waypoint x="105" y="97"></omgdi:waypoint>

<omgdi:waypoint x="150" y="97"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">

<omgdi:waypoint x="255" y="97"></omgdi:waypoint>

<omgdi:waypoint x="310" y="97"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">

<omgdi:waypoint x="415" y="97"></omgdi:waypoint>

<omgdi:waypoint x="470" y="97"></omgdi:waypoint>

</bpmndi:BPMNEdge>

<bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">

<omgdi:waypoint x="575" y="97"></omgdi:waypoint>

<omgdi:waypoint x="630" y="97"></omgdi:waypoint>

</bpmndi:BPMNEdge>

</bpmndi:BPMNPlane>

</bpmndi:BPMNDiagram>

</definitions>