SlideShare une entreprise Scribd logo
1  sur  36
&



jBPM & BPMN


jPrase


Vít Kotačka



24. 11. 2011
© Adastra Group
Agenda


     BPMN
       ̶   Overview
     jBPM
       ̶   JBoss Middleware & BRMS
       ̶   Core Engine API
       ̶   Process Nodes
       ̶   Human Tasks
       ̶   Testing & debugging




2
BPMN Overview




3
Business Process Model and Notation


     Graphical representation for specifying business processes.
     Providing a notation that is intuitive to business users :-)
     Maintained by OMG (Object Management Group).
     Similar to Activity Diagrams from UML.
     Provides a mapping between
      the graphics of the notation
      and the underlying constructs
      of execution languages (BPEL).
     Shows the flow of data (messages),
       but it is not a data flow diagram.




4
Example Diagram
Business Process BPMN




                                                   Activity2
    FirstLine




                                    Activity1

                 StartEvent1                                   EndEvent1


                                                   Activity3
    SecondLine




                                                   Activity4




                                   Use Case1



                                 (from Use Case)


5
Elements


     Flow objects
        ̶   Activity
        ̶   Event
        ̶   Gateway
     Connecting object
        ̶   Sequence flow
        ̶   Message flow
        ̶   Association
     Swim lanes
        ̶   Pool
        ̶   Lane
     Artifacts
        ̶   Data object
        ̶   Group
6
Activities




7
Events


     Start Event
     Stop Event
     Intermediate Event
       ̶   Interrupting
       ̶   Non-interrupting




8
Gateways




9
Swimlines




10
72 Implementations




11
JBoss Middleware & BRMS




12
JBoss Enterprise Middleware




13
JBoss Enterprise SOA




14
Drools/JBoss BRMS


      Drools Guvnor: A centralised repository for Drools
       Knowledge Bases. The repository component is
       where you can store versions of rules, models,
       functions, processes etc.
      Drools Expert: A forward chaining rule engine based
       on Rete algorithm.
      jBPM: A light-weight, extensible workflow engine
       written in pure Java that allows to execute business
       processes using the latest BPMN 2.0 specification.




15
Core Engine API




16
Core Engine




17
Knowledge Base


        Contains a reference to all the relevant process definitions.
        Can be shared across sessions.
        Usually is only created once (at the start of the application).
        Can be dynamically changed (add/remove process at runtime).

     KnowledgeBuilder kBuilder =
          KnowledgeBuilderFactory
                .newKnowledgeBuilder();
     kBuilder.add(ResourceFactory
                .newClassPathResource("hello.bpmn"),
                                 ResourceType.BPMN2);
     KnowledgeBase kBase =
          kBuilder.newKnowledgeBase();

18
Session


        Can be created based on a knowledge base.
        Are used to execute processes and interact with engine.
        Multiple sessions can be created (independency, scalability).
        Is relatively lightweight.

     StatefulKnowledgeSession session =
          kBase.newStatefulKnowledgeSession();
     ProcessInstance process =
          session.startProcess(
                     "com.adastracorp.jbpm.hello");




19
Events


      Session can register listeners.
      ProcessEventListener listens to process-related events.
      KnowledgeRuntimeLoggerFactory adds logger to session.
        ̶   console logger
        ̶   file logger




20
ProcessEventListener




21
Process Nodes




22
Process Node Types


      Events: They are used to model the occurrence of a particular
       event.
      Activities: These define the different actions that need to be
       performed during the execution of the process.
      Gateways: Can be used to define multiple paths in the
       process.




23
Events


      Start Event: The start of the process.
      End Events
         ̶   End Event: The end of the process.
         ̶   Throwing Error Event: Can be used to signal
             an exceptional condition in the process.
      Intermediate Events
         ̶   Catching Timer Event: A timer that can trigger
           one or multiple times after a given period of
           time.
         ̶ Catching Signal Event: Can be used to
           respond to internal or external events during
           the execution of the process.
24
Gateways


      Diverging Gateway
        ̶   AND (parallel)
        ̶   XOR (exclusive)
        ̶   OR (inclusive)


      Converging Gateway
        ̶   AND
        ̶   XOR




25
Activities


      Script Task: A script that should be executed in this
       process. Can access any variables and globals.
      Service Task: An (abstract) unit of work that should
       be executed in this process (work that is executed
       outside the process engine).
      User Task: An (atomic) task that need to be
       executed by human actors.
      Reusable Sub-process: An invocation of another
       process from within this process.
      Business Rule Task: A set of rules that need to be
       evaluated. Rules are defined in separate files using
       the Drools rule format.


26
Activities


      Embedded Sub-process: A Sub-
       Process is a node that can contain
       other nodes so that it acts as a node
       container. If you use a terminating
       event node inside a sub-process, you
       are terminating the top-level process
       instance, not just that sub-process.
      Mulit-instance Sub-process: Allows you
       to execute the contained process
       segment multiple times, once for each
       element in a collection.




27
Human Tasks




28
Human Tasks


      Based on the WS-HumanTask specification.
      An atomic task that needs to be executed by a human actor.
      Can be assigned to
         ̶   one specific user
         ̶   one or more groups
      Can be used in combination with swimlanes to assign multiple
       human tasks to the same actor.
      Human task service
         ̶   manages the life cycle of the tasks (creation, claiming, completion, etc.)
         ̶   stores the state of all the tasks
         ̶   supports features like internationalization, calendar integration, different
             types of assignments, delegation, deadlines, etc.



29
Human Task Model




30
Human Task Life-cycle




31
Testing & debugging




32
Debugging


      Process Instance(s) View shows the currently running process
       instances.



      Human Task View can connect to a running human task
       service and request the relevant tasks for a particular user.




      Audit View is a log of all events that were logged from the
       session.


33
What has been omitted


        Rule Tasks
        Persistence
        Transactions
        Domain-specific processes
        Process (Knowledge) repository
        Business Activity Monitoring
        Flexible Processes




34
Sources


      http://www.bpmn.org/
      http://www.bpmb.de/images/BPMN2_0_Poster_EN.pdf
      http://www.jboss.org/jbpm




35
36

Contenu connexe

Tendances

2 ways to get total sum of interactive grid column oracle apex ontoor blogs
2 ways to get total sum of interactive grid column oracle apex   ontoor blogs2 ways to get total sum of interactive grid column oracle apex   ontoor blogs
2 ways to get total sum of interactive grid column oracle apex ontoor blogs
sulimankareem
 

Tendances (20)

Developing Complex Business Rules with Drools Integration
Developing Complex Business Rules with Drools IntegrationDeveloping Complex Business Rules with Drools Integration
Developing Complex Business Rules with Drools Integration
 
Acercándonos a la Programación Funcional a través de la Arquitectura Hexag...
Acercándonos a la Programación Funcional a través de la Arquitectura Hexag...Acercándonos a la Programación Funcional a través de la Arquitectura Hexag...
Acercándonos a la Programación Funcional a través de la Arquitectura Hexag...
 
Towards Functional Programming through Hexagonal Architecture
Towards Functional Programming through Hexagonal ArchitectureTowards Functional Programming through Hexagonal Architecture
Towards Functional Programming through Hexagonal Architecture
 
The Secrets of Hexagonal Architecture
The Secrets of Hexagonal ArchitectureThe Secrets of Hexagonal Architecture
The Secrets of Hexagonal Architecture
 
Integrate OutSystems With Office 365
Integrate OutSystems With Office 365Integrate OutSystems With Office 365
Integrate OutSystems With Office 365
 
Spring Boot Observability
Spring Boot ObservabilitySpring Boot Observability
Spring Boot Observability
 
Introduction to CRI and OCI
Introduction to CRI and OCIIntroduction to CRI and OCI
Introduction to CRI and OCI
 
JPA For Beginner's
JPA For Beginner'sJPA For Beginner's
JPA For Beginner's
 
Drools and jBPM 6 Overview
Drools and jBPM 6 OverviewDrools and jBPM 6 Overview
Drools and jBPM 6 Overview
 
Protege tutorial
Protege tutorialProtege tutorial
Protege tutorial
 
Rule Engine & Drools
Rule Engine & DroolsRule Engine & Drools
Rule Engine & Drools
 
Spring data jpa
Spring data jpaSpring data jpa
Spring data jpa
 
2 ways to get total sum of interactive grid column oracle apex ontoor blogs
2 ways to get total sum of interactive grid column oracle apex   ontoor blogs2 ways to get total sum of interactive grid column oracle apex   ontoor blogs
2 ways to get total sum of interactive grid column oracle apex ontoor blogs
 
Role based access control - RBAC - Kubernetes
Role based access control - RBAC - KubernetesRole based access control - RBAC - Kubernetes
Role based access control - RBAC - Kubernetes
 
What is Dependency Injection in Spring Boot | Edureka
What is Dependency Injection in Spring Boot | EdurekaWhat is Dependency Injection in Spring Boot | Edureka
What is Dependency Injection in Spring Boot | Edureka
 
Spring ioc
Spring iocSpring ioc
Spring ioc
 
Loom Virtual Threads in the JDK 19
Loom Virtual Threads in the JDK 19Loom Virtual Threads in the JDK 19
Loom Virtual Threads in the JDK 19
 
Cloud Native Java GraalVM 이상과 현실
Cloud Native Java GraalVM 이상과 현실Cloud Native Java GraalVM 이상과 현실
Cloud Native Java GraalVM 이상과 현실
 
Spring cloud for microservices architecture
Spring cloud for microservices architectureSpring cloud for microservices architecture
Spring cloud for microservices architecture
 
OpenShift-Technical-Overview.pdf
OpenShift-Technical-Overview.pdfOpenShift-Technical-Overview.pdf
OpenShift-Technical-Overview.pdf
 

En vedette

Jboss jbpm and drools 1 introduction to drools architecture
Jboss jbpm and drools   1 introduction to drools architectureJboss jbpm and drools   1 introduction to drools architecture
Jboss jbpm and drools 1 introduction to drools architecture
Zoran Hristov
 

En vedette (14)

Decision Management : M2DL@UPS Lecture
Decision Management : M2DL@UPS LectureDecision Management : M2DL@UPS Lecture
Decision Management : M2DL@UPS Lecture
 
Decision Service Architecture - Red Hat Forum Paris 2015
Decision Service Architecture - Red Hat Forum Paris 2015Decision Service Architecture - Red Hat Forum Paris 2015
Decision Service Architecture - Red Hat Forum Paris 2015
 
DecisionsFrst Modeler and Red Hat JBoss BRMS
DecisionsFrst Modeler and Red Hat JBoss BRMSDecisionsFrst Modeler and Red Hat JBoss BRMS
DecisionsFrst Modeler and Red Hat JBoss BRMS
 
Jboss jbpm and drools 1 introduction to drools architecture
Jboss jbpm and drools   1 introduction to drools architectureJboss jbpm and drools   1 introduction to drools architecture
Jboss jbpm and drools 1 introduction to drools architecture
 
Intro to Drools - St Louis Gateway JUG
Intro to Drools - St Louis Gateway JUGIntro to Drools - St Louis Gateway JUG
Intro to Drools - St Louis Gateway JUG
 
JBoss BRMS sneak peak, the future is now for your Business Processes
JBoss BRMS sneak peak, the future is now for your Business ProcessesJBoss BRMS sneak peak, the future is now for your Business Processes
JBoss BRMS sneak peak, the future is now for your Business Processes
 
Red Hat JBoss BRMS Primer - JBoss Business Rules and BPM Solutions
Red Hat JBoss BRMS Primer - JBoss Business Rules and BPM SolutionsRed Hat JBoss BRMS Primer - JBoss Business Rules and BPM Solutions
Red Hat JBoss BRMS Primer - JBoss Business Rules and BPM Solutions
 
Application Architecture -Data, Process, Rule-
Application Architecture -Data, Process, Rule-Application Architecture -Data, Process, Rule-
Application Architecture -Data, Process, Rule-
 
Zero to Hero Using Red Hat JBoss BRMS
Zero to Hero Using Red Hat JBoss BRMSZero to Hero Using Red Hat JBoss BRMS
Zero to Hero Using Red Hat JBoss BRMS
 
JBoss BRMS - The enterprise platform for business logic
JBoss BRMS - The enterprise platform for business logicJBoss BRMS - The enterprise platform for business logic
JBoss BRMS - The enterprise platform for business logic
 
JBoss Business Rules Management System (BRMS) Primer
JBoss Business Rules Management System (BRMS) PrimerJBoss Business Rules Management System (BRMS) Primer
JBoss Business Rules Management System (BRMS) Primer
 
Drools 6 deep dive
Drools 6 deep diveDrools 6 deep dive
Drools 6 deep dive
 
Drools 6.0 (Red Hat Summit)
Drools 6.0 (Red Hat Summit)Drools 6.0 (Red Hat Summit)
Drools 6.0 (Red Hat Summit)
 
JBoss Drools and Drools Fusion (CEP): Making Business Rules react to RTE
JBoss Drools and Drools Fusion (CEP): Making Business Rules react to RTEJBoss Drools and Drools Fusion (CEP): Making Business Rules react to RTE
JBoss Drools and Drools Fusion (CEP): Making Business Rules react to RTE
 

Similaire à jBPM

Cross Language Process Model Reuse Po Em2009
Cross Language Process Model Reuse Po Em2009Cross Language Process Model Reuse Po Em2009
Cross Language Process Model Reuse Po Em2009
mturi
 
Devops presentation
Devops presentationDevops presentation
Devops presentation
k9ert
 
A Practical Event Driven Model
A Practical Event Driven ModelA Practical Event Driven Model
A Practical Event Driven Model
Xi Wu
 
Week 11Linux InternalsProcesses, schedulingLecture o.docx
Week 11Linux InternalsProcesses, schedulingLecture o.docxWeek 11Linux InternalsProcesses, schedulingLecture o.docx
Week 11Linux InternalsProcesses, schedulingLecture o.docx
melbruce90096
 
20061122 JBoss-World Experiences with JBoss jBPM
20061122 JBoss-World Experiences with JBoss jBPM20061122 JBoss-World Experiences with JBoss jBPM
20061122 JBoss-World Experiences with JBoss jBPM
camunda services GmbH
 

Similaire à jBPM (20)

Cross Language Process Model Reuse Po Em2009
Cross Language Process Model Reuse Po Em2009Cross Language Process Model Reuse Po Em2009
Cross Language Process Model Reuse Po Em2009
 
2005 10-11 mm (seoul, korea - bpm korea forum) xpdl2 tutorial
2005 10-11 mm (seoul, korea - bpm korea forum) xpdl2 tutorial2005 10-11 mm (seoul, korea - bpm korea forum) xpdl2 tutorial
2005 10-11 mm (seoul, korea - bpm korea forum) xpdl2 tutorial
 
Pdf mbs workflow
Pdf mbs workflowPdf mbs workflow
Pdf mbs workflow
 
CS101- Introduction to Computing- Lecture 32
CS101- Introduction to Computing- Lecture 32CS101- Introduction to Computing- Lecture 32
CS101- Introduction to Computing- Lecture 32
 
javascript Event Handling and introduction to event.ppt
javascript Event Handling and introduction to event.pptjavascript Event Handling and introduction to event.ppt
javascript Event Handling and introduction to event.ppt
 
Event Programming JavaScript
Event Programming JavaScriptEvent Programming JavaScript
Event Programming JavaScript
 
Business processes, business rules, complex event processing, the JBoss way
Business processes, business rules, complex event processing, the JBoss wayBusiness processes, business rules, complex event processing, the JBoss way
Business processes, business rules, complex event processing, the JBoss way
 
jBPM5 Community Training Module 4: jBPM5 APIs Overview + Hands On
jBPM5 Community Training Module 4: jBPM5 APIs Overview + Hands OnjBPM5 Community Training Module 4: jBPM5 APIs Overview + Hands On
jBPM5 Community Training Module 4: jBPM5 APIs Overview + Hands On
 
20051019 automating regression testing for evolving gui software
20051019 automating regression testing for evolving gui software20051019 automating regression testing for evolving gui software
20051019 automating regression testing for evolving gui software
 
JBPM5 Community Training Course - Module #1 Introduction
JBPM5 Community Training Course - Module #1 IntroductionJBPM5 Community Training Course - Module #1 Introduction
JBPM5 Community Training Course - Module #1 Introduction
 
Devops presentation
Devops presentationDevops presentation
Devops presentation
 
DDD Framework for Java: JdonFramework
DDD Framework for Java: JdonFrameworkDDD Framework for Java: JdonFramework
DDD Framework for Java: JdonFramework
 
A Practical Event Driven Model
A Practical Event Driven ModelA Practical Event Driven Model
A Practical Event Driven Model
 
Serverless London 2019 FaaS composition using Kafka and CloudEvents
Serverless London 2019   FaaS composition using Kafka and CloudEventsServerless London 2019   FaaS composition using Kafka and CloudEvents
Serverless London 2019 FaaS composition using Kafka and CloudEvents
 
Tk2323 lecture 11 process and thread
Tk2323 lecture 11   process and threadTk2323 lecture 11   process and thread
Tk2323 lecture 11 process and thread
 
Week 11Linux InternalsProcesses, schedulingLecture o.docx
Week 11Linux InternalsProcesses, schedulingLecture o.docxWeek 11Linux InternalsProcesses, schedulingLecture o.docx
Week 11Linux InternalsProcesses, schedulingLecture o.docx
 
20061122 JBoss-World Experiences with JBoss jBPM
20061122 JBoss-World Experiences with JBoss jBPM20061122 JBoss-World Experiences with JBoss jBPM
20061122 JBoss-World Experiences with JBoss jBPM
 
Chapter 3 chapter reading task
Chapter 3 chapter reading taskChapter 3 chapter reading task
Chapter 3 chapter reading task
 
Andrii Dembitskyi "Events in our applications Event bus and distributed systems"
Andrii Dembitskyi "Events in our applications Event bus and distributed systems"Andrii Dembitskyi "Events in our applications Event bus and distributed systems"
Andrii Dembitskyi "Events in our applications Event bus and distributed systems"
 
Drools & jBPM Info Sheet
Drools & jBPM Info SheetDrools & jBPM Info Sheet
Drools & jBPM Info Sheet
 

Plus de Vít Kotačka (8)

Kanban Overview
Kanban OverviewKanban Overview
Kanban Overview
 
Gradle
GradleGradle
Gradle
 
Použití JUnit a Mock frameworků pro testování Java EE architektury
Použití JUnit a Mock frameworků pro testování Java EE architekturyPoužití JUnit a Mock frameworků pro testování Java EE architektury
Použití JUnit a Mock frameworků pro testování Java EE architektury
 
WMQ, WMB and EIP
WMQ, WMB and EIPWMQ, WMB and EIP
WMQ, WMB and EIP
 
Enterprise Systems Integration
Enterprise Systems IntegrationEnterprise Systems Integration
Enterprise Systems Integration
 
Prototypování v Groovy a Grails
Prototypování v Groovy a GrailsPrototypování v Groovy a Grails
Prototypování v Groovy a Grails
 
Apache Maven
Apache MavenApache Maven
Apache Maven
 
Apache Wicket
Apache WicketApache Wicket
Apache Wicket
 

Dernier

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Dernier (20)

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 

jBPM

  • 1. & jBPM & BPMN jPrase Vít Kotačka 24. 11. 2011 © Adastra Group
  • 2. Agenda  BPMN ̶ Overview  jBPM ̶ JBoss Middleware & BRMS ̶ Core Engine API ̶ Process Nodes ̶ Human Tasks ̶ Testing & debugging 2
  • 4. Business Process Model and Notation  Graphical representation for specifying business processes.  Providing a notation that is intuitive to business users :-)  Maintained by OMG (Object Management Group).  Similar to Activity Diagrams from UML.  Provides a mapping between the graphics of the notation and the underlying constructs of execution languages (BPEL).  Shows the flow of data (messages), but it is not a data flow diagram. 4
  • 5. Example Diagram Business Process BPMN Activity2 FirstLine Activity1 StartEvent1 EndEvent1 Activity3 SecondLine Activity4 Use Case1 (from Use Case) 5
  • 6. Elements  Flow objects ̶ Activity ̶ Event ̶ Gateway  Connecting object ̶ Sequence flow ̶ Message flow ̶ Association  Swim lanes ̶ Pool ̶ Lane  Artifacts ̶ Data object ̶ Group 6
  • 8. Events  Start Event  Stop Event  Intermediate Event ̶ Interrupting ̶ Non-interrupting 8
  • 15. Drools/JBoss BRMS  Drools Guvnor: A centralised repository for Drools Knowledge Bases. The repository component is where you can store versions of rules, models, functions, processes etc.  Drools Expert: A forward chaining rule engine based on Rete algorithm.  jBPM: A light-weight, extensible workflow engine written in pure Java that allows to execute business processes using the latest BPMN 2.0 specification. 15
  • 18. Knowledge Base  Contains a reference to all the relevant process definitions.  Can be shared across sessions.  Usually is only created once (at the start of the application).  Can be dynamically changed (add/remove process at runtime). KnowledgeBuilder kBuilder = KnowledgeBuilderFactory .newKnowledgeBuilder(); kBuilder.add(ResourceFactory .newClassPathResource("hello.bpmn"), ResourceType.BPMN2); KnowledgeBase kBase = kBuilder.newKnowledgeBase(); 18
  • 19. Session  Can be created based on a knowledge base.  Are used to execute processes and interact with engine.  Multiple sessions can be created (independency, scalability).  Is relatively lightweight. StatefulKnowledgeSession session = kBase.newStatefulKnowledgeSession(); ProcessInstance process = session.startProcess( "com.adastracorp.jbpm.hello"); 19
  • 20. Events  Session can register listeners.  ProcessEventListener listens to process-related events.  KnowledgeRuntimeLoggerFactory adds logger to session. ̶ console logger ̶ file logger 20
  • 23. Process Node Types  Events: They are used to model the occurrence of a particular event.  Activities: These define the different actions that need to be performed during the execution of the process.  Gateways: Can be used to define multiple paths in the process. 23
  • 24. Events  Start Event: The start of the process.  End Events ̶ End Event: The end of the process. ̶ Throwing Error Event: Can be used to signal an exceptional condition in the process.  Intermediate Events ̶ Catching Timer Event: A timer that can trigger one or multiple times after a given period of time. ̶ Catching Signal Event: Can be used to respond to internal or external events during the execution of the process. 24
  • 25. Gateways  Diverging Gateway ̶ AND (parallel) ̶ XOR (exclusive) ̶ OR (inclusive)  Converging Gateway ̶ AND ̶ XOR 25
  • 26. Activities  Script Task: A script that should be executed in this process. Can access any variables and globals.  Service Task: An (abstract) unit of work that should be executed in this process (work that is executed outside the process engine).  User Task: An (atomic) task that need to be executed by human actors.  Reusable Sub-process: An invocation of another process from within this process.  Business Rule Task: A set of rules that need to be evaluated. Rules are defined in separate files using the Drools rule format. 26
  • 27. Activities  Embedded Sub-process: A Sub- Process is a node that can contain other nodes so that it acts as a node container. If you use a terminating event node inside a sub-process, you are terminating the top-level process instance, not just that sub-process.  Mulit-instance Sub-process: Allows you to execute the contained process segment multiple times, once for each element in a collection. 27
  • 29. Human Tasks  Based on the WS-HumanTask specification.  An atomic task that needs to be executed by a human actor.  Can be assigned to ̶ one specific user ̶ one or more groups  Can be used in combination with swimlanes to assign multiple human tasks to the same actor.  Human task service ̶ manages the life cycle of the tasks (creation, claiming, completion, etc.) ̶ stores the state of all the tasks ̶ supports features like internationalization, calendar integration, different types of assignments, delegation, deadlines, etc. 29
  • 33. Debugging  Process Instance(s) View shows the currently running process instances.  Human Task View can connect to a running human task service and request the relevant tasks for a particular user.  Audit View is a log of all events that were logged from the session. 33
  • 34. What has been omitted  Rule Tasks  Persistence  Transactions  Domain-specific processes  Process (Knowledge) repository  Business Activity Monitoring  Flexible Processes 34
  • 35. Sources  http://www.bpmn.org/  http://www.bpmb.de/images/BPMN2_0_Poster_EN.pdf  http://www.jboss.org/jbpm 35
  • 36. 36