`
xgbjmxn
  • 浏览: 269268 次
  • 性别: Icon_minigender_1
  • 来自: 新乡
社区版块
存档分类
最新评论

Jbpm4.3连接数据库配置

    博客分类:
  • jbpm
阅读更多
Jbpm4.3连接数据库配置 收藏
1、我以mysql为例子

2、在mysql数据库中创建一个数据库,数据库名随便取个,然后找到:

view plaincopy to clipboardprint?
${JBPM_HOME}\install\src\db\create\jbpm.mysql.create.sql 
${JBPM_HOME}\install\src\db\create\jbpm.mysql.create.sql

3、在mysql里执行下面的脚本:

view plaincopy to clipboardprint?
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_); 
    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_);


4、更改工程中的jbpm.hibernate.cfg.xml文件,更改后的内容如下

view plaincopy to clipboardprint?
<?xml version="1.0" encoding="utf-8"?>  
<!DOCTYPE hibernate-configuration PUBLIC  
          "-//Hibernate/Hibernate Configuration DTD 3.0//EN" 
          "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">  
<hibernate-configuration>  
    <session-factory>  
    <property name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>  
    <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>  
    <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/jbpmdb?characterEncoding=UTF-8</property>  
    <property name="hibernate.connection.username">root</property>  
    <property name="hibernate.connection.password">admin</property>  
    <property name="hibernate.format_sql">true</property>  
      
    <mapping resource="jbpm.repository.hbm.xml" />  
    <mapping resource="jbpm.execution.hbm.xml" />  
    <mapping resource="jbpm.history.hbm.xml" />  
    <mapping resource="jbpm.task.hbm.xml" />  
    <mapping resource="jbpm.identity.hbm.xml" />  
    </session-factory>  
</hibernate-configuration> 
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
          "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
          "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
  <session-factory>
<property name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
    <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
    <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/jbpmdb?characterEncoding=UTF-8</property>
    <property name="hibernate.connection.username">root</property>
    <property name="hibernate.connection.password">admin</property>
    <property name="hibernate.format_sql">true</property>
   
<mapping resource="jbpm.repository.hbm.xml" />
<mapping resource="jbpm.execution.hbm.xml" />
<mapping resource="jbpm.history.hbm.xml" />
<mapping resource="jbpm.task.hbm.xml" />
<mapping resource="jbpm.identity.hbm.xml" />
</session-factory>
</hibernate-configuration>


5、发布一个流程就可以在表jbpm4_deployprop中看到如下信息


分享到:
评论

相关推荐

    jbpm4.3 sqlserver配置

    总的来说,jbpm4.3与SQL Server的集成需要正确配置JDBC驱动、数据库连接参数,并在Tomcat环境下部署和启动。理解这个过程对于管理和优化业务流程至关重要,因为它确保了数据的可靠存储和高效处理。

    jbpm4.3与spring整合

    ### jbpm4.3与Spring框架的整合指南 在企业级应用开发中,流程管理引擎JBPM(JBoss Business Process Management)与Spring框架的结合使用是常见的一种技术方案。JBPM是一个灵活、强大的业务流程管理工具,而Spring...

    jbpm4.3视频教程+代码

    2. **安装与配置**:详述如何在开发环境中安装Jbpm4.3,包括所需的Java环境、数据库设置以及Eclipse IDE的集成。 3. **模型设计**:讲解Jbpm流程图的创建,包括任务、事件、决策点等元素,以及如何使用BPMN2.0标准...

    jbpm4.3环境搭建

    【jbpm4.3环境搭建】涉及的知识点主要包括jbpm工作流引擎的版本管理、集成环境的构建、软件依赖配置以及数据库的连接设置。以下是详细的内容: 1. **jbpm4.3**:jbpm(Java Business Process Management)是一个...

    JBPM4.3使用说明.doc

    要连接数据库,需要修改 Install 目录下的 build.xml 文件,选择相应的数据库类型,然后修改 oracle.properties 文件中的数据库连接内容。接着,在命令行下执行 ant create.jbpm.schema 命令来创建 jbpm4.3 的 state...

    jbpm4.3简单实例

    4. **持久化与数据库配置**:jbpm4.3需要数据库支持来存储流程实例、任务和其他相关数据。在本实例中,数据库配置文件为`jbpm.hibernate.cfg.xml`,你需要根据自己的数据库环境进行相应的修改,比如设置数据库URL、...

    jbpm4.3 开发指南

    - 系统安装和配置:指导如何设置开发环境,包括服务器配置、数据库连接等。 - 快速入门:介绍如何创建第一个流程并运行。 - 进阶开发:涵盖流程定义、任务服务、规则集成的详细用法。 - 实战示例:提供实际应用场景...

    JBPM4.3完整示例

    通过查看示例,可以学习到如何配置数据库连接以及相关的数据模型。 5. **监听器与事件(Listeners & Events)**:系统提供了监听器接口,允许开发者在特定事件(如流程开始、结束或任务完成)发生时执行自定义代码...

    jbpm4.3+servlet+jsp

    jbpm4.3的开发可能需要一系列的库,如jbpm本身的jar包,数据库连接驱动,以及其他辅助库如Spring、Hibernate等,这些库帮助开发者实现业务逻辑,与数据库交互,以及处理其他系统集成。 【压缩包子文件的文件名称...

    JBPM4.3的视频

    4. **配置数据库**:JBPM支持多种数据库,如MySQL、PostgreSQL等,需要配置相应的数据源连接。 #### 流程设计与实现 1. **定义业务流程**:使用JBPM提供的工具(如jbpm-console-ng)设计业务流程模型,包括流程...

    jbpm 4.3 视频教程

    教程会讲解如何配置数据库连接以及如何处理流程实例的持久化。 8. **API与集成**:jbpm提供了丰富的API,允许开发者通过编程方式与流程引擎交互,例如启动流程、查询流程实例、干预任务等。此外,jbpm还可以与各种...

    jbpm4.3请假的jar包

    在实际开发中,我们需要将这个“jbpm4.3请假的jar包”引入项目,配置相关环境,比如设置Jbpm的数据库连接信息,然后就可以利用其中的流程定义和服务组件来构建自己的请假申请系统。同时,通过对jar包中类库的学习和...

    jbpm4.3-src.zip

    jbpm4.3-src.zip是一个包含jbpm 4.3版本源代码的压缩包,对于开发者来说,这是一个宝贵的资源,可以深入理解jbpm的工作原理,从而更好地利用它进行业务流程管理(BPM)系统的开发和定制。jbpm是一个开源的工作流管理...

    JBPM4.3 用户手册(chm版)

    手册将介绍如何配置数据库连接,理解事务在JBPM中的角色,以及如何处理异常和回滚。 10. **API与集成**:JBPM提供了丰富的Java和RESTful API,允许开发人员在应用中直接调用工作流服务。手册会详述如何使用这些API...

    S2SH+e3p0+jbpm4.3完美实例内涵测试代码oracle

    这个"完美实例"可能包含了如何在S2SH环境下配置和使用jbpm4.3的详细步骤,以及如何利用e3p0数据源和Oracle数据库进行交互的测试代码。开发者可以通过这个实例学习到如何将这些组件有效地整合到一个项目中,理解它们...

    jbpm4.3学习笔记及请假流程代码

    3. **启动服务**:部署并启动JBPM的服务端,这通常涉及到配置数据库连接、设置服务器端口等步骤。 ### 管理流程定义 1. **流程定义**:使用Eclipse插件或者Web工具创建流程定义,流程图中包含开始节点、结束节点、...

    jbpm4.3+struts2+spring3+hibernate3整合(一)

    Spring还支持数据源的配置,以便于Hibernate3连接数据库。此外,Spring的事务管理功能能够确保在多层调用中保持数据一致性。 Hibernate3作为ORM框架,用于数据库交互。它允许开发者以面向对象的方式来操作数据库,...

    jBPM4.3+struts2.1.8+spring2.5整合

    4. **数据源集成:** jBPM和Spring通常都需要数据库支持,需要配置数据源并确保它们共享同一个数据库连接。 5. **Maven或Gradle构建:** 如何使用构建工具管理项目依赖,确保jBPM、Struts2和Spring的版本兼容。 6....

    spring3.0 整合jbpm4.3请假demo

    修改配置文件的数据库连接部分就可以直接运行,由于文件过大,没有上传jar包,需要自己加入。将juel.jar 替换tomcat下的D:\Application\apache-tomcat-6.0.18\lib el-api.jar 否则冲突 浏览器输入:...

Global site tag (gtag.js) - Google Analytics