Version 15

    This article shows the data models for the definition and execution sides of jBPM.  They are separated into two parts in this wiki to simplify the explanation.

    Definition Data Model

    definition_data_model.png

     

    JBPM_PROCESSDEFINITION - Stores general information about the process definition.

     

    Foreign Key

     

    • Node table - Start-state node in the process

     

    JBPM_NODE - Stores definition information about a node in a process definition.

     

    Foreign Keys

     

    • Process Definition table - The process definition that the node belongs to
    • Process Definition table - Specify that this node calls a sub process. The sub process would complete execution before the parent process leaves this node
    • Action table - Specify an action class to be executed for the node
    • Node table -  Specify that this node belongs to a superstate.  Multiple nodes can belong to a superstate
    • Delegation table - Specify that a decision has been delegated to a class

     

    JBPM_TRANSITION - Stores definition information about a transition in a process definition.

     

    Foreign Keys

     

    • Process Definition table - Specify the definition that the transition belongs to
    • Node table - Specify the node that starts the transition
    • Node table - Specify the node that the transition ends on

     

    JBPM_ACTION - Stores definition information about an action in a process definition.

     

    Foreign Keys

     

    • Process Definition table - Specify the definition that the action belongs to
    • Event table - Specify the event that triggers the action
    • Delegation table - Specify the action is delegated to
    • ExceptionHandler table -  Specify the exception handler class for this action
    • Action table - Specify the action is referenced by another action and
    • Action table - Specify if there is a timer action

     

    JBPM_DELEGATION - Stores definition information about Java business classes that are specified in the process definition.

     

    Foreign key

     

    • Process Definition table - Specify the process definition that the delegation belongs to.

     

    JBPM_EVENT - Stores definition information about an event that triggers an action in the process definition.

     

    Foreign Keys

     

    • Process Definition table - Specify the process definition that the event belongs to
    • Node table - Specify the event belongs to a node
    • Transition table - Specify the event belongs to a transition
    • Task table - Specify the event belongs to a task

     

    JBPM_EXCEPTIONHANDLER - Stores definition information about an exception handler for an action.

     

    JBPM_DECISIONCONDITIONS - Stores definition information about conditions specified in the process definition.

     

    JBPM_TASK - Stores definition information about tasks defined in the process definition.

     

    Foreign Keys

     

    • Process Definition table - Specify the process definition the task belongs to
    • Module Definition table - Specify the TaskMgmtDefintion to be used for this task.
    • Node table - Specify the node the task belongs to
    • Node table - Specify that this task belongs to the start-state of a process
    • Delegation table - Specify the delegation of the task to a class
    • Swimlane table - Specify the swimlane that the task uses for assignment
    • Task Controller table - Specify the task assignment is delegated to a class

     

    JBPM_TASKCONTROLLER - Stores information that refers a task to a delegation class.

     

    Foreign key

     

    • Delegation table - Specify the class that is the controller for the task.

     

    JBPM_VARIABLEACCESS - Stores information about the access levels for each variable associated to a particular node or task

     

    Foreign keys

     

    • Node table - Specify the node that the variables belong to
    • Task Controller table - Specify the task that the variables belong to
    • Action table - Specify the action that the variables belong to

     

    JBPM_SWIMLANE - Stores information about the swimlanes defined in the process definition.

     

    Foreign Keys

     

    • Delegation table - Specify the class that determines assignment for this swimlane
    • Module Definition table - All of the swimlanes for a process definition belong to a TaskMgmtDefintion.  This is specified in the Module Definition table.

     

    JBPM_MODULEDEFINITION - Stores information about modules used in the process definition

     

    Foreign Keys

     

    • Process Definition table - Specify the process definition this module is used in
    • Task table - Specify the task this module is used in

     

    JBPM_ID_USER - Stores information about users in jBPM

     

    JBPM_ID_GROUP - Stores information about groups that users can belong to.

     

    Foreign Key

     

    • ID Group - Parent/Child relationship between groups.

     

    JBPM_ID_MEMBERSHIP - Cross reference table storing information about role and which groups a user belongs to.

     

    Foreign Keys

     

    • ID Users table - Specify the user that belongs to the membership.
    • ID Group table - Specify the group the membership belongs to.

     

    JBPM_ID_PERMISSIONS - Defines permissions for a user

     

    Execution Data Model

    JBossjBPMExecutionDataModel.pngexecution_data_model.png

     

    JBPM_PROCESSINSTANCE - Stores runtime information about an instance of a process.

     

    Foreign keys

     

    • Process Definition table - the process definition to be followed for this process instance execution
    • Token table - the root token that follows where the process execution is currently
    • Token table - the super process token (if this process instance was called from another process instance)

     

    JBPM_TOKEN - Stores information about the token representing execution location in the process instance

     

    Foreign keys

     

    • Process Instance table - the process instance this token belongs to.
    • Process Instance table - the sub process instance that the token belongs to.
    • Node table - the node that the token points to as the current location of execution.
    • Token table - parent/child relationship between tokens for a fork or sub process.

     

    JBPM_MESSAGE - Stores messages to create asynchronous processing of nodes.

     

    Foreign keys

     

    • Token table - token the message belongs to
    • Action table - action the message belongs to
    • Node table - node the message belongs to
    • Task Instance table - task instance the message belongs to

     

    JBPM_TASKINSTANCE - Stores runtime information about an instance of a task

     

    Foreign keys

     

    • Task table - the task that defines the instance
    • Token table - the token the task belongs to
    • Swimlane Instance table - the swimlane instance used to determine who works this task instance
    • Module Instance table - the instance of the module to manage the task

     

    JBPM_SWIMLANEINSTANCE - Stores runtime information about an instance of a swimlane

     

    Foreign keys

     

    • Swimlane table - the swimlane that defines the instance
    • Module Instance table - the instance of the module to manage the task

     

    JBPM_POOLEDACTOR - Stores a list of actors for a swimlane instance

     

    Foreign Key

     

    • Swimlane Instance table - the swimlane instance the actor belongs to

     

    JBPM_TASKACTORPOOL - Cross reference table between Pooled Actor and Task Instance

     

    Foreign Keys

     

    • Pooled Actor - Actors for a swimlane instance
    • Task Instance - Task the pooled actor belongs to

     

    JBPM_COMMENT - Stores a comment message related to a token or task instance

     

    Foreign Keys

     

    • Token table - the token the comment belongs to.
    • Task Instance table - the task instance the comment belongs to.

     

    JBPM_TOKENVARIABLEMAP - Cross reference table between token and module instances for context

     

    Foreign Keys

     

    • Token table - the token representing the process execution
    • Module Instance table - the context module instance for the token

     

    JBPM_MODULEINSTANCE - Stores runtime information about an instance of a module

     

    Foreign Keys

     

    • Process Instance table - the process instance the module instance belongs to
    • Module Definition table - the module definition that defines the module instance

     

    JBPM_RUNTIMEACTION - Stores information about actions that are created at runtime

     

    Foreign Keys

     

    • Process Instance table - the process instance the action belongs to
    • Action table - the action definition that defines the action instance

     

    JBPM_TIMER - Stores information about instances of timers that are running

     

    Foreign Keys

     

    • Action table - The action that the timer belongs to
    • Token table - the token that the timer belongs to
    • Process Instance table - the process instance the timer belongs to
    • Task Instance table - the task instance the timer belongs to

     

    JBPM_VARIABLEINSTANCE - Stores information about process variable instances

     

    Foreign Keys

     

    • Token table - the token that the variables belong to
    • Token Variable Map table - mapping to the module instance for the token
    • Process Instance table - the process instance the variables belong to
    • Byte Array table - the byte array stored for a serialized object process variable instance
    • Task Instance table - the task instance the variables belong to

     

    JBPM_LOG - Stores process logs created by jBPM or application code during process execution. Unlike shown in the image, column CLASS_ is not a Boolean but a character that refers to the class that created the log (see ProcessLog.hbm.xml and discriminator-value in descendant Hibernate files such as TaskAssignLog.hbm.xml)

     

    Foreign Keys

     

    • Token table - the token that the logs belong to
    • Token table - the child token that the logs belong to
    • Log table   - parent/child relationship between logs
    • Transition table - the transition the logs belong to
    • Node table - the source node the logs belong to
    • Node table - the destination node the logs belong to
    • Variable Instance table - the variable instance that is referred to in the log
    • Byte Array table - the old value of the byte array
    • Byte Array table - the new value of the byte array
    • Task Instance table - The task instance that is referred to in the log
    • Swimlane Instance table - the swimlane instance that is referred to in the log

     

    JBPM_BYTEARRAY - Specifies the file definition module for a serialized process instance variable

     

    Foreign Key

     

    • Module Definition table - Specify the file definition module

     

    JBPM_BYTEBLOCK - Stores the serialized process instance variable

     

    Foreign Key

     

    • Byte Array table - The byte array that the byte block belongs to