Documente Academic
Documente Profesional
Documente Cultură
JBPM5
1. Introduccin
Objetivos
Presentar al producto JBPM5 y su contexto.
JBPM5
Acerca de jBPM
* jBPM is a flexible Business Process Management (BPM)
Suite.
* It's light-weight, fully open-source
(distributed under Apache license) and written in Java.
* It allows you to model, execute and monitor business
processes, throughout their life cycle.
JBPM5
Caractersticas de jBPM
* The core of jBPM is a light-weight, extensible workflow
engine written in pure Java that allows you to execute
business processes using the latest BPMN 2.0
specification. It can run in any Java environment,
embedded in your application or as a service.
* Eclipse-based and web-based editor to support the
graphical creation of your business processes
(drag and drop)
* Pluggable persistence and transactions based on
JPA / JTA.
* History logging (for querying / monitoring / analysis)
JBPM5
Caractersticas de jBPM
* Pluggable human task service based on WS-HumanTask
for including tasks that need to be performed by
human actors
* Management console supporting process instance
management, task lists and task form management,
and reporting
* Task for builder to create, generate and/or edit task forms
Optional process repository to deploy your process
(and other related knowledge)
* Integration with Maven, Spring, OSGi, etc.
JBPM5
jBPM de JBoss
JBPM5
JBPM5
Componentes de JBPM
Core engine
Eclipse plugins
Web Designer
Console
Otros
JBPM5
10
JBPM5
11
12
13
jBPM Console
JBPM5
14
JBPM5
15
Arquitectura de jBPM
JBPM5
16
Actividades
Realizar el Laboratorio 1:
Conceptos relacionados a JBPM.
JBPM5
17
JBPM5
2. Preparando el ambiente
18
Objetivos
Preparar el ambiente de trabajo con JBPM5
JBPM5
19
Instalador de JBPM5
http://sourceforge.net/projects/jbpm/files/
JBPM5
20
JBPM5
21
JBPM5
22
JBPM5
23
JBPM5
24
JBPM5
JBOSS7
Local file
Repositorio de
usuarios
JBPM5
BD Repositorio
(H2)
Repositorio
interno
25
JBPM5
JBOSS7
LDAP
(Apache DS)
Repositorio de
usuarios
JBPM5
BD Repositorio
(Postgresql)
Repositorio
interno
26
Actividades
Realizar el Laboratorio 2:
Preparando el ambiente de desarrollo
JBPM5
27
JBPM5
3. Plugins de Eclipse para JBPM
28
Objetivos
Mostrar las opciones de integracin de JBPM con Eclipse.
JBPM5
29
JBPM5
30
JBPM5
31
JBPM5
32
JBPM5
33
JBPM5
34
Drools Guvnor
Tambin conocido como Guvnor BRMS
Se instala con drools-guvnor.war
Parte del Drools Business Logic Integration Platform
(BLIP)
Objetivos:
Herramienta orienta al negocio para la gestion de
assets de negocio.
Repositorio de assets, puede ser accedido por
aplicaciones externas
JBPM5
35
Drools Guvnor
Soporta diferente tipos de assets:
Reglas de negocio
Tablas de decisin
Procesos de negocio
Etc.
Solo para el caso de la edicion de procesos de negocio
requiere al jBPM Web Process Designer(designer.war)
http://localhost:8080/drools-guvnor/
JBPM5
36
JBPM5
37
JBPM5
38
JBPM5
39
JBPM5
40
Especificacin BPMN2
JBPM Eclipse
Plugin
JBPM5
41
Actividades
Realizar el Laboratorio 3:
Plugins de Eclipse para JBPM
JBPM5
42
JBPM5
4. Web Process Designer
43
Objetivos
Conocer al jBPM Web Process Designer
JBPM5
44
http://localhost:8080/drools-guvnor
JBPM5
45
JBPM5
46
JBPM5
47
JBPM5
48
JBPM5
49
JBPM5
50
JBPM5
51
JBPM5
52
JBPM5
53
JBPM5
54
JBPM5
55
JBPM5
56
JBPM5
57
Actividades
Realizar el Laboratorio 4:
Web Process Designer
JBPM5
58
JBPM5
5. El API Java para JBPM
59
Objetivos
Conocer el API Java para JBPM
JBPM5
60
El Java API.
http://docs.jboss.org/jbpm/v5.4/javadocs/
Algunos paquetes importantes:
org.drools.*.*
org.jbpm.bpmn2.*.*
org.jbpm.compiler.*.*
org.jbpm.persistence.*.*
org.jbpm.process.*.*
org.jbpm.ruleflow.*.*
org.jbpm.task.*.*
org.jbpm.workflow.*.*
JBPM5
61
Clase KnowledgeBase
The jBPM API allows you to first create a knowledge base.
The Knowledge Base is a repository of all the applications
knowledge definitions. It may contain rules, processes,
functions etc. The Knowledge Base itself does not
contain instance data, known as facts; instead, sessions
are created from the Knowledge Base into which data can
be inserted and where process instances may be started.
The following code snippet shows how to create a
knowledge base consisting of only one process definition.
JBPM5
62
kbuilder.add(ResourceFactory.newClassPathResource("TestProcess.bpmn"),
ResourceType.BPMN2);
KnowledgeBase kbase = kbuilder.newKnowledgeBase();
JBPM5
63
Clase KnowledgeSession
Next step is to start a session to interact with created knowledge base.
The following code snippet shows how easy it is to create a session based on
the earlier created knowledge base, and to start a process.
Ejemplo:
StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
ProcessInstance processInstance = ksession.startProcess("first_test");
JBPM5
64
JBPM5
65
Eventos
JBPM API allows you to listens to some events during process execution to
interact with JBPM runtime. A ProcessEventListener can be used to listen
to process-related events, like starting or completing a process, entering and
leaving a node, etc. You can set your listener class using following line of code.
Ejemplo:
ksession.addEventListener(new TestEventListener());
JBPM5
66
Eventos - Implementacin
import org.drools.event.process.*;
public class TestEventListener implements ProcessEventListener {
@Override
public void beforeNodeTriggered(ProcessNodeTriggeredEvent event) {
System.out.println("Before Node triggered. "+
event.getNodeInstance().getNodeName());
Object obj = event.getNodeInstance().getVariable("name");
System.out.println("Input Parameter of ProcessInstance: "+obj.toString());
}
@Override
public void afterNodeLeft(ProcessNodeLeftEvent arg0) {}
@Override
public void afterNodeTriggered(ProcessNodeTriggeredEvent arg0) {}
JBPM5
67
Eventos - Implementacin
@Override
public void afterProcessCompleted(ProcessCompletedEvent arg0) {}
@Override
public void afterProcessStarted(ProcessStartedEvent arg0) {}
@Override
public void afterVariableChanged(ProcessVariableChangedEvent arg0) {}
@Override
public void beforeNodeLeft(ProcessNodeLeftEvent arg0) {}
@Override
public void beforeProcessCompleted(ProcessCompletedEvent arg0) {}
@Override
public void beforeProcessStarted(ProcessStartedEvent arg0) {}
@Override
public void beforeVariableChanged(ProcessVariableChangedEvent arg0) {}
}
JBPM5
68
JBPM5
69
JBPM5
70
http://localhost:8080/drools-guvnor/
org.drools.guvnor.Guvnor/webdav/packages/com.procesos/PruebaProceso.bpmn2
JBPM5
71
JBPM5
72
JBPM5
73
JBPM5
74
...
JBPM5
75
Actividades
Realizar el Laboratorio 5:
El API Java para JBPM
JBPM5
76
JBPM5
6. JBPM Console
77
Objetivos
Conocer el JBPM Console.
JBPM5
78
79
JBPM Console
JBPM Console
Server
jbpm-gwt-console-server.war
JBPM Console
jbpm-gwt-console.war
Task Server
Drools Guvnor
Usuario
JBPM5
80
JBPM5
81
JBPM5
82
JBPM5
83
JBPM5
84
Gestin de seguridad
* {Path}\jboss-as-7.1.1.Final\standalone\configuration
* users.properties
* roles.properties
JBPM5
85
JBPM5
86
JBPM5
87
JBPM5
88
Actividades
Realizar el Laboratorio JBPM Console
JBPM5
89
JBPM5
7. Human task
90
Objetivos
Revisar los temas relacionados a las tareas humanas.
JBPM5
91
kcontext
JBPM5
92
JBPM5
93
map
JBPM5
94
JBPM5
95
Variables
JBPM5
96
Actividades
Realizar el Laboratorio 07:
Tareas humanas
JBPM5
97
JBPM5
8. Business Activity Monitoring
98
Objetivos
Business Activity Monitoring
JBPM5
99
JBPM5
100
JBPM5
101
JBPM5
102
JBPM5
103
JBPM5
104
Actividades
No existen.
JBPM5
105
JBPM5
9. Conclusiones
106
Objetivos
Conclusiones
JBPM5
107
Soporte
http://docs.jboss.org/jbpm/v5.4/userguide/
http://docs.jboss.org/jbpm/v5.4/javadocs/
http://www.jboss.org/jbpm/
JBPM5
108