You are previewing jBPM Developer Guide.
O'Reilly logo
jBPM Developer Guide

Book Description

A Java developer's guide to the JBoss Business Process Management framework

  • Thoroughly understand how the jBPM framework works

  • Build custom Java Enterprise solutions using the jBPM framework

  • No experience with jBPM required

  • Helpful guidance on converting a business analyst's spec into complete, working software

  • Helpful guidance on converting a business analyst's spec into complete, working software

In Detail

jBPM is an open source business process management (BPM) solution used for defining and executing business processes. Java developers can use jBPM to analyze, improve, and maintain their business processes. This book steers you through each point of the jBPM framework and its implementation to model your business processes.

The book starts by explaining the key concepts in a Business Process Management framework. It will help you to learn and practice all of the conceptual and theoretical terms used in the Business Process Management field. Then you will master jPDL, the preferred process language for jBMP, which will let you specify exactly how your processes must be defined and implemented.

From here on, the book takes a closer look at the engine, discussing a broad range of topics from building real business processes inside real applications to learning and implementing advanced capabilities of the jPDL and jBPM framework. It will also help you to handle vital information and tasks related to persistence, integrating jBPM with other enterprise systems, and deploying jBPM to existing J2EE application servers.

By the end of this book, you will gain all the experience required to implement solutions that use the framework as well as to make decisions about how the framework needs to be used in particular situations.

Table of Contents

  1. jBPM Developer Guide
  2. Credits
  3. About the Author
  4. About the Reviewers
  5. Preface
    1. What this book covers
    2. Who this book is for
    3. Conventions
    4. Reader feedback
    5. Customer support
      1. Errata
      2. Piracy
      3. Questions
  6. 1. Why Developers Need BPM?
    1. Business Process, why should I know about that?
      1. "A sequence of tasks that happen in a repeatable order"
      2. "executed by humans and/or systems"
      3. "to achieve a business goal"
      4. I know what BPs are, but what about the final "M" in BPM?
      5. BPM stages
      6. BPM stages in a real-life scenario
      7. BPM improvements
        1. Global understanding of our processes
        2. Agile interaction between systems, people, and teams
        3. Reduce paperwork
        4. Real-time process information
        5. Process information analysis
        6. Statistics and measures about each execution
      8. BPM and system integration "history"
    2. Some buzzwords that we are going to hear when people talk about BPM
      1. Theoretical definitions
        1. Integration (system integration)
        2. Workflow
        3. Service Oriented Architecture (SOA)
        4. Orchestration
      2. Technological terms
        1. Workflow
        2. Enterprise Service Bus (ESB)
        3. BPEL (WS-BPEL)
    3. Business Process Management Systems (BPMS), my tool and your tool from now on
      1. BPM systems versus BPM suites
      2. Why we really need to know BPM and BPMS, and how do they change/impact on our daily life
      3. New approach
      4. Homework
    4. Summary
  7. 2. jBPM for Developers
    1. Graph Oriented Programming
    2. Common development process
      1. Database model
      2. Business logic
      3. User interfaces
    3. Decoupling processes from our applications
    4. Graph Oriented Programming on top of OOP
    5. Implementing Graph Oriented Programming on top of the Java language (finally Java code!)
      1. Modeling nodes in the object-oriented world
      2. Modeling a transition in the object-oriented world
      3. Expanding our language
      4. Process Definition: a node container
    6. Implementing our process definition
      1. The Node concept in Java
      2. The Transition concept in Java
      3. The Definition concept in Java
    7. Testing our brand new classes
    8. Process execution
    9. Wait states versus automatic nodes
      1. Asynchronous System Interactions
      2. Human tasks
      3. Creating the execution concept in Java
    10. Homework
    11. Creating a simple language
    12. Nodes description
      1. Stage one
      2. Stage two
      3. Stage three
    13. Homework solution
    14. Quick start guide to building Maven projects
    15. Summary
  8. 3. Setting Up Our Tools
    1. Background about the jBPM project
      1. JBoss Drools
      2. JBoss ESB
      3. JBoss jBPM
        1. Supported languages
        2. Other modules
    2. Tools and software
      1. Mavenwhy do I need it?
        1. Standard structure for all your projects
        2. Centralized project and dependencies description
        3. Maven installation
      2. Installing MySQL
        1. Downloading MySQL JConnector
      3. Eclipse IDE
        1. Install Maven support for Eclipse
      4. SVN client
    3. Starting with jBPM
      1. Getting jBPM
        1. From binary
          1. config directory
          2. database directory
          3. designer directory
          4. docs directory
          5. examples directory
          6. lib directory
          7. src directory
        2. From source code
    4. jBPM structure
      1. Core module
      2. DB module
      3. Distribution module
      4. Enterprise module
      5. Example module
      6. Identity module
      7. Simulation module
      8. User Guide module
    5. Building real world applications
      1. Eclipse Plugin Project/GPD Introduction
        1. GPD Project structure
          1. SimpleProcessTest
        2. Graphical Process Editor
          1. The Diagram tab
          2. The Deployment tab
          3. The Source tab
          4. Properties panel
        3. Outcome
    6. Maven project
    7. Homework
    8. Summary
  9. 4. jPDL Language
    1. jPDL introduction
    2. jPDL structure
    3. Process structure
      1. GraphElement information and behavior
      2. NodeCollection methods
      3. ProcessDefinition properties
      4. Functional capabilities
        1. Constructing a process definition
        2. Adding custom behavior (actions)
    4. Nodes inside our processes
      1. ProcessDefinition parsing process
    5. Base node
      1. Information that we really need to know about each node
    6. Node lifecycle (events)
      1. Constructors
      2. Managing transitions/relationships with other nodes
      3. Runtime behavior
      4. StartState: starting our processes
      5. EndState: finishing our processes
      6. State: wait for an external event
      7. Decision: making automatic decisions
      8. Transitions: joining all my nodes
      9. Executing our processes
    7. Summary
  10. 5. Getting Your Hands Dirty with jPDL
    1. How is this example structured?
    2. Key points that you need to remember
    3. Analyzing business requirements
      1. Business requirements
      2. Analyzing the proposed formal definition
      3. Refactoring our previously defined process
    4. Describing how the job position is requested
    5. Environment possibilities
      1. Standalone application with jBPM embedded
      2. Web application with jBPM dependency
    6. Running the recruiting example
      1. Running our process without using any services
        1. Normal flow test
    7. Summary
  11. 6. Persistence
    1. Why do we need persistence?
      1. Disambiguate an old myth
      2. Framework/process interaction
      3. Process and database perspective
      4. Different tasks, different sessions
      5. Configuring the persistence service
      6. How is the framework configured at runtime?
      7. Configuring transactions
        1. User Managed Transactions (UMT)
        2. What changes if we decide to use CMT?
      8. Some Hibernate configurations that can help you
      9. Hibernate caching strategies
      10. Two examples and two scenarios
        1. Running the example in EJB3 mode
    2. Summary
  12. 7. Human Tasks
    1. Introduction
    2. What is a task?
    3. Task management module
      1. Handling human tasks in jBPM
      2. Task node and task behavior
    4. Task node example
      1. Business scenario
        1. Assigning humans to tasks
          1. Expression assignments
          2. Delegated assignments
      2. Managing our tasks
        1. Real-life scenario
        2. Users and tasks interaction model
    5. Practical example
      1. Setting up the environment (in the Administrator Screen)
      2. It's time to work
        1. userScreen.jsp
        3. taskCheckDeviceForm.jsp
    6. Summary
  13. 8. Persistence and Human Tasks in the Real World
    1. Adding persistence configuration
      1. Using our new configurations
      2. Safe points
      3. Advantages of persisting our process during wait states
      4. Persistence in the Recruiting Process example
    2. Human tasks in our Recruiting Process
      1. Modifying our process definitions
      2. Analyzing which nodes will change
      3. Modified process definitions
      4. Variable mappings
      5. Task assignments
        1. Assignments in the Recruiting Process example
    3. Summary
  14. 9. Handling Information
    1. Handling information in jBPM
      1. Two simple approaches to handle information
    2. Handling process variables through the API
      1. ContextInstance proposed APIs
      2. ExecutionContext proposed APIs
      3. Telephone company example
      4. Storing primitive types as process variables
    3. How and where is all this contextual information stored?
      1. How are the process variables persisted?
      2. Understanding the process information
        1. Types of information
        2. Variables hierarchy
        3. Accessing variables
      3. Testing our PhoneLineProcess example
        1. Storing Hibernate entities variables
    4. Homework
    5. Summary
  15. 10. Going Deeply into the Advanced Features of jPDL
    1. Why do we need more nodes?
      1. Fork/join nodes
        1. The fork node
        2. The join node
      2. Modeling behavior
      3. Super state node
        1. Phase-to-node interaction
        2. Node in a phase-to-phase interaction
        3. Node-to-node interaction between phases
        4. Complex situations with super state nodes
        5. Navigation
      4. Process state node
        1. Mapping strategies
      5. The e-mail node
    2. Advanced configurations in jPDL
      1. Starting a process instance with a human task
      2. Reusing actions, decisions, and assignment handlers
        1. Properties
        2. Bean
        3. Constructor
        4. Compatibility
    3. Summary
  16. 11. Advanced Topics in Practice
    1. Breaking our recruiting process into phases
    2. Keeping our process goal focused with process state nodes
      1. What exactly does this change mean?
      2. Sharing information between processes
        1. Create WorkStation binding
    3. Asynchronous executions
      1. Synchronous way of executing things
      2. The asynchronous approach
        1. How does this asynchronous approach work?
      3. What happens if our server crashes?
      4. Configuring and starting the asynchronous JobExecutor service
      5. Different situations where asynchronous nodes can be placed
    4. Summary
  17. 12. Going Enterprise
    1. jBPM configurations for Java EE environments
    2. JBoss Application Server data source configurations
      1. Taking advantage of the JTA capabilities in JBoss
      2. Enterprise components architecture
      3. The CommandServiceBean
    3. JobExecutor service
      1. JobExecutor service for Java EE environments
    4. Timers and reminders
      1. Mail service
      2. Calendar
      3. Timers
      4. How do the timers and reminders work?
    5. Summary