SlideShare une entreprise Scribd logo
1  sur  45
Télécharger pour lire hors ligne
JBoss jBPM
       Die Open Source
Business Process Engine
    JavaConferenceMünchen
                12.09.2008
bernd.ruecker@camunda.com
Bernd Rücker
Wer bin ich?

  •   Berater, Trainer, Coach
  •   Softwareentwickler
  •   Committer im JBoss jBPM-Projekt
  •   Themen:
       –   BPM & SOA
       –   Process Execution (jPDL, BPEL, XPDL, …)
       –   JBoss SOA Platform (jBPM, ESB, Drools, …)
       –   Enterprise Anwendungen mit Java EE


  • Siehe         www.camunda.com
  • Blog          www.bpm-guide.de
Agenda
JBoss jBPM

  •   Einführung BPM (Business Process Management)
  •   JBoss jBPM jPDL
  •   Prozessbeispiel
  •   Simulation & Erweiterung
  •   Process Virtual Machine (PVM) & jBPM 4
Geschäftsprozesse & Software
Der Status Quo in manchen Unternehmen




          GUI
                                   Paper            Email

                        Gui 1               Gui 2                  Gui 3


          Software

                                             Kunden             SAP
                                           Komponente          Server


                                                        EAI-Tool
                     Web-Service
Ein „digitaler“ Prozess
mit Business Process Engine



                               Δ Durchlaufzeit




                     Task          Service            Task
                   Zuweisung       Aufruf           Zuweisung



       Process Engine
                                      IT

              Human Workflow        EAI          Human Workflow
                                    SOA
Process Execution
Business Process Engine

                        1.) Aufgabe erzeugen         1.) System aufrufen / Message
                        2.) Aufgabe abschließen      2.) Asynchrone Antwort als Message




Client                       Tasklist              Externes
                                                    System
                                                                                          Process Execution Engine
     Transaction / Request


                                                                             …                    Zeit


                                             process execution




                               Task                    Service                  Task
                             Zuweisung                 Aufruf                 Zuweisung
Quelle: Nicolai Josuttis
Integration: BPM & SOA
Business Process Engine
Middleware für Geschäftsprozesse




                  Business Analyst        Sachbearbeiter
                                                                      Aufgaben-
                                                                      Verwaltung
              Simulation



                   Prozess-                              Prozess-                        Fremd-
                  definitionen                          Ausführung                    Anwendungen
 Entwickler

                                       Prozess-
                                                                   Administration
                                         Logs
                                                                                     Administrator

                                                                        Persistenz
                  Definition                            Laufzeit

                               Business Process Engine (BPM-Engine)
Was leistet die Business Process Engine
Features

  • Versionierung, Persistenz & Interpretation von
    Prozessmodellen
  • Steuerung & Persistenz von Prozessinstanzen
  • Task-Management
  • Wait-States
  • Prozesskontext (Variablen zu Prozess speichern)
  • Einbindung externer Services
  • Verwalten von Ereignissen (z.B. Timeouts)
  • …
JBoss jBPM
Open Source Process Execution

  • Business Process Engine
  • „Library“
  • POJO-Kern: Interne Prozessrepräsentation durch
    Java-Modelle
  • Persistenz über Hibernate (DB-Unabhängigkeit)
  • Lauffähig mit oder ohne Application-Server
  • Klein und flexibel, leicht erweiterbar
  • Aktuell Version 3.2, Version 4 in der Entwicklung
  • Open Source (LGPL)
„Graph oriented programming“
Der Prozess als gerichteter Graph

                                          Node         1
                                                                Token
                                                      current
                                                      Node
                             from                to
                          leaving                arriving
                       Transitions    *      *   Transitions

                                     Transition

                                                 <process-definition>
                                                   ...
                                                   <node name=“serve client”>
                                                     <transition name=“ok” to=“order” />
                                                     <transition name=“nok” to=“joke” />
                                                   </node>
                                                   <node name=“order” />
                                                   <node name=“joke” />
                                                   ...
                                                 </process-definition>
Beispielprozess mit jPDL
Einfacher Ticketprozess
jBPM-Vokabular
jPDL



       Actions


                               Task-Node




       Node


          Transition



                       State
Verschiedene Node-Typen
jBPM in a nutshell

  •   Task-Node: Human Tasks / Aufgaben
  •   State: Wait-States
  •   Fork / Join: Parallelisierung
  •   Decision: Automatische Entscheidung
  •   Start-State / End-State
  •   Super-State
  •   Process-State
  •   …
  •   Eigene Node-Typen mit
      Verhalten können
      implementiert werden
jBPM & Java
jBPM in a nutshell

  • Einfache Java-API zur Steuerung der Engine
       – Prozessstart
       – Aufgabenliste
       –…


  • Aufrufen von „User-Code“
       – definierte Stellen im Prozess
       – Interface & Java-Klassen
jBPM & Java
jBPM in a nutshell


public class MyAction implements ActionHandler {
 public void execute(ExecutionContext ctx) {
  Object var = ctx.getVariable(quot;varquot;);
  result = service.doSomething(var);
  ctx.setVariable(quot;resultquot;, result);
 }
}




 JbpmConfiguration conf = JbpmConfiguration.getInstance();
 JbpmContext context = conf. createJbpmContext();

 ProcessInstance pi = context.getGraphSession().
           findLatestProcessDefinition(quot;Ticketquot;).createProcessInstance();
 pi.getRootToken().signal();

 List<TaskInstance> tasks = context.getTaskMgmtSession().
           findTaskInstances(quot;Vertriebquot;);
 tasks.get(0).end(quot;Ticket schliessenquot;);

 context.close();
Nodes & States
jPDL
               <node name=quot;Kunde anlegenquot;>
                 <event type=quot;node-enterquot;>
                   <action name=quot;Kunde anlegenquot; class=quot;...CreateCustomerActionquot;/>
                 </event>
                 <transition to=quot;Bearbeiter bekannt?quot; />
               </node>




<state name=quot;Ticket geschlossenquot;>
    <transition name=quot;wieder öffnenquot; to=quot;Ticket bearbeitenquot;>
      <action class=quot;de.ejbbuch.jbpm.actions.ReopenTicketActionquot; />
    </transition>
    <transition name=quot;schliessen okquot; to=quot;Mail versendenquot; />
</state>
jPDL – Decisions
jPDL

<decision name=quot;Kunde bekannt?quot;>
      <handler class=quot;de.ejbbuch.jbpm.decision.CustomerExistDecisionquot;/>
      <transition name=quot;falsequot; to=quot;Kunde anlegenquot; />
      <transition name=quot;truequot;   to=quot;Bearbeiter bekannt?quot;>
         <action class=quot;de.ejbbuch.jbpm.actions.LoadCustomerActionquot; />
      </transition>
</decision>
                                                                        Java




<decision name=quot;Bearbeiter bekannt?quot; expression=quot;#{clerk!=null}quot;>
      <transition name=quot;falsequot; to=quot;Bearbeiter zuweisenquot;></transition>
      <transition name=quot;truequot; to=quot;Ticket anlegenquot;></transition>
</decision>
                                                                JSF-Expression
jBPM-Descision
Automatische Entscheidungen als Java-Code




 public class CustomerExistDecision implements DecisionHandler {
   public String decide(ExecutionContext ctx) throws Exception {
     // get variable quot;customerIdquot; out of process context
     String customerId = (String)ctx.getVariable(quot;customerIdquot;);
     ...
     if (...)
       return quot;truequot;;
     else
       return quot;falsequot;;
   }
 }
jBPM in der Architektur
Einbettung in eigene Anwendung

  • jBPM kann in eigene Java-Architektur integriert
    werden
  • Process Engine ist eigene Architekturschicht
  • Domänenobjekte oder Referenzen als
    Prozessvariablen
  • Ansteuerung ext.      EJB-Container (oder Tomcat oder Java SE)
                                                      jBPM (jPDL)
    Services im Prozess       Session
                                                                   Human
                                                                    Task
                                        Bean                       Mgmnt




                                                EJB   JCA   JMS
                                                                  WS
Command-Pattern
Remote-Zugriffe und Asynchronität




                              public class TaskInstanceEndCommand
                                                            implements Command {
                                ...
                                public Object execute(JbpmContext jbpmContext) {
                                  TaskInstance taskInstance =
                                                    getTaskInstance(jbpmContext);

                                    if (transitionName == null) {
                                      taskInstance.end();
                                    } else {
                                      taskInstance.end(transitionName);
                                    }
                                    return taskInstance;
                                  }
                                  ...
                              }
Beispiel: EJB3 + Swing




Swing-GUI                  EJB-Container
                                                 BPM-Engine
            Commands           Command                                         Command
                                Service                                         Service
                                 SLSB                                            MDB


                Webcontainer                                                          Message
                                                                                      Mit
                 Web-GUI
                                                                                      Commands
                                           EJB       JCA      JMS   …
                                                                              Korrelation


                                                                    Fremd-
                                                                    systeme
Vergleich zu BPEL
Java beheimatet JBoss jBPM

  EJB-Container (oder Tomcat oder Java SE)
                              jBPM (jPDL)
                                             Human
      Session                                 Task
       Bean                                  Mgmnt




                  EJB      JCA     JMS
                                             WS
                                                                      BPEL-Server

                                                     WS


                               Java                           WS          WS        WS      WS

                                                      EJB-Container       .NET      Human   …
                                                                                     Task
                                                                                    Mgmnt
                                                      EJB   JMS, …
Business-IT-Alignment mit jBPM?
Prozess Deployment
Den Prozess zum Leben erwecken

  •   Java API
  •   Ant
  •   Eclipse-Designer           XML
                                          deploy
                                                   jBPM API
  •   Web-Console                                      Neue
                                 .class
  •   AdminClient                                      Version

  •   MBean                                          DB

  •   …

  • Prozessversionierung
  • Action-Klassen können mit deployed und
    versioniert werden
Demoanwendung
Architektur
                         Browser




              jBPM Web-Console (JSF)




                Geschäftsprozess


                   Action     Action
              JBoss jBPM (Webanwendung)

                                        Zur Vereinfachung in
                                       der Übung: Pure Java!
                   CRM
                  System      Ticket
                              System



                                                    Tomcat
CRM- & Ticketsystem
Einfachste Java EE Implementierung & Prozessintegration


                                           Prozesskontext
                                            Prozesskontext
                                           customerId 0815
                                                      ::
                                            customerId 0815
                                           ticketId :
                                                   :
                                            ticketId     007
                                                          007


                     <<Service>>                                       <<Service>>
                     CrmService                                        TicketService




               + findCustomer:Customer                          + createTicket:Ticket
               + existCustomer:boolean                          + getTicket:Ticket
               + createCustomer:Customer




                      <<Entity>>                                        <<Entity>>
                      Customer                                            Ticket
               + id:int                                         + id:int
               + givenname:String                               + description:String
               + surname:String                                 + content:String
               + email:String                                   + open:boolean
DEMO
Vision Geschäftsprozesssimulation
Business Process Simulation (BPS)
                               Same model as
     process model &            for process
      additional info            execution




                                                                     benchmarks,
                                    (stochastic)                        KPI, …
                                     simulation
        alternative
         process
        structures


                                                             Analysis


                                            Control                                Design


           BAM


                                                       Iterative Improvement
                        Life data
                                           Execution                           Implementation
                          from
                         history
Beispiel
Warenrücknahme-Prozess

Fragestellungen:  process runs: 195                                          Swimlane
    • Wie viele Mitarbeiter benötige                           Avg, duration (standard
                                                                            derivation)
    ich für eine bestimmte
    Arbeitslast?                100          95
    • Wo Accounta optimale Punkt
          liegt der
    zwischen zu vielen und zu
                  nt
    wenigen Leuten?
            180 (30)

                                       195
                                                        Clerk
                                                        180 (60)
                                                  165
                                                        Tester
                      30                                732,25 (448)



                                 145                      20

         Accounta                                                          dispatcher
                nt                                                         325.50 (182)
          180 (30)         175                                     20
Simulation input
Business Process Simulation (BPS)

                                    distribution of start events (amount and time)




                                    distribution of waiting time
resource pools

                                    distribution of duration/processing time for task


                                    distribution of duration/processing time for task
jBPM Simulationskomponente
Business Process Simulation (BPS)

  • Entwicklelt als Master Thesis
  • JBoss jBPM
  • DESMO-J
      –   Java Simulation Framework
      –   Discrete Event Simulation (DES)
      –   Entwickelt von der Uni Hamburg
      –   Open Source (Apache License)
Combination of BPM & DES




                    ?
                           Business
    DES-                   Process
 Framework:                 Engine:

  DESMO-J                   JBoss
                            jBPM
Combination of BPM & DES in action

         21:33                       21:33


       Eventlist

  21:40 start process




           Distributions




            Counters &
                  data
             collectors
Combination of BPM & DES in action

         21:40                                   21:40
                                                 21:33


       Eventlist
                           21:40 start process
  21:40 start process

  22:07 start process

  22:55 parcel arrived




           Distributions




            Counters &
                  data
             collectors
Combination of BPM & DES in action

         22:55                                    22:55


       Eventlist

  22:55 parcel arrived
                           22:55 parcel arrived




           Distributions




            Counters &
                  data
             collectors
Implementierung
Prozessparser & jbpm-configuration




  <jbpm-configuration>
    <string name=quot;resource.action.typesquot;
            value=quot;org/jbpm/sim/simulation.action.types.xmlquot;/>
    <string name=quot;resource.node.typesquot;
            value=quot;org/jbpm/sim/simulation.node.types.xmlquot;/>
  </jbpm-configuration>
Implementierung
Über eigene Nodes und Actions



<node-types>
  <node-type element=quot;decisionquot; class=quot;org.jbpm.sim.jpdl.SimDecisionquot; />
  <node-type element=quot;statequot; class=quot;org.jbpm.sim.jpdl.SimStatequot; />
  <node-type element=quot;start-statequot; class=quot;org.jbpm.graph.node.StartStatequot; />
  <node-type element=quot;end-statequot; class=quot;org.jbpm.graph.node.EndStatequot; />
  ...
  <node-type element=quot;mail-nodequot; class=quot;org.jbpm.graph.def.Nodequot; />
</node-types>




<action-types>
  <action-type element=quot;actionquot; class=quot;org.jbpm.sim.jpdl.SimActionquot; />
  <action-type element=quot;simulation-actionquot; class=quot;org.jbpm.sim.jpdl.SimActionquot; />
  ...
  <action-type element=quot;mailquot; class=quot;org.jbpm.sim.action.EmptyActionquot; />
</action-types>
Ausblick: Process Virtual Machine
JBoss PVM

  • Es existieren verschiedenste Prozessausführungs-
    sprachen (Process Execution Language)
     – BPEL, XPDL, jPDL, DSL‘s, …
  • Es gibt nicht die perfekte Sprache
  • Koexistenz von verschiedenen Sprachen erlauben
  • Sprache nach Problem auswählen

   Grundfunktionalität Prozessmaschine in PVM
Konzepte & Kernabstraktionen
Prozesse als Zustandsautomat




                               Verhalten über
                               Sprache definiert
Laufzeitverhalten
Prozesse als Zustandsautomat
Just an API
PVM definiert keine Sprache




ProcessDefinition processDefinition = ProcessFactory.build()
    .node(quot;accept loan requestquot;).initial().behaviour(new WaitState())
      .transition().to(quot;loan evaluationquot;)
    .node(quot;loan evaluationquot;).behaviour(new WaitState())
      .transition(quot;approvequot;).to(quot;wire the moneyquot;)
      .transition(quot;rejectquot;).to(quot;endquot;)
    .node(quot;wire the moneyquot;).behaviour(new Display(quot;automatic paymentquot;))
      .transition().to(quot;endquot;)
    .node(quot;endquot;).behaviour(new WaitState())
.done();
Prozesssprachen
Die PVM unterstützt verschiedene Sprachen

  • Graphen / Blockstruktur
  • Sprache kann durch
    entsprechendes Node-Verhalten
    implementiert werden
  • Es wird geben
      – XPDL: Nova Bonita (Ende 2008)
      – jPDL: JBoss jBPM JPDL 4 (Anfang
        2009)
      – BPEL
  • Sprachen sind in XML umgesetzt
Fazit
JBoss jBPM

  • Im Java Umfeld ist JBoss jBPM sehr interessant
  • „Leichtgewichtig“ und in verschiedensten Umgebungen
    Lauffähig
  • Erweiterbar und flexibel
  • PVM bildet Grundlage für verschiedenste Engines
  • Modelgetriebene Ansätze denkbar
  • Vision und Roadmap vorhanden!
  2 Antworten auf Standardfragen:
  • Performance und Skalierbarkeit bei korrektem Einsatz
    kein Problem
  • Ja, Tooling (Designer und Webconsole) ist
    verbesserungsbedürftig ;-)
Fragen & Antworten

                               Bernd Rücker
                               Geschäftsführer
                               Berater, Trainer & Coach
                               bernd.ruecker@camunda.com
                               +49 711 3278645
                               +49 171 1473461
                     Unsere Themen
                     • Ganzheitliches BPM
                     • Prozessautomatisierung
                     • SOA, BPEL, XPDL, jBPM, Drools, ESB
                     • BPMN
                     • BPM-Toolauswahl

                     Unsere Leistungen
                     • Beratung
                     • Seminare
                     • Process Hosting

Contenu connexe

Tendances (12)

20091112 WJAX BPMN 2.0 - Wird BPEL noch gebraucht?
20091112 WJAX BPMN 2.0 - Wird BPEL noch gebraucht?20091112 WJAX BPMN 2.0 - Wird BPEL noch gebraucht?
20091112 WJAX BPMN 2.0 - Wird BPEL noch gebraucht?
 
Boczek+friebe
Boczek+friebeBoczek+friebe
Boczek+friebe
 
Regelbasierte Systeme mit JBoss Drools
Regelbasierte Systeme mit JBoss DroolsRegelbasierte Systeme mit JBoss Drools
Regelbasierte Systeme mit JBoss Drools
 
20100506 JAX BPMN 2.0 in der Praxis
20100506 JAX BPMN 2.0 in der Praxis20100506 JAX BPMN 2.0 in der Praxis
20100506 JAX BPMN 2.0 in der Praxis
 
20091014 J Bpm4 Hamburg
20091014 J Bpm4 Hamburg20091014 J Bpm4 Hamburg
20091014 J Bpm4 Hamburg
 
Bpmn in der praxis
Bpmn in der praxisBpmn in der praxis
Bpmn in der praxis
 
WJAX 2012: BPMN in der Praxis
WJAX 2012: BPMN in der PraxisWJAX 2012: BPMN in der Praxis
WJAX 2012: BPMN in der Praxis
 
2012 05-30 camunda fox de
2012 05-30 camunda fox  de2012 05-30 camunda fox  de
2012 05-30 camunda fox de
 
BPMN in der Praxis
BPMN in der PraxisBPMN in der Praxis
BPMN in der Praxis
 
BPMN in der Praxis
BPMN in der PraxisBPMN in der Praxis
BPMN in der Praxis
 
20070705 JFS BPM mit JBoss jBPM
20070705 JFS BPM mit JBoss jBPM20070705 JFS BPM mit JBoss jBPM
20070705 JFS BPM mit JBoss jBPM
 
2012 04-18 bpmn 2
2012 04-18 bpmn 22012 04-18 bpmn 2
2012 04-18 bpmn 2
 

Similaire à JBoss jBPM

IT-Service Management nach ITIL
IT-Service Management nach ITILIT-Service Management nach ITIL
IT-Service Management nach ITIL
GFU Cyrus AG
 

Similaire à JBoss jBPM (20)

Bpmn roundtrip
Bpmn roundtripBpmn roundtrip
Bpmn roundtrip
 
Vortrag auf der SEACON 2013 in Hamburg: Prozessautomatisierung mit BPMN 2.0 u...
Vortrag auf der SEACON 2013 in Hamburg: Prozessautomatisierung mit BPMN 2.0 u...Vortrag auf der SEACON 2013 in Hamburg: Prozessautomatisierung mit BPMN 2.0 u...
Vortrag auf der SEACON 2013 in Hamburg: Prozessautomatisierung mit BPMN 2.0 u...
 
BPM & SOA - Prozesse sind keine Workflows
BPM & SOA - Prozesse sind keine WorkflowsBPM & SOA - Prozesse sind keine Workflows
BPM & SOA - Prozesse sind keine Workflows
 
20090204 JUG BB Jbpm und Drools
20090204 JUG BB Jbpm und Drools20090204 JUG BB Jbpm und Drools
20090204 JUG BB Jbpm und Drools
 
C5 Mettenmeier Lotusday2007
C5 Mettenmeier Lotusday2007C5 Mettenmeier Lotusday2007
C5 Mettenmeier Lotusday2007
 
Jug muenchen bpmn in der praxis
Jug muenchen bpmn in der praxisJug muenchen bpmn in der praxis
Jug muenchen bpmn in der praxis
 
20110119 activiti jughh
20110119 activiti jughh20110119 activiti jughh
20110119 activiti jughh
 
PAVONE Espresso Workflow für Java EE
PAVONE Espresso Workflow für Java EEPAVONE Espresso Workflow für Java EE
PAVONE Espresso Workflow für Java EE
 
WJAX 2012: Dreamteam "BPM + Java EE"
WJAX 2012: Dreamteam "BPM + Java EE"WJAX 2012: Dreamteam "BPM + Java EE"
WJAX 2012: Dreamteam "BPM + Java EE"
 
20110223 activiti
20110223 activiti20110223 activiti
20110223 activiti
 
20110203 jug stuttgart
20110203 jug stuttgart20110203 jug stuttgart
20110203 jug stuttgart
 
Enterprise Java Batch mit Spring
Enterprise Java Batch mit SpringEnterprise Java Batch mit Spring
Enterprise Java Batch mit Spring
 
20110311 activiti mathema
20110311 activiti mathema20110311 activiti mathema
20110311 activiti mathema
 
20101117 activiti
20101117 activiti20101117 activiti
20101117 activiti
 
Camunda@1&1
Camunda@1&1Camunda@1&1
Camunda@1&1
 
20110321 activiti märz
20110321 activiti märz20110321 activiti märz
20110321 activiti märz
 
20101118 bpm und soa
20101118 bpm und soa20101118 bpm und soa
20101118 bpm und soa
 
IT-Service Management nach ITIL
IT-Service Management nach ITILIT-Service Management nach ITIL
IT-Service Management nach ITIL
 
Bpmn2010
Bpmn2010Bpmn2010
Bpmn2010
 
Professionelle Anforderungsanalyse am Beispiel einer Java-Anwendung zur Betri...
Professionelle Anforderungsanalyse am Beispiel einer Java-Anwendung zur Betri...Professionelle Anforderungsanalyse am Beispiel einer Java-Anwendung zur Betri...
Professionelle Anforderungsanalyse am Beispiel einer Java-Anwendung zur Betri...
 

Plus de camunda services GmbH

Camunda BPM 7.13 Webinar
Camunda BPM 7.13 WebinarCamunda BPM 7.13 Webinar
Camunda BPM 7.13 Webinar
camunda services GmbH
 

Plus de camunda services GmbH (20)

Using Camunda on Kubernetes through Operators
Using Camunda on Kubernetes through OperatorsUsing Camunda on Kubernetes through Operators
Using Camunda on Kubernetes through Operators
 
Predictive Process Monitoring in Camunda
Predictive Process Monitoring in CamundaPredictive Process Monitoring in Camunda
Predictive Process Monitoring in Camunda
 
Camunda Product Update – The present and the future of Process Automation
Camunda Product Update – The present and the future of Process AutomationCamunda Product Update – The present and the future of Process Automation
Camunda Product Update – The present and the future of Process Automation
 
Tips on how to build Camunda Run for production
Tips on how to build Camunda Run for productionTips on how to build Camunda Run for production
Tips on how to build Camunda Run for production
 
Process Driven Customer Interaction
Process Driven Customer InteractionProcess Driven Customer Interaction
Process Driven Customer Interaction
 
Exploring Automation in Government
Exploring Automation in GovernmentExploring Automation in Government
Exploring Automation in Government
 
The Pulse of Process Automation
The Pulse of Process AutomationThe Pulse of Process Automation
The Pulse of Process Automation
 
Blitzumfrage zur aktuellen Nutzung von Prozessautomatisierung in Unternehmen
Blitzumfrage zur aktuellen Nutzung von Prozessautomatisierung in UnternehmenBlitzumfrage zur aktuellen Nutzung von Prozessautomatisierung in Unternehmen
Blitzumfrage zur aktuellen Nutzung von Prozessautomatisierung in Unternehmen
 
Webinar - A Developer's Quick Start Guide to Open Source Process Automation U...
Webinar - A Developer's Quick Start Guide to Open Source Process Automation U...Webinar - A Developer's Quick Start Guide to Open Source Process Automation U...
Webinar - A Developer's Quick Start Guide to Open Source Process Automation U...
 
Extending human workflow preparing people and processes for the digital era w...
Extending human workflow preparing people and processes for the digital era w...Extending human workflow preparing people and processes for the digital era w...
Extending human workflow preparing people and processes for the digital era w...
 
Camunda BPM 7.13 Webinar
Camunda BPM 7.13 WebinarCamunda BPM 7.13 Webinar
Camunda BPM 7.13 Webinar
 
[Webinar] Camunda Optimize Release 3.0
[Webinar] Camunda Optimize Release 3.0[Webinar] Camunda Optimize Release 3.0
[Webinar] Camunda Optimize Release 3.0
 
Webinar: Monitoring & Orchestrating Your Microservices Landscape using Workfl...
Webinar: Monitoring & Orchestrating Your Microservices Landscape using Workfl...Webinar: Monitoring & Orchestrating Your Microservices Landscape using Workfl...
Webinar: Monitoring & Orchestrating Your Microservices Landscape using Workfl...
 
Process Automation Forum, Processautomatisierung neu gedacht für das digitale...
Process Automation Forum, Processautomatisierung neu gedacht für das digitale...Process Automation Forum, Processautomatisierung neu gedacht für das digitale...
Process Automation Forum, Processautomatisierung neu gedacht für das digitale...
 
Process Automation Forum Zurich, finnova AG Bankware
Process Automation Forum Zurich, finnova AG BankwareProcess Automation Forum Zurich, finnova AG Bankware
Process Automation Forum Zurich, finnova AG Bankware
 
Process Automation Forum Munich, Swiss Life
Process Automation Forum Munich, Swiss LifeProcess Automation Forum Munich, Swiss Life
Process Automation Forum Munich, Swiss Life
 
Process Automation Forum Vienna, A1 & J-IT
Process Automation Forum Vienna, A1 & J-ITProcess Automation Forum Vienna, A1 & J-IT
Process Automation Forum Vienna, A1 & J-IT
 
Process Automation Forum Vienna, Raiffeisen
Process Automation Forum Vienna, RaiffeisenProcess Automation Forum Vienna, Raiffeisen
Process Automation Forum Vienna, Raiffeisen
 
Process Automation Forum Düsseldorf, Provinzial Rheinland Versicherung AG
Process Automation Forum Düsseldorf, Provinzial Rheinland Versicherung AGProcess Automation Forum Düsseldorf, Provinzial Rheinland Versicherung AG
Process Automation Forum Düsseldorf, Provinzial Rheinland Versicherung AG
 
[Webinar] BPM Renaissance: 5 Tips to Thrive in a Cloud-Native World
[Webinar] BPM Renaissance: 5 Tips to Thrive in a Cloud-Native World[Webinar] BPM Renaissance: 5 Tips to Thrive in a Cloud-Native World
[Webinar] BPM Renaissance: 5 Tips to Thrive in a Cloud-Native World
 

JBoss jBPM

  • 1. JBoss jBPM Die Open Source Business Process Engine JavaConferenceMünchen 12.09.2008 bernd.ruecker@camunda.com
  • 2. Bernd Rücker Wer bin ich? • Berater, Trainer, Coach • Softwareentwickler • Committer im JBoss jBPM-Projekt • Themen: – BPM & SOA – Process Execution (jPDL, BPEL, XPDL, …) – JBoss SOA Platform (jBPM, ESB, Drools, …) – Enterprise Anwendungen mit Java EE • Siehe www.camunda.com • Blog www.bpm-guide.de
  • 3. Agenda JBoss jBPM • Einführung BPM (Business Process Management) • JBoss jBPM jPDL • Prozessbeispiel • Simulation & Erweiterung • Process Virtual Machine (PVM) & jBPM 4
  • 4. Geschäftsprozesse & Software Der Status Quo in manchen Unternehmen GUI Paper Email Gui 1 Gui 2 Gui 3 Software Kunden SAP Komponente Server EAI-Tool Web-Service
  • 5. Ein „digitaler“ Prozess mit Business Process Engine Δ Durchlaufzeit Task Service Task Zuweisung Aufruf Zuweisung Process Engine IT Human Workflow EAI Human Workflow SOA
  • 6. Process Execution Business Process Engine 1.) Aufgabe erzeugen 1.) System aufrufen / Message 2.) Aufgabe abschließen 2.) Asynchrone Antwort als Message Client Tasklist Externes System Process Execution Engine Transaction / Request … Zeit process execution Task Service Task Zuweisung Aufruf Zuweisung
  • 8. Business Process Engine Middleware für Geschäftsprozesse Business Analyst Sachbearbeiter Aufgaben- Verwaltung Simulation Prozess- Prozess- Fremd- definitionen Ausführung Anwendungen Entwickler Prozess- Administration Logs Administrator Persistenz Definition Laufzeit Business Process Engine (BPM-Engine)
  • 9. Was leistet die Business Process Engine Features • Versionierung, Persistenz & Interpretation von Prozessmodellen • Steuerung & Persistenz von Prozessinstanzen • Task-Management • Wait-States • Prozesskontext (Variablen zu Prozess speichern) • Einbindung externer Services • Verwalten von Ereignissen (z.B. Timeouts) • …
  • 10. JBoss jBPM Open Source Process Execution • Business Process Engine • „Library“ • POJO-Kern: Interne Prozessrepräsentation durch Java-Modelle • Persistenz über Hibernate (DB-Unabhängigkeit) • Lauffähig mit oder ohne Application-Server • Klein und flexibel, leicht erweiterbar • Aktuell Version 3.2, Version 4 in der Entwicklung • Open Source (LGPL)
  • 11. „Graph oriented programming“ Der Prozess als gerichteter Graph Node 1 Token current Node from to leaving arriving Transitions * * Transitions Transition <process-definition> ... <node name=“serve client”> <transition name=“ok” to=“order” /> <transition name=“nok” to=“joke” /> </node> <node name=“order” /> <node name=“joke” /> ... </process-definition>
  • 13. jBPM-Vokabular jPDL Actions Task-Node Node Transition State
  • 14. Verschiedene Node-Typen jBPM in a nutshell • Task-Node: Human Tasks / Aufgaben • State: Wait-States • Fork / Join: Parallelisierung • Decision: Automatische Entscheidung • Start-State / End-State • Super-State • Process-State • … • Eigene Node-Typen mit Verhalten können implementiert werden
  • 15. jBPM & Java jBPM in a nutshell • Einfache Java-API zur Steuerung der Engine – Prozessstart – Aufgabenliste –… • Aufrufen von „User-Code“ – definierte Stellen im Prozess – Interface & Java-Klassen
  • 16. jBPM & Java jBPM in a nutshell public class MyAction implements ActionHandler { public void execute(ExecutionContext ctx) { Object var = ctx.getVariable(quot;varquot;); result = service.doSomething(var); ctx.setVariable(quot;resultquot;, result); } } JbpmConfiguration conf = JbpmConfiguration.getInstance(); JbpmContext context = conf. createJbpmContext(); ProcessInstance pi = context.getGraphSession(). findLatestProcessDefinition(quot;Ticketquot;).createProcessInstance(); pi.getRootToken().signal(); List<TaskInstance> tasks = context.getTaskMgmtSession(). findTaskInstances(quot;Vertriebquot;); tasks.get(0).end(quot;Ticket schliessenquot;); context.close();
  • 17. Nodes & States jPDL <node name=quot;Kunde anlegenquot;> <event type=quot;node-enterquot;> <action name=quot;Kunde anlegenquot; class=quot;...CreateCustomerActionquot;/> </event> <transition to=quot;Bearbeiter bekannt?quot; /> </node> <state name=quot;Ticket geschlossenquot;> <transition name=quot;wieder öffnenquot; to=quot;Ticket bearbeitenquot;> <action class=quot;de.ejbbuch.jbpm.actions.ReopenTicketActionquot; /> </transition> <transition name=quot;schliessen okquot; to=quot;Mail versendenquot; /> </state>
  • 18. jPDL – Decisions jPDL <decision name=quot;Kunde bekannt?quot;> <handler class=quot;de.ejbbuch.jbpm.decision.CustomerExistDecisionquot;/> <transition name=quot;falsequot; to=quot;Kunde anlegenquot; /> <transition name=quot;truequot; to=quot;Bearbeiter bekannt?quot;> <action class=quot;de.ejbbuch.jbpm.actions.LoadCustomerActionquot; /> </transition> </decision> Java <decision name=quot;Bearbeiter bekannt?quot; expression=quot;#{clerk!=null}quot;> <transition name=quot;falsequot; to=quot;Bearbeiter zuweisenquot;></transition> <transition name=quot;truequot; to=quot;Ticket anlegenquot;></transition> </decision> JSF-Expression
  • 19. jBPM-Descision Automatische Entscheidungen als Java-Code public class CustomerExistDecision implements DecisionHandler { public String decide(ExecutionContext ctx) throws Exception { // get variable quot;customerIdquot; out of process context String customerId = (String)ctx.getVariable(quot;customerIdquot;); ... if (...) return quot;truequot;; else return quot;falsequot;; } }
  • 20. jBPM in der Architektur Einbettung in eigene Anwendung • jBPM kann in eigene Java-Architektur integriert werden • Process Engine ist eigene Architekturschicht • Domänenobjekte oder Referenzen als Prozessvariablen • Ansteuerung ext. EJB-Container (oder Tomcat oder Java SE) jBPM (jPDL) Services im Prozess Session Human Task Bean Mgmnt EJB JCA JMS WS
  • 21. Command-Pattern Remote-Zugriffe und Asynchronität public class TaskInstanceEndCommand implements Command { ... public Object execute(JbpmContext jbpmContext) { TaskInstance taskInstance = getTaskInstance(jbpmContext); if (transitionName == null) { taskInstance.end(); } else { taskInstance.end(transitionName); } return taskInstance; } ... }
  • 22. Beispiel: EJB3 + Swing Swing-GUI EJB-Container BPM-Engine Commands Command Command Service Service SLSB MDB Webcontainer Message Mit Web-GUI Commands EJB JCA JMS … Korrelation Fremd- systeme
  • 23. Vergleich zu BPEL Java beheimatet JBoss jBPM EJB-Container (oder Tomcat oder Java SE) jBPM (jPDL) Human Session Task Bean Mgmnt EJB JCA JMS WS BPEL-Server WS Java WS WS WS WS EJB-Container .NET Human … Task Mgmnt EJB JMS, …
  • 25. Prozess Deployment Den Prozess zum Leben erwecken • Java API • Ant • Eclipse-Designer XML deploy jBPM API • Web-Console Neue .class • AdminClient Version • MBean DB • … • Prozessversionierung • Action-Klassen können mit deployed und versioniert werden
  • 26. Demoanwendung Architektur Browser jBPM Web-Console (JSF) Geschäftsprozess Action Action JBoss jBPM (Webanwendung) Zur Vereinfachung in der Übung: Pure Java! CRM System Ticket System Tomcat
  • 27. CRM- & Ticketsystem Einfachste Java EE Implementierung & Prozessintegration Prozesskontext Prozesskontext customerId 0815 :: customerId 0815 ticketId : : ticketId 007 007 <<Service>> <<Service>> CrmService TicketService + findCustomer:Customer + createTicket:Ticket + existCustomer:boolean + getTicket:Ticket + createCustomer:Customer <<Entity>> <<Entity>> Customer Ticket + id:int + id:int + givenname:String + description:String + surname:String + content:String + email:String + open:boolean
  • 28. DEMO
  • 29. Vision Geschäftsprozesssimulation Business Process Simulation (BPS) Same model as process model & for process additional info execution benchmarks, (stochastic) KPI, … simulation alternative process structures Analysis Control Design BAM Iterative Improvement Life data Execution Implementation from history
  • 30. Beispiel Warenrücknahme-Prozess Fragestellungen: process runs: 195 Swimlane • Wie viele Mitarbeiter benötige Avg, duration (standard derivation) ich für eine bestimmte Arbeitslast? 100 95 • Wo Accounta optimale Punkt liegt der zwischen zu vielen und zu nt wenigen Leuten? 180 (30) 195 Clerk 180 (60) 165 Tester 30 732,25 (448) 145 20 Accounta dispatcher nt 325.50 (182) 180 (30) 175 20
  • 31. Simulation input Business Process Simulation (BPS) distribution of start events (amount and time) distribution of waiting time resource pools distribution of duration/processing time for task distribution of duration/processing time for task
  • 32. jBPM Simulationskomponente Business Process Simulation (BPS) • Entwicklelt als Master Thesis • JBoss jBPM • DESMO-J – Java Simulation Framework – Discrete Event Simulation (DES) – Entwickelt von der Uni Hamburg – Open Source (Apache License)
  • 33. Combination of BPM & DES ? Business DES- Process Framework: Engine: DESMO-J JBoss jBPM
  • 34. Combination of BPM & DES in action 21:33 21:33 Eventlist 21:40 start process Distributions Counters & data collectors
  • 35. Combination of BPM & DES in action 21:40 21:40 21:33 Eventlist 21:40 start process 21:40 start process 22:07 start process 22:55 parcel arrived Distributions Counters & data collectors
  • 36. Combination of BPM & DES in action 22:55 22:55 Eventlist 22:55 parcel arrived 22:55 parcel arrived Distributions Counters & data collectors
  • 37. Implementierung Prozessparser & jbpm-configuration <jbpm-configuration> <string name=quot;resource.action.typesquot; value=quot;org/jbpm/sim/simulation.action.types.xmlquot;/> <string name=quot;resource.node.typesquot; value=quot;org/jbpm/sim/simulation.node.types.xmlquot;/> </jbpm-configuration>
  • 38. Implementierung Über eigene Nodes und Actions <node-types> <node-type element=quot;decisionquot; class=quot;org.jbpm.sim.jpdl.SimDecisionquot; /> <node-type element=quot;statequot; class=quot;org.jbpm.sim.jpdl.SimStatequot; /> <node-type element=quot;start-statequot; class=quot;org.jbpm.graph.node.StartStatequot; /> <node-type element=quot;end-statequot; class=quot;org.jbpm.graph.node.EndStatequot; /> ... <node-type element=quot;mail-nodequot; class=quot;org.jbpm.graph.def.Nodequot; /> </node-types> <action-types> <action-type element=quot;actionquot; class=quot;org.jbpm.sim.jpdl.SimActionquot; /> <action-type element=quot;simulation-actionquot; class=quot;org.jbpm.sim.jpdl.SimActionquot; /> ... <action-type element=quot;mailquot; class=quot;org.jbpm.sim.action.EmptyActionquot; /> </action-types>
  • 39. Ausblick: Process Virtual Machine JBoss PVM • Es existieren verschiedenste Prozessausführungs- sprachen (Process Execution Language) – BPEL, XPDL, jPDL, DSL‘s, … • Es gibt nicht die perfekte Sprache • Koexistenz von verschiedenen Sprachen erlauben • Sprache nach Problem auswählen  Grundfunktionalität Prozessmaschine in PVM
  • 40. Konzepte & Kernabstraktionen Prozesse als Zustandsautomat Verhalten über Sprache definiert
  • 42. Just an API PVM definiert keine Sprache ProcessDefinition processDefinition = ProcessFactory.build() .node(quot;accept loan requestquot;).initial().behaviour(new WaitState()) .transition().to(quot;loan evaluationquot;) .node(quot;loan evaluationquot;).behaviour(new WaitState()) .transition(quot;approvequot;).to(quot;wire the moneyquot;) .transition(quot;rejectquot;).to(quot;endquot;) .node(quot;wire the moneyquot;).behaviour(new Display(quot;automatic paymentquot;)) .transition().to(quot;endquot;) .node(quot;endquot;).behaviour(new WaitState()) .done();
  • 43. Prozesssprachen Die PVM unterstützt verschiedene Sprachen • Graphen / Blockstruktur • Sprache kann durch entsprechendes Node-Verhalten implementiert werden • Es wird geben – XPDL: Nova Bonita (Ende 2008) – jPDL: JBoss jBPM JPDL 4 (Anfang 2009) – BPEL • Sprachen sind in XML umgesetzt
  • 44. Fazit JBoss jBPM • Im Java Umfeld ist JBoss jBPM sehr interessant • „Leichtgewichtig“ und in verschiedensten Umgebungen Lauffähig • Erweiterbar und flexibel • PVM bildet Grundlage für verschiedenste Engines • Modelgetriebene Ansätze denkbar • Vision und Roadmap vorhanden! 2 Antworten auf Standardfragen: • Performance und Skalierbarkeit bei korrektem Einsatz kein Problem • Ja, Tooling (Designer und Webconsole) ist verbesserungsbedürftig ;-)
  • 45. Fragen & Antworten Bernd Rücker Geschäftsführer Berater, Trainer & Coach bernd.ruecker@camunda.com +49 711 3278645 +49 171 1473461 Unsere Themen • Ganzheitliches BPM • Prozessautomatisierung • SOA, BPEL, XPDL, jBPM, Drools, ESB • BPMN • BPM-Toolauswahl Unsere Leistungen • Beratung • Seminare • Process Hosting