Presentation Alfresco Activiti In Action (part 1/2)
Learn about Activiti and how you can benefit from the BPM and workflow features in your next Java project.
One aspect of Business Process Management (BPM) is to facilitate the collaboration between business people and developers.
But also developers find it often just the simplest way to implement their requirements. When dealing with task lists, timers and asynchronous messages, it can be a challenge to bind all the hooks and eyes together. In these asynchronous architectures, Activiti is at its best.
With Activiti, developers can create an overview diagram that represents the overall transactional control flow. We'll show how easy it is to link this process to your Java domain logic classes.
Another interesting aspect of using Activiti is that you get the valuable history analysis reports and audit logs for free. For example, how many successful deals did we have for each region in less then 20 days. Or who gave permission for this purchase and what was the motivation. By default,
Published on: 2011-04-03T16:51:45.000Z
Channel: BeJUG (all)
Tags: TomBaeyens Joram Barrez Java BPMN 2.0 Belgium bejug activiti Alfresco
Speakers:
Joram Barrez
Joram Barrez is a senior software engineer at Alfresco.
He started his career as a consultant, where he discovered the power of open-source BPM in Java.
During one of his BPM evangelization talks, he met Tom, which eventually led to him joining JBoss/Red Hat.
As a jBPM core developer, Joram was involved with the design and development of jBPM versions 3 and 4.
Together with Tom, Joram recently joined Alfresco and the Activiti team.
Joram is a devoted open-source BPM advocate, and never ceases to spread the message of the next generation in BPM through his blog and live presentations at JDD, Devoxx, JUGs, etc.
Slides:
Activity by Alfresco for BeJUG
by
for
Agenda
Agenda
• • • • • Introduc)on
Live
coding
TechTalk
What
do
you
get?
Demo
What is a business process?
What
is
a
business
process?
A
collec'on
of
related
steps
that
produce
value
3
What is a business process?
What
is
a
business
process?
• Business processes are often the differentiator between two companies doing the same thing
4
What is a business process?
What
is
a
business
process?
• Business processes are often the differentiator between two companies doing the same thing
5
What is a business process?
What
is
a
business
process?
• Business processes are often the differentiator between two companies doing the same thing
6
What is a business process?
What
is
a
business
process?
• Often visualized using some kind of flowcharts • Insight into business (mgmt perspective) • Communication IT-business • Business process Management is a HUGE field
7
What is a business process?
What
is
a
business
process?
• Often visualized using some kind of flowcharts • Insight into business (mgmt perspective) • Communication IT-business • Business process Management is a HUGE field
Suppose
250
pages/book
313
BPM
trees
2
612
500
pages
on
BPM
*
*hCp://wiki.answers.com/Q/How_much_paper_can_one_tree_produce
8
But technically...
But
technically…
9
BPMN 2.0
BPMN
2.0
• OMG
standard
– Shapes
– ExecuXon
semanXcs
– File
format
• First
pure
play
BPM
standard
– With
general
endorsement
10
What does that mean?
What
does
that
mean?
• Huge pool of BPMN skilled analysts • Any BPMN 2.0 compliant editor • MS Visio, Oracle, IBM, Aris, etc.
• Executable on Activiti engine
11
But technically…
But
technically…
12
What is Activity?
What
is
AcXviX?
100% J ava 100% o SS
Lightweigh t
Performant
Embeddable
13
What is Activity?
What
is
AcXviX?
AcXviX
API
runXmeService.startProcessInstance…
Forms
15
So technically...
So
technically
…
ht
k
flig Gene Boo ugh
rate
P DF
thro ice
bserv e Check
order
w state
in
SAP
AcXviX
Selec
t
hel p 'cke desk
t
HR
needs
to
approve
the
expense
ds
ey
nee tomer
Jo cu s ll
the
to
ca
16
What does that mean for you?
What
does
that
mean
for
you?
What does that mean for you?
What
does
that
mean
for
you?
• Developers are crucial for the success of a BPM project!
AcXviX
• Business processes practically always require automated steps and integrations • Activiti gives the developer the power and flexibility he/she needs to be extremely productive
Release fast, release often
Release
fast,
release
o_en
• Serious
#
bugfixes
/
features
every
month
19
Who contributes to Activity?
Who
contributes
to
Ac)vi)?
Agenda
Agenda
• • • • • IntroducXon
Live
coding
TechTalk
What
do
you
get?
Demo
Live coding
Live
coding
AcXviX
+
command
line
he
straXng
t Demon er
and
pow simplicity viX
of
AcX s!
0
minute In
only
1
AcXviX
+
Spring
AcXviX
+
webapp
22
TechTalk
TechTalk
23
Unit testing business processes
Unit
tesXng
business
processes
• With
AcXviX,
your
business
processes
are
an
integral
part
of
your
so_ware
project
• So
they
should
be
tested
the
same
as
regular
code
…
with
unit
tests!
• AcXviX
supports
JUnit
3
and
JUnit4
style
of
unit
tests
• +
a
lot
of
convience
for
tesXng
Pic
from
hCp://silverbackapp.com
Unit testing business processes
Unit
tesXng
business
processes
Junit
3.X
style
Pic
from
hCp://silverbackapp.com
Unit testing business processes
Unit
tesXng
business
processes
Junit
4
style
Pic
from
hCp://silverbackapp.com
Timers
Timers
• Work
is
o_en
Xme
constrained
• A
'mer
boundary
event
can
be
aCached
to
the
boundary
of
any
step
(or
subprocess)
27
Method
expressions
and
JPA
Method
expressions
and
JPA
Update
JPA
enXty
Spring
bean
Decision
based
on
JPA
enXty
property
Process
variables
28
Work in progress
Work
in
progress
• CDI/Spring
annotaXons
Work in progress
Work
in
progress
• CDI/Spring
annotaXons
@ProcessScope
Public
class
MyBean
{
@StartProcess(“helloWorldProcess”)
public
void
something(@ProcessVariable(“customerId”)
long
custId)
{
..
}
@CompleteTask(key=“theTask”)
public
void
somethingElse()
{
…
}
@State(“confirm-‐receipt”)
public
void
confirmReceipt(@ProcessVariable(“myVar”)
…
}
30
Agenda
Agenda
• • • • • IntroducXon
Live
coding
TechTalk
What
do
you
get?
Demo
What do you get?
What
do
you
get?
• World-‐class
rock-‐solid
BPM
and
workflow
engine
32
32
Not only the engine?
Not
only
the
engine?
AcXviX
Modeler
AcXviX
Designer
AcXviX
Probe
AcXviX
Explorer
AcXviX
Cycle
Java
ApplicaXons
AcXviX
Engine
REST
interface
iPhone
Explorer
Android
Explorer
Activity Modeler
• Webbased
BPMN
2.0
graphical
editor
AcXviX
Modeler
34
34
Activity Explorer
AcXviX
Explorer
• Process
end-‐users
(task
mgmt)
35
35
Activity Probe
AcXviX
Probe
• System
admins
• Status
overview,
stuck
jobs,
excepXons,
logs,
…
36
36
AcXviX
Cycle
AcXviX
Cycle
• CollaboraXon
…
done
right
37
37
Activity Cycle
AcXviX
KickStart
38
38
Activity REST API
• Remote
communicaXon
regardless
of
the
technology
AcXviX
REST
API
39
Activity Eclipse Designer
• AcXviX
extension
support,
BPMN
2.0
validaXon,
hierarchical
modeling
AcXviX
Eclipse
designer
40
Activity Eclipse Designer
AcXviX
Eclipse
designer
• Pluggable
acXvity
support
41
Mobile Activity
Mobile
AcXviX
42
Mobile Activity
Mobile
AcXviX
43
Activity & Grails
AcXviX
&
Grails
• Grails
convience
capabiliXes
• Typical
configuraXon
• Easy
business
archive
deployment
• Generate
controllers/view/example
app
44
Agenda
Agenda
• • • • • IntroducXon
Live
coding
TechTalk
What
do
you
get?
Demo
Real-life demo
Real-‐life
demo
• Use
case:
banks
shouldn’t
lend
money
to
just
anybody
• Thorough
analysis
is
needed
• All
steps
needs
to
be
recorded
in
official
documents
•
Decisions
are
done
based
on
Excel
decision
tables
46
The mortgage process
The
mortgage
process
47
The mortgage process
The
mortgage
process
48
The mortgage process
The
mortgage
process
=
CMIS
call
49
The power of Java
The
power
of
Java
Out-‐of-‐the-‐box
Custom
Java
50
The power of Java
The
power
of
Java
public class CreateLoanApplicationDocument implements JavaDelegate { public void execute(DelegateExecution execution) { Session session = CmisUtil.createCmisSession("admin", "admin", Constants.ALFRESCO_URL); Folder folder = CmisUtil.getFolder(session, Constants.LOAN_APPLICATION_STORAGE_FOLDER); Document document = createWordDocument(session, folder, execution); storeDocumentReferencesAsProcessVariables(execution, folder, document); session.save(); }
51
The mortgage process
The
mortgage
process
48