Business Management Presentations Process Management Process Modeling

Introducing Workflow Architectures Using Grails – Greach 2015

Description

Following new trends, as microservices architecture style and developer-friendly BPM solutions, we want to present our active open source projects using Grails

Transcript

10th April 2015
Introducing Workflow
Architectures
USING GRAILS
Rubén Mondéjar
Diputació de Tarragona
Rubén Mondéjar
Diputació de Tarragona
About Me
twitter : @Ruuben4
homepage : http://deim.urv.cat/~ruben.mondejar
Working
● Groovy & Grails
● Dev-Friendly BPM
● ITIL v3 / ISO 20000
Teaching / Research
● Software Architectures
● Web Development
● Distributed Systems
[BPM RoundTable Tarragona]
Outline
(1) From BPM to Grails
(2) Dev-Friendly BPM
(3) Extending BPMS
(4) Injecting BPM
From BPM to Grails
A TRUE STORY
1
“Everything looks interesting until you do it.
Then you find it’s just another job.”
Terry Pratchett
Moving Pictures
Discworld 10th Novel
Quote
Motivation
● Starting point: building software architectures
which involves business processes
● Applications perform the expected behaviour,
but implemented with different strategies
● For example, how to handle the data-flow or to
address integration
Processes
Processes
Collection of related events, activities, and
decisions, that involve a number of actors
and resources, and that collectively lead to an
outcome that is of value to an organization or
its customers
Dumas, La Rosa, Mendling, Reijers, 2013
Key Concepts
● BPM (Business Process Management) is
a discipline to automate organizational
processes
● BPMS (… System) is a software
architecture composed by different
components that allow to build and
integrate BPM and applications
● BPMN (… Notation) is a standard
collection of rules and graphical shapes
for drawing process models
BPM
BPMNBPMS
3-Tier Architecture
Client Tier
Logic Tier
Data Tier
SQL Search
Engine
NoSQL (…)
(…)Web
Framework
Web
Framework
(…) (…)(…)
3-Tier Architecture
SQL Search
Engine
NoSQL (…)
(…)Web
Framework
Web
Framework
Web
Framework
Workflow
System
(…) (…)(…)
Client Tier
Logic Tier
Data Tier
App
Scenario
App
App
App
Application
DB
Proc
Proc
Proc
Proc
Proc
Workflow
Web Framework Workflow System
App
Scenario
App
App
App
Application
Proc
Proc
Proc
Proc
Proc
Workflow
CONTROL FLOW
Web Framework
Control Flow
● Defines what to do and when
● A successor list among activities and events
● Main information represented in process models
A
B
C
D
Models
● Graphical representation of a business process
● Consists of simple diagrams constructed from a
limited set of element shapes
Models
Activity
EventSequence flow
Gateway
BPMN
Events
Activities
● Principle: not all tasks can be automated
● First step, identify each type
Automated User
21
Manual
3
Tasks
Automated
Outside
BPMN markers
Inside
Interactive
Vacation Example
Vacation Example
start > flow1 > task1 > flow2 > xor > flow3 > task2 > flow 4 > end1
BPMN.XML
<definitions …>
<process id=”example” name=”Vacation Example”>
<startEvent id=”start”/>
<sequenceFlow id=”flow1″ sourceRef=”start” targetRef=”task1″/>
<userTask id=”task1″ name=”Handle vacation request”
bpmn:formKey=”/vacation/handle” bpmn:candidateGroups=”managers”>
</userTask>
<sequenceFlow id=”flow2″ sourceRef=”task1″ targetRef=”xor”/>
<exclusiveGateway id=”xor”/>
<sequenceFlow id=”flow3″ sourceRef=”xor” targetRef=”task2″>
<conditionExpression>${approved}</conditionExpression>
</sequenceFlow>
<serviceTask id=”task2″ name=”Send confirmation e-mail”/>
<sequenceFlow id=”flow4″ sourceRef=”task2″ targetRef=”end1″/>
<endEvent id=”end1″ />
(…)
</process>
</definitions>
Solutions
1. Pure BPMN: designed from the ground up to
follow the spec to the letter
• jBPM, Activiti, Camunda
2. Adapted BPMN: use a BPMN skin but rely on
internal representation
• BonitaSoft, Bizagi, Intalio
3. Non BPMN: proprietary language and semantics
• BPMOne, YAWL, GrailsFlow
Solutions
Pure BPMN Grails Plugins
● jBPM Plugin
● Activiti Plugin
● Camunda Plugin
Plugin Usage
1. Quick start :
grails create-process com.greach.TestProcess
http://plexiti.github.io/camunda-grails-plugin/guide/usage.html#script-create-process
2. Easy configuration :
plugins { compile “:camunda:0.4.0” }
http://plexiti.github.io/camunda-grails-plugin/guide/configuration.html
3. Nice testing :
grails test-app integration: com.greach.TestProcess
http://plexiti.github.io/camunda-grails-plugin/guide/testing.html
Developer-Friendly
BUSINESS PROCESS MANAGEMENT
2
Motivation
if ( large and complex and monolithic ) {
}
Dev-Friendly BPM
● Leaves behind the Zero-Code Myth
○ Previous and extended BPM solutions
○ Sandboxing of processes in a suite
● Fits with MicroService Architectures
○ Enable workflow execution into existing applications
○ Embedded or remote execution modes
Workflow Engine
Embedded
(local services)
Remote
(remote services)
Engine Services
Workflow
Engine
RepositoryService
RuntimeService ManagementService HistoryService
TaskService IdentityService FormService
(…)
Repository Service
● Naturally, it is the first service that we need
● Manages deployments and process definitions
(BPMN)
● It can also activate or suspend specific deployments
or process definitions
RepositoryService
RuntimeService ManagementService HistoryService
TaskService IdentityService FormService
Keywords: [BPMN] [Process Definition] [Deployment]
Runtime Service
● Deals with starting new process instances
● Starts a new process instance in the latest version of
its process definition
● Retrieves all the visible variables from the given
execution
RepositoryService
RuntimeService ManagementService HistoryService
TaskService IdentityService FormService
Keywords: [Versions] [Process Instance] [Variables]
Task Service
● Querying and modifying tasks assigned to the
participants : users or groups
● Claiming a task for a specific participant
● Saving or completing a task, typically after filling the
fields of a form
RepositoryService
RuntimeService ManagementService HistoryService
TaskService IdentityService FormService
Keywords: [Participants] [Claim] [Save] [Complete]
Management Service
● Allows metadata information retrieval
● Exposes query capabilities and management operations
for jobs
● Used by the engine to handle timers, asynchronous
continuations, or delayed suspension/activation
RepositoryService
RuntimeService ManagementService HistoryService
TaskService IdentityService FormService
Keywords: [Metadata] [Jobs] [Timers]
Identify Service
● Manage users and groups, but does not do any
checking at runtime
● Tasks could be assigned to any user, but the engine
does not verify if that user is known to the system
● Synchronization mechanisms are needed
RepositoryService
RuntimeService ManagementService HistoryService
TaskService IdentityService FormService
Keywords: [Users] [Groups] [Synchronization]
History Service
● Exposes query capabilities to access historical data
● Log level configuration allows the engine to keep the
necessary data, like which tasks were performed by
whom
● Allows finding all historical variable values from
any given process in each of its executed tasks
RepositoryService
RuntimeService ManagementService HistoryService
TaskService IdentityService FormService
Keywords: [Historical data] [Execution logs] [Variables]
Form Service
● Start form is displayed to the user before the
process instance is created
● Task form is displayed when a user has to work with
an assigned task
RepositoryService
RuntimeService ManagementService HistoryService
TaskService IdentityService FormService
Keywords: [Start form] [Task form] [Form key] [Form data]
Form Service
● A form key is used to find the view that has to be
rendered
RepositoryService
RuntimeService ManagementService HistoryService
TaskService IdentityService FormService
Keywords: [Start form] [Task form] [Form key] [Form data]
● Alternatively, a form data can be
defined in the BPMN 2.0 process
definition using a proper extension
Extending BPMS
OCELOT PROJECT
3
Let’s Build
Components
● Modeling tool: creates and modifies executable
workflow models
● Execution Engine: instantiates executable
workflow models
● Worklist Handler: or “inbox”, offers tasks to
workflow participants
● Administration tools: manage, monitor, and
automate the entire workflow system
Architecture
Developer-Friendly BPM
Architecture
Developer-Friendly BPM
MicroServices Architecture
Implementation
Ocelot BPMS
Modeling Tool (MT)
● Based on BPMN.io and Grails
● REST API : Export BPMN models to XML / SVG
● Main goal : customization
● Custom Palette
○ Different frequency-based profiles
○ User reconfiguration
● Custom Tasks
○ Create new task types
○ Phone calls, Signatures, Approvals,
Archiving, Feedback Survey, etc.
eXecution Environment (XE)
● Based on Camunda and Grails
● REST Client : Importing Models (from diff. env.)
● Main goal : upper layer
○ Workflow Service : Unifying and extending the
process engine services with aggregated methods
○ REST API : allowing remote access
● Render forms
○ Scaffolded : formData
○ External : formKey
Demo Time
Ocelot XE
(5 minutes)
Source : https://github.com/Ocelot-BPMS/
Injecting BPM
ABOUT INTEGRATION
4
Conclusions
● Dev-Friendly BPM : nicest way to build
workflow architectures in Grails
● Extending BPMS : implementing workflow
applications or microservices with Grails
● Integration with BPM : … wait! explicitly or
implicitly?
Explicit BPM
External Services
● The aim of integration is to reach the other side of BPMS
● The aim of integration is to reach the other side of BPMS
● Detailed Knowledge + Behaviour Modification
Explicit BPM
External Services
param:taskId
callbackUrl
Implicit BPM
● What about taking advantage of the MVC pattern to
acquire knowledge and change the behaviour in
runtime?
Example
Pet Store (MVC Application, UML)1
Success
Page
Item List
Page
Show
Page
search
shopping
cart
add item
checkoutcheckout
Order
Home
Page
Find
Item
Confirm
Cart
Process
Order
Book
Balance
Save
Purchase
3
Handle
Purchase
Register
Customer
Payment?
customer?
init completed
done
verified
wrong
regular
new
Purchase Workflow (Business Process Model, BPMN 2.0)
cancelled
Accounting (MVC Application, UML)2
Book
Customer
newcustomer
manage
books
Main
Page Show
Page
List
Page
Create
Customer
Edit
Book
Example
Book
Balance
Pet Store (MVC Application, UML)
Save
Purchase
1 Accounting (MVC Application, UML)2
3
Handle
Purchase
Register
Customer
Payment?
customer?
init completed
done
verified
wrong
regular
new
Success
Page
Item Book
Customer
List
Page
Show
Page
search
shopping
cart
add item
checkoutcheckout
Order
newcustomer
manage
books
Purchase Workflow (Business Process Model, BPMN 2.0)
Home
Page
Main
Page Show
Page
List
Page
Create
Customer
Edit
Book
Find
Item
Confirm
Cart
Process
Order
A
trigger
B
render C
find
sets
D
perform
E
perform
cancelled
PurchaseWorkflow {
in PetStore :
During ”process” action from Order, trigger ”init” event
After ”Save Purchase” task, render ”success” view
in Accounting :
Before ”Book Balance” task, find ”customer” domain by ”nin”
and sets ”exists” attribute
After ”Book Balance” task, perform ”update” action from Book
After ”Register Customer” task,
perform ”create” action from Customer
}
DSL
A
B
C
D
E
Workflow Weaving
Code
MVC
Framework
Container
Instance
Weaver
Proxies
Reflection
Capabilities
AOP
Facilities
Implicit BPM
Plugin
Implicit BPM Back-End
Workflow
Engine
Weaver
Repository
Workflow
Database
Weaver
Coordinator
Platform Manager
DSL
Interpreter
BPMN
Parser
A
Application (A)
B
C
E
D
MicroServices
Architecture
Architecture
More Info
● Website : http://implicit-bpm.sf.net
● Source code : http://sf.net/p/implicit-bpm/code
● Research paper :
Implicit BPM: a Business Process Platform for
Transparent Workflow Weaving. Rubén Mondéjar, Pedro
García-López, Carles Pairot, and Enric Brull. In: BPM, pp.
168–183 (2014)
10th April 2015
THANKS!
Rubén Mondéjar
Diputació de Tarragona
Rubén Mondéjar
Diputació de Tarragona

Leave a Comment

Get the BPI Web Feed

Using the HTML code below, you can display this Business Process Incubator page content with the current filter and sorting inside your web site for FREE.

Copy/Paste this code in your website html code:

<iframe src="https://www.businessprocessincubator.com/content/introducing-workflow-architectures-using-grails-greach-2015/?feed=html" frameborder="0" scrolling="auto" width="100%" height="700">

Customizing your BPI Web Feed

You can click on the Get the BPI Web Feed link on any of our page to create the best possible feed for your site. Here are a few tips to customize your BPI Web Feed.

Customizing the Content Filter
On any page, you can add filter criteria using the MORE FILTERS interface:

Customizing the Content Filter

Customizing the Content Sorting
Clicking on the sorting options will also change the way your BPI Web Feed will be ordered on your site:

Get the BPI Web Feed

Some integration examples

BPMN.org

XPDL.org

×