`

jBPM4.4数据库的几张表简单介绍:

    博客分类:
  • jbpm
 
阅读更多

 

A。资源库和运行时表结构

JBPM4_DEPLOYMENT   流程定义表                                          
JBPM4_DEPLOYPROP
流程定义属性表                                     
JBPM4_EXECUTION 
流程实例表  (主要是存放JBPM4的执行信息,Execution机制代 替了JBPM3Token机制)

JBPM4_JOB  定时表(存放的是Timer 的定义)                                                                  
JBPM4_LOB 
存储表 (流程定义相关的布署信)                                                                   
JBPM4_PARTICIPATION
参与者表 (存放 Participation的信息,Participation的种类有CandidateClientOwner Replaced AssigneeViewer。而具体的Participation既可以是单一用户,也可以是用户组。)

JBPM4_PROPERTY  引擎参数表
JBPM4_SWIMLANE 
泳道表(Swim Lane是一种Runtime Process Role,多个Task可以一次分配到同一Actor身上。)

JBPM4_TASK 任务表  (存放需要人来完成的Activities,需要人来参与完成的Activity 被称为 Task).      

JBPM4_VARIABLE 上下文表  (存的是进行时的临时变量

B。历史数据库表结构

JBPM4_HIST_ACTINST 流程活动(节点)实例表   (Activity Instance的历史记录

JBPM4_HIST_DETAIL  流程历史详细表  (保存Variable的变更记录)

JBPM4_HIST_PROCINST 流程实例历史表   (Process Instance的历史记录)

JBPM4_HIST_TASK  任务历史表(Task的历史信息)

JBPM4_HIST_VAR  流程变量(上下文)历史表  (保存历史的变量 )

C。身份认证表结构   

JBPM4_ID_GROUP 组表

JBPM4_ID_MEMBERSHIP 用户角色表

JBPM4_ID_USER  用户表

以下是mysql创建jbpm4的sql语句

    create table JBPM4_DEPLOYMENT (
        DBID_ bigint not null,
        NAME_ longtext,
        TIMESTAMP_ bigint,
        STATE_ varchar(255),
        primary key (DBID_)
    ) type=InnoDB;

    create table JBPM4_DEPLOYPROP (
        DBID_ bigint not null,
        DEPLOYMENT_ bigint,
        OBJNAME_ varchar(255),
        KEY_ varchar(255),
        STRINGVAL_ varchar(255),
        LONGVAL_ bigint,
        primary key (DBID_)
    ) type=InnoDB;

    create table JBPM4_EXECUTION (
        DBID_ bigint not null,
        CLASS_ varchar(255) not null,
        DBVERSION_ integer not null,
        ACTIVITYNAME_ varchar(255),
        PROCDEFID_ varchar(255),
        HASVARS_ bit,
        NAME_ varchar(255),
        KEY_ varchar(255),
        ID_ varchar(255) unique,
        STATE_ varchar(255),
        SUSPHISTSTATE_ varchar(255),
        PRIORITY_ integer,
        HISACTINST_ bigint,
        PARENT_ bigint,
        INSTANCE_ bigint,
        SUPEREXEC_ bigint,
        SUBPROCINST_ bigint,
        PARENT_IDX_ integer,
        primary key (DBID_)
    ) type=InnoDB;

    create table JBPM4_HIST_ACTINST (
        DBID_ bigint not null,
        CLASS_ varchar(255) not null,
        DBVERSION_ integer not null,
        HPROCI_ bigint,
        TYPE_ varchar(255),
        EXECUTION_ varchar(255),
        ACTIVITY_NAME_ varchar(255),
        START_ datetime,
        END_ datetime,
        DURATION_ bigint,
        TRANSITION_ varchar(255),
        NEXTIDX_ integer,
        HTASK_ bigint,
        primary key (DBID_)
    ) type=InnoDB;

    create table JBPM4_HIST_DETAIL (
        DBID_ bigint not null,
        CLASS_ varchar(255) not null,
        DBVERSION_ integer not null,
        USERID_ varchar(255),
        TIME_ datetime,
        HPROCI_ bigint,
        HPROCIIDX_ integer,
        HACTI_ bigint,
        HACTIIDX_ integer,
        HTASK_ bigint,
        HTASKIDX_ integer,
        HVAR_ bigint,
        HVARIDX_ integer,
        MESSAGE_ longtext,
        OLD_STR_ varchar(255),
        NEW_STR_ varchar(255),
        OLD_INT_ integer,
        NEW_INT_ integer,
        OLD_TIME_ datetime,
        NEW_TIME_ datetime,
        PARENT_ bigint,
        PARENT_IDX_ integer,
        primary key (DBID_)
    ) type=InnoDB;

    create table JBPM4_HIST_PROCINST (
        DBID_ bigint not null,
        DBVERSION_ integer not null,
        ID_ varchar(255),
        PROCDEFID_ varchar(255),
        KEY_ varchar(255),
        START_ datetime,
        END_ datetime,
        DURATION_ bigint,
        STATE_ varchar(255),
        ENDACTIVITY_ varchar(255),
        NEXTIDX_ integer,
        primary key (DBID_)
    ) type=InnoDB;

    create table JBPM4_HIST_TASK (
        DBID_ bigint not null,
        DBVERSION_ integer not null,
        EXECUTION_ varchar(255),
        OUTCOME_ varchar(255),
        ASSIGNEE_ varchar(255),
        PRIORITY_ integer,
        STATE_ varchar(255),
        CREATE_ datetime,
        END_ datetime,
        DURATION_ bigint,
        NEXTIDX_ integer,
        SUPERTASK_ bigint,
        primary key (DBID_)
    ) type=InnoDB;

    create table JBPM4_HIST_VAR (
        DBID_ bigint not null,
        DBVERSION_ integer not null,
        PROCINSTID_ varchar(255),
        EXECUTIONID_ varchar(255),
        VARNAME_ varchar(255),
        VALUE_ varchar(255),
        HPROCI_ bigint,
        HTASK_ bigint,
        primary key (DBID_)
    ) type=InnoDB;

    create table JBPM4_ID_GROUP (
        DBID_ bigint not null,
        DBVERSION_ integer not null,
        ID_ varchar(255),
        NAME_ varchar(255),
        TYPE_ varchar(255),
        PARENT_ bigint,
        primary key (DBID_)
    ) type=InnoDB;

    create table JBPM4_ID_MEMBERSHIP (
        DBID_ bigint not null,
        DBVERSION_ integer not null,
        USER_ bigint,
        GROUP_ bigint,
        NAME_ varchar(255),
        primary key (DBID_)
    ) type=InnoDB;

    create table JBPM4_ID_USER (
        DBID_ bigint not null,
        DBVERSION_ integer not null,
        ID_ varchar(255),
        PASSWORD_ varchar(255),
        GIVENNAME_ varchar(255),
        FAMILYNAME_ varchar(255),
        BUSINESSEMAIL_ varchar(255),
        primary key (DBID_)
    ) type=InnoDB;

    create table JBPM4_JOB (
        DBID_ bigint not null,
        CLASS_ varchar(255) not null,
        DBVERSION_ integer not null,
        DUEDATE_ datetime,
        STATE_ varchar(255),
        ISEXCLUSIVE_ bit,
        LOCKOWNER_ varchar(255),
        LOCKEXPTIME_ datetime,
        EXCEPTION_ longtext,
        RETRIES_ integer,
        PROCESSINSTANCE_ bigint,
        EXECUTION_ bigint,
        CFG_ bigint,
        SIGNAL_ varchar(255),
        EVENT_ varchar(255),
        REPEAT_ varchar(255),
        primary key (DBID_)
    ) type=InnoDB;

    create table JBPM4_LOB (
        DBID_ bigint not null,
        DBVERSION_ integer not null,
        BLOB_VALUE_ longblob,
        DEPLOYMENT_ bigint,
        NAME_ longtext,
        primary key (DBID_)
    ) type=InnoDB;

    create table JBPM4_PARTICIPATION (
        DBID_ bigint not null,
        DBVERSION_ integer not null,
        GROUPID_ varchar(255),
        USERID_ varchar(255),
        TYPE_ varchar(255),
        TASK_ bigint,
        SWIMLANE_ bigint,
        primary key (DBID_)
    ) type=InnoDB;

    create table JBPM4_PROPERTY (
        KEY_ varchar(255) not null,
        VERSION_ integer not null,
        VALUE_ varchar(255),
        primary key (KEY_)
    ) type=InnoDB;

    create table JBPM4_SWIMLANE (
        DBID_ bigint not null,
        DBVERSION_ integer not null,
        NAME_ varchar(255),
        ASSIGNEE_ varchar(255),
        EXECUTION_ bigint,
        primary key (DBID_)
    ) type=InnoDB;

    create table JBPM4_TASK (
        DBID_ bigint not null,
        CLASS_ char(1) not null,
        DBVERSION_ integer not null,
        NAME_ varchar(255),
        DESCR_ longtext,
        STATE_ varchar(255),
        SUSPHISTSTATE_ varchar(255),
        ASSIGNEE_ varchar(255),
        FORM_ varchar(255),
        PRIORITY_ integer,
        CREATE_ datetime,
        DUEDATE_ datetime,
        PROGRESS_ integer,
        SIGNALLING_ bit,
        EXECUTION_ID_ varchar(255),
        ACTIVITY_NAME_ varchar(255),
        HASVARS_ bit,
        SUPERTASK_ bigint,
        EXECUTION_ bigint,
        PROCINST_ bigint,
        SWIMLANE_ bigint,
        TASKDEFNAME_ varchar(255),
        primary key (DBID_)
    ) type=InnoDB;

    create table JBPM4_VARIABLE (
        DBID_ bigint not null,
        CLASS_ varchar(255) not null,
        DBVERSION_ integer not null,
        KEY_ varchar(255),
        CONVERTER_ varchar(255),
        HIST_ bit,
        EXECUTION_ bigint,
        TASK_ bigint,
        LOB_ bigint,
        DATE_VALUE_ datetime,
        DOUBLE_VALUE_ double precision,
        CLASSNAME_ varchar(255),
        LONG_VALUE_ bigint,
        STRING_VALUE_ varchar(255),
        TEXT_VALUE_ longtext,
        EXESYS_ bigint,
        primary key (DBID_)
    ) type=InnoDB;

    create index IDX_DEPLPROP_DEPL on JBPM4_DEPLOYPROP (DEPLOYMENT_);

    alter table JBPM4_DEPLOYPROP 
        add index FK_DEPLPROP_DEPL (DEPLOYMENT_), 
        add constraint FK_DEPLPROP_DEPL 
        foreign key (DEPLOYMENT_) 
        references JBPM4_DEPLOYMENT (DBID_);

    create index IDX_EXEC_SUPEREXEC on JBPM4_EXECUTION (SUPEREXEC_);

    create index IDX_EXEC_INSTANCE on JBPM4_EXECUTION (INSTANCE_);

    create index IDX_EXEC_SUBPI on JBPM4_EXECUTION (SUBPROCINST_);

    create index IDX_EXEC_PARENT on JBPM4_EXECUTION (PARENT_);

    alter table JBPM4_EXECUTION 
        add index FK_EXEC_PARENT (PARENT_), 
        add constraint FK_EXEC_PARENT 
        foreign key (PARENT_) 
        references JBPM4_EXECUTION (DBID_);

    alter table JBPM4_EXECUTION 
        add index FK_EXEC_SUBPI (SUBPROCINST_), 
        add constraint FK_EXEC_SUBPI 
        foreign key (SUBPROCINST_) 
        references JBPM4_EXECUTION (DBID_);

    alter table JBPM4_EXECUTION 
        add index FK_EXEC_INSTANCE (INSTANCE_), 
        add constraint FK_EXEC_INSTANCE 
        foreign key (INSTANCE_) 
        references JBPM4_EXECUTION (DBID_);

    alter table JBPM4_EXECUTION 
        add index FK_EXEC_SUPEREXEC (SUPEREXEC_), 
        add constraint FK_EXEC_SUPEREXEC 
        foreign key (SUPEREXEC_) 
        references JBPM4_EXECUTION (DBID_);

    create index IDX_HACTI_HPROCI on JBPM4_HIST_ACTINST (HPROCI_);

    create index IDX_HTI_HTASK on JBPM4_HIST_ACTINST (HTASK_);

    alter table JBPM4_HIST_ACTINST 
        add index FK_HACTI_HPROCI (HPROCI_), 
        add constraint FK_HACTI_HPROCI 
        foreign key (HPROCI_) 
        references JBPM4_HIST_PROCINST (DBID_);

    alter table JBPM4_HIST_ACTINST 
        add index FK_HTI_HTASK (HTASK_), 
        add constraint FK_HTI_HTASK 
        foreign key (HTASK_) 
        references JBPM4_HIST_TASK (DBID_);

    create index IDX_HDET_HACTI on JBPM4_HIST_DETAIL (HACTI_);

    create index IDX_HDET_HPROCI on JBPM4_HIST_DETAIL (HPROCI_);

    create index IDX_HDET_HVAR on JBPM4_HIST_DETAIL (HVAR_);

    create index IDX_HDET_HTASK on JBPM4_HIST_DETAIL (HTASK_);

    alter table JBPM4_HIST_DETAIL 
        add index FK_HDETAIL_HPROCI (HPROCI_), 
        add constraint FK_HDETAIL_HPROCI 
        foreign key (HPROCI_) 
        references JBPM4_HIST_PROCINST (DBID_);

    alter table JBPM4_HIST_DETAIL 
        add index FK_HDETAIL_HACTI (HACTI_), 
        add constraint FK_HDETAIL_HACTI 
        foreign key (HACTI_) 
        references JBPM4_HIST_ACTINST (DBID_);

    alter table JBPM4_HIST_DETAIL 
        add index FK_HDETAIL_HTASK (HTASK_), 
        add constraint FK_HDETAIL_HTASK 
        foreign key (HTASK_) 
        references JBPM4_HIST_TASK (DBID_);

    alter table JBPM4_HIST_DETAIL 
        add index FK_HDETAIL_HVAR (HVAR_), 
        add constraint FK_HDETAIL_HVAR 
        foreign key (HVAR_) 
        references JBPM4_HIST_VAR (DBID_);

    create index IDX_HSUPERT_SUB on JBPM4_HIST_TASK (SUPERTASK_);

    alter table JBPM4_HIST_TASK 
        add index FK_HSUPERT_SUB (SUPERTASK_), 
        add constraint FK_HSUPERT_SUB 
        foreign key (SUPERTASK_) 
        references JBPM4_HIST_TASK (DBID_);

    create index IDX_HVAR_HPROCI on JBPM4_HIST_VAR (HPROCI_);

    create index IDX_HVAR_HTASK on JBPM4_HIST_VAR (HTASK_);

    alter table JBPM4_HIST_VAR 
        add index FK_HVAR_HPROCI (HPROCI_), 
        add constraint FK_HVAR_HPROCI 
        foreign key (HPROCI_) 
        references JBPM4_HIST_PROCINST (DBID_);

    alter table JBPM4_HIST_VAR 
        add index FK_HVAR_HTASK (HTASK_), 
        add constraint FK_HVAR_HTASK 
        foreign key (HTASK_) 
        references JBPM4_HIST_TASK (DBID_);

    create index IDX_GROUP_PARENT on JBPM4_ID_GROUP (PARENT_);

    alter table JBPM4_ID_GROUP 
        add index FK_GROUP_PARENT (PARENT_), 
        add constraint FK_GROUP_PARENT 
        foreign key (PARENT_) 
        references JBPM4_ID_GROUP (DBID_);

    create index IDX_MEM_USER on JBPM4_ID_MEMBERSHIP (USER_);

    create index IDX_MEM_GROUP on JBPM4_ID_MEMBERSHIP (GROUP_);

    alter table JBPM4_ID_MEMBERSHIP 
        add index FK_MEM_GROUP (GROUP_), 
        add constraint FK_MEM_GROUP 
        foreign key (GROUP_) 
        references JBPM4_ID_GROUP (DBID_);

    alter table JBPM4_ID_MEMBERSHIP 
        add index FK_MEM_USER (USER_), 
        add constraint FK_MEM_USER 
        foreign key (USER_) 
        references JBPM4_ID_USER (DBID_);

    create index IDX_JOBRETRIES on JBPM4_JOB (RETRIES_);

    create index IDX_JOB_CFG on JBPM4_JOB (CFG_);

    create index IDX_JOB_PRINST on JBPM4_JOB (PROCESSINSTANCE_);

    create index IDX_JOB_EXE on JBPM4_JOB (EXECUTION_);

    create index IDX_JOBLOCKEXP on JBPM4_JOB (LOCKEXPTIME_);

    create index IDX_JOBDUEDATE on JBPM4_JOB (DUEDATE_);

    alter table JBPM4_JOB 
        add index FK_JOB_CFG (CFG_), 
        add constraint FK_JOB_CFG 
        foreign key (CFG_) 
        references JBPM4_LOB (DBID_);

    create index IDX_LOB_DEPLOYMENT on JBPM4_LOB (DEPLOYMENT_);

    alter table JBPM4_LOB 
        add index FK_LOB_DEPLOYMENT (DEPLOYMENT_), 
        add constraint FK_LOB_DEPLOYMENT 
        foreign key (DEPLOYMENT_) 
        references JBPM4_DEPLOYMENT (DBID_);

    create index IDX_PART_TASK on JBPM4_PARTICIPATION (TASK_);

    alter table JBPM4_PARTICIPATION 
        add index FK_PART_SWIMLANE (SWIMLANE_), 
        add constraint FK_PART_SWIMLANE 
        foreign key (SWIMLANE_) 
        references JBPM4_SWIMLANE (DBID_);

    alter table JBPM4_PARTICIPATION 
        add index FK_PART_TASK (TASK_), 
        add constraint FK_PART_TASK 
        foreign key (TASK_) 
        references JBPM4_TASK (DBID_);

    create index IDX_SWIMLANE_EXEC on JBPM4_SWIMLANE (EXECUTION_);

    alter table JBPM4_SWIMLANE 
        add index FK_SWIMLANE_EXEC (EXECUTION_), 
        add constraint FK_SWIMLANE_EXEC 
        foreign key (EXECUTION_) 
        references JBPM4_EXECUTION (DBID_);

    create index IDX_TASK_SUPERTASK on JBPM4_TASK (SUPERTASK_);

    alter table JBPM4_TASK 
        add index FK_TASK_SWIML (SWIMLANE_), 
        add constraint FK_TASK_SWIML 
        foreign key (SWIMLANE_) 
        references JBPM4_SWIMLANE (DBID_);

    alter table JBPM4_TASK 
        add index FK_TASK_SUPERTASK (SUPERTASK_), 
        add constraint FK_TASK_SUPERTASK 
        foreign key (SUPERTASK_) 
        references JBPM4_TASK (DBID_);

    create index IDX_VAR_EXESYS on JBPM4_VARIABLE (EXESYS_);

    create index IDX_VAR_TASK on JBPM4_VARIABLE (TASK_);

    create index IDX_VAR_EXECUTION on JBPM4_VARIABLE (EXECUTION_);

    create index IDX_VAR_LOB on JBPM4_VARIABLE (LOB_);

    alter table JBPM4_VARIABLE 
        add index FK_VAR_LOB (LOB_), 
        add constraint FK_VAR_LOB 
        foreign key (LOB_) 
        references JBPM4_LOB (DBID_);

    alter table JBPM4_VARIABLE 
        add index FK_VAR_EXECUTION (EXECUTION_), 
        add constraint FK_VAR_EXECUTION 
        foreign key (EXECUTION_) 
        references JBPM4_EXECUTION (DBID_);

    alter table JBPM4_VARIABLE 
        add index FK_VAR_EXESYS (EXESYS_), 
        add constraint FK_VAR_EXESYS 
        foreign key (EXESYS_) 
        references JBPM4_EXECUTION (DBID_);

    alter table JBPM4_VARIABLE 
        add index FK_VAR_TASK (TASK_), 
        add constraint FK_VAR_TASK 
        foreign key (TASK_) 
        references JBPM4_TASK (DBID_);
 表名注释可参阅:http://tiger-hu.iteye.com/blog/1571356
分享到:
评论

相关推荐

    jBPM4.4数据库表简单介绍

    jBPM4.4数据库表简单介绍

    经过我修正的JBPM4.4数据库mysql5.5建表SQL命令

    经过我修正的JBPM4.4数据库mysql5.5建表SQL命令,共18张表

    jBPM4.4.rar_jbpm4.4_jbpm4.4 PDF

    《jBPM4.4开发指南》与《jBPM4.4中文用户手册》是深入理解jBPM4.4这一开源工作流管理系统的重要参考资料。jBPM,全称Java Business Process Management,是一个用于执行业务流程的轻量级、灵活的开源框架,它为业务...

    jbpm4.4下载地址

    在深入探讨jBPM 4.4的相关知识点之前,我们首先需要理解jBPM是什么以及它在企业级应用中的重要性。jBPM是“Java Business Process Model”的缩写,是一个开源的工作流引擎,用于执行业务流程管理(BPM)。它提供了...

    JBPM4.4工作流数据表结构的详解

    JBPM4.4是一款强大的工作流管理系统,其数据表结构对于理解系统运行机制至关重要。本文将深入解析JBPM4.4中的主要数据表及其作用。 首先,`JBPM4_DEPLOYMENT`表是流程定义表,它存储了所有部署的流程模板的信息。...

    jbpm4.4文档+学习资料

    jbpm4.4是JBoss企业级业务流程管理(Business Process Management)平台的一个重要版本,它为开发者提供了全面的工作流和业务流程管理解决方案。本文将深入解析jbpm4.4的相关知识点,帮助那些寻找优质学习资源的朋友...

    jbpm4.4 DB2数据库脚本

    jbpm4.4 DB2数据库脚本,可直接执行sql脚本,创建jbpm4.4 数据库表

    jBPM4.4开发实例

    **jBPM4.4开发实例** jBPM(Java Business Process Management)是一个开源的工作流管理系统,用于管理和执行业务流程。jBPM4.4是该框架的一个版本,它提供了强大的工作流服务,包括流程定义、流程实例管理、任务...

    jbpm4.4中文开发指南

    jbpm4.4是该系统的某一版本,它提供了丰富的功能,包括流程定义、流程实例的启动、监控和干预,以及与后端系统如数据库和应用服务器的集成。 1. **流程建模**: jbpm4.4使用BPMN(Business Process Model and ...

    jbpm4.4表字段说明

    在JBPM4.4中,数据库是存储流程实例、流程定义以及相关元数据的关键部分。以下是关于JBPM4.4中涉及到的一些核心表及其字段的详细说明: 1. **JBPM4_DEPLOYMENT** 表: - **DBID**: 流程模版的唯一标识,非空。 - ...

    JBPM4.4资料的其他补充

    2. **持久化**:JBPM4.4使用JPA(Java Persistence API)进行数据持久化,使得流程实例、任务和其他相关信息能够存储在数据库中,方便查询和管理。 3. **任务服务**:JBPM提供了任务服务,允许用户分配、接收和完成...

    jBPM4.4 详解 API 中文

    jBPM4.4版本特别之处在于其底层依赖于Active Diagram模型,并且采用了Hibernate 3.3.1,这使得它能够良好地兼容主流数据库,同时,整个版本共涉及18张数据表,展现了其强大的数据处理能力。 #### 三、搭建jBPM4.4...

    jBPM 4.4用户手册 中文PDF

    jBPM 4.4 使用Hibernate作为默认的持久化层,可以轻松地将流程实例和相关数据存储到数据库中。这使得流程实例能够在系统重启后继续,同时也支持数据的查询和审计。 **六、监控与管理** jBPM 4.4 提供了一个Web管理...

    jbpm4.4+ssh

    在实际运行时,"两张表的sql要设置下"可能指的是需要对jbpm4.4的数据库配置进行调整。jbpm在初始化时会创建一些核心的系统表,用于存储流程定义、实例、任务等信息。因此,用户需要确保数据库中已创建了这些表,或者...

    jbpm4.4开发用户指南

    3. **流程建模**:介绍使用jBPM Designer或直接编写XML来创建流程模型,包括各种活动(如任务、决策点、事件)的使用方法。 4. **部署与执行**:讲解如何将流程部署到jBPM服务器,并启动和监控流程实例。 5. **...

    jbpm4.4 shh2 项目示例

    - 它将Java对象与数据库表映射,通过对象的CRUD(创建、读取、更新、删除)操作,自动处理SQL语句。 - 在jbpm4.4 shh2项目中,Hibernate用于管理jbpm的流程实例、任务、变量等数据的持久化。 5. **项目实践**: ...

    jbpm4.4 schema.xsd

    jbpm4.4 schema.xsd jbpm4.4 schema.xsd jbpm4.4 schema.xsd jbpm4.4 schema.xsd jbpm4.4 schema.xsd

Global site tag (gtag.js) - Google Analytics