Flowable User Guides

repository·master·Indexed 41 days ago

https://github.com/tkjohn/flowable-userguide

Documentation and build tools for Flowable BPMN, CMMN, DMN, and Form engines. Includes guides on the Flowable REST API, authentication, versioning, and instructions for generating HTML and PDF documentation from AsciiDoc sources using Ant or shell scripts.

Tokens
170.9K
Snippets
466
Records
602
Agent score
50%

What's inside Flowable

  1. Overview of Flowable UI Applications

    master

    Flowable provides several web applications to demonstrate and manage its features:

    • Flowable IDM: Identity Management. Provides Single Sign-On (SSO) for all Flowable UI apps and allows administrators to manage users, groups, and permissions.
    • Flowable Modeler: Modeling tool. Allows users with modeling permissions to create process models (BPMN), forms, decision tables (DMN), and application definitions.
    • Flowable Task: Runtime task application. Used to start process instances, edit and complete tasks, and query process instances and tasks.
    • Flowable Admin: Management application. Allows administrators to query BPMN, DMN, Form, and Content engines, and provides options to modify process instances, tasks, and jobs via REST APIs.

    Note on Deployment: All applications require Flowable IDM for authentication. They can be deployed in the same servlet container (e.g., Apache Tomcat) or different containers. Because they use the same cookie for authentication, they must run under the same domain.

  2. Use the Flowable Task Application

    master

    The Flowable Task application is the runtime environment for executing processes. It includes the BPMN, DMN, Form, and Content engines.

    Key Capabilities:

    • Process Execution: Start new process instances via the 'Processes' tab.
    • Task Management: View and complete tasks in the Task List. You can filter by task name, state, process definition, or assignment (e.g., 'Tasks where I am involved' vs 'Tasks where I am one of the candidates').
    • Form Rendering: View and fill out task forms.
    • History: View completed process instances and completed forms (stored in ACT_FO_FORM_INSTANCE).
  3. Manage Engines with Flowable Admin Application

    master

    The Flowable Admin application allows you to administer the various Flowable engines (BPMN, DMN, Form, etc.) via their REST APIs.

    Core Functions:

    • Deployment Management: Query deployments, view process definitions, and deploy new BPMN XML or BAR files.
    • Process Administration: Query process instances, tasks, jobs, and event subscriptions. You can also reassign tasks or complete active tasks directly.
    • Engine Configuration: Configure REST endpoints and authentication for each engine individually, allowing for distributed engine setups.
  4. Configure, use, and deploy Flowable DMN

    master

    This guide provides comprehensive documentation for working with Flowable Decision Model and Notation (DMN). It covers the following core areas:

    • Configuration: Setting up the DMN engine and its parameters.
    • API Usage: Interacting with DMN via programmatic interfaces.
    • Spring Integration: Using DMN within a Spring Framework environment.
    • Deployment: Strategies for deploying DMN models into production.
    • DMN Fundamentals: An introduction to DMN concepts and usage.
    • DMN REST API: Accessing and managing DMN models and executions via RESTful endpoints.
  5. What is a Flowable form definition?

    master
    Since there is no Oasis specification for start and task forms, Flowable uses a custom JSON-based form definition structure. This format is used as the output for the Flowable Form Editor and is used by the Flowable Task application to render forms. The definition identifies the form via a key, provides a name and description, defines an array of fields, and optionally defines outcomes.
  6. What is a Plan Item Instance?

    master

    A Plan item instance is a core concept in the CMMN engine. It represents which plan items (e.g., tasks, milestones) are currently 'live' within a case and what their specific state is.

    Unlike BPMN, CMMN uses a strict state lifecycle for plan items. This lifecycle is exposed through:

    • CmmnRuntimeService methods.
    • Query APIs.
    • Data fields within the PlanItemInstance object.
  7. What is Flowable?

    master

    Flowable is a lightweight business process engine written in Java. It is used to deploy BPMN 2.0 process definitions, create process instances, query running or historical process instances, and access related data.

    Flowable can be integrated into applications in several ways:

    • Embedded Engine: Include Flowable libraries as JARs within your Java application (Java SE, Servlet containers like Tomcat/Jetty, or Java EE servers like JBoss/WebSphere).
    • REST API: Interact with the engine via HTTP calls.
    • Pre-built Applications: Use ready-to-use UIs like Flowable Modeler, Admin, IDM, and Task.
  8. What is CMMN and how does Flowable implement it?

    master

    Case Management Model and Notation (CMMN) is a standard for representing case models. Flowable provides a complete implementation including:

    • CMMN 1.1 Modeler: To create case models.
    • Java Engine: To import and execute CMMN 1.1 models.
    • Demonstration UI: To execute models and allow users to complete human tasks and forms.

    Core Concepts

    • Case Model: A container (visualized as a folder) for all case elements.
    • Plan Model: Contained within a case model; it is the structure onto which items are planned.
    • Plan Item: Elements within a plan model (e.g., human tasks, milestones, stages, process tasks, case tasks). Each has a Plan Item Definition (type/config) and a runtime Plan Item Instance.
    • Sentries: Guard the activation or exit of plan items.
      • Entry Criteria: Specify conditions (often based on other plan items' states or complex expressions) that must be met to move a plan item from available to active.
      • Exit Criteria: Specify conditions that trigger an exit from a plan item or the entire plan model.
  9. Identify stable vs. internal Flowable APIs

    master

    When using Flowable, distinguish between stable public APIs and internal implementation classes to ensure your application remains compatible with future updates:

    • Stable APIs: Publicly documented classes and interfaces. If the User Guide mentions a class as a configuration value, it is considered stable.
    • Internal Implementation Classes: Any classes located in packages containing .impl. (e.g., org.flowable.engine.impl.db) are internal. These are not guaranteed to be stable, and using them may cause issues during upgrades.
    • Experimental Features: Sections in the documentation marked as [EXPERIMENTAL] should be treated as unstable.
  10. Understand Flowable History entities

    master

    History is the component that captures process execution events and stores them permanently in the database, even after process instances complete. This allows for auditing and reporting without impacting runtime performance if queried correctly.

    There are 6 core history entities:

    • HistoricProcessInstance: Information about current and past process instances.
    • HistoricVariableInstance: The latest value of a process or task variable.
    • HistoricActivityInstance: Information about a single execution of an activity (node).
    • HistoricTaskInstance: Information about current and past (completed/deleted) task instances.
    • HistoricIdentityLink: Information about identity links on tasks and process instances.
    • HistoricDetail: Various information related to process instances, activity instances, or task instances (e.g., variable updates or form properties).
  11. Use Exclusive Gateways for decision modeling

    master

    An Exclusive Gateway (XOR gateway) is used for decision-making. It evaluates outgoing sequence flows in the order they are defined in the XML.

    Behavior:

    • It selects the first sequence flow whose condition evaluates to true.
    • Crucial Difference: Unlike standard BPMN 2.0 behavior where multiple true conditions might trigger parallel paths, an Exclusive Gateway in Flowable will only select one path. If multiple conditions are true, it picks the one defined earliest in the XML.
    • If no conditions are met and no default flow is defined, an exception is thrown.
    <exclusiveGateway id="exclusiveGw" name="Exclusive Gateway" />
    
    <sequenceFlow id="flow2" sourceRef="exclusiveGw" targetRef="theTask1">
      <conditionExpression xsi:type="tFormalExpression">${input == 1}</conditionExpression>
    </sequenceFlow>