`
darlin
  • 浏览: 877 次
  • 性别: Icon_minigender_1
  • 来自: 上海
最近访客 更多访客>>
社区版块
存档分类
最新评论

JPBM,SQLServer 2008设置

阅读更多
hibernate.cfg.xml
    <property name="hibernate.dialect">org.hibernate.dialect.SQLServerDialect</property>
    <property name="hibernate.connection.driver_class">com.microsoft.sqlserver.jdbc.SQLServerDriver</property>
    <property name="hibernate.connection.url">jdbc:sqlserver://localhost:1433;databaseName=jBPMDB</property>
    <property name="hibernate.connection.username">sa</property>
    <property name="hibernate.connection.password">password</property>
    <property name="hibernate.hbm2ddl.auto">create-drop</property>  
    <property name="hibernate.format_sql">true</property>


创建脚本:
    create table JBPM4_DEPLOYMENT (
        DBID_ bigint not null IDENTITY,
        NAME_ varchar(512),
        TIMESTAMP_ bigint,
        STATE_ varchar(255),
        primary key (DBID_)
    ) ;

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

    create table JBPM4_EXECUTION (
        DBID_ bigint not null IDENTITY,
        CLASS_ varchar(255) not null,
        DBVERSION_ int 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_ int,
        HISACTINST_ bigint,
        PARENT_ bigint,
        INSTANCE_ bigint,
        SUPEREXEC_ bigint,
        SUBPROCINST_ bigint,
        PARENT_IDX_ int,
        primary key (DBID_)
    ) ;

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

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

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

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

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

    create table JBPM4_ID_GROUP (
        DBID_ bigint not null IDENTITY,
        DBVERSION_ int not null,
        ID_ varchar(255),
        NAME_ varchar(255),
        TYPE_ varchar(255),
        PARENT_ bigint,
        primary key (DBID_)
    ) ;

    create table JBPM4_ID_MEMBERSHIP (
        DBID_ bigint not null IDENTITY,
        DBVERSION_ int not null,
        USER_ bigint,
        GROUP_ bigint,
        NAME_ varchar(255),
        primary key (DBID_)
    ) ;

    create table JBPM4_ID_USER (
        DBID_ bigint not null IDENTITY,
        DBVERSION_ int not null,
        ID_ varchar(255),
        PASSWORD_ varchar(255),
        GIVENNAME_ varchar(255),
        FAMILYNAME_ varchar(255),
        BUSINESSEMAIL_ varchar(255),
        primary key (DBID_)
    ) ;

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

    create table JBPM4_LOB (
        DBID_ bigint not null IDENTITY,
        DBVERSION_ int not null,
        BLOB_VALUE_ text,
        DEPLOYMENT_ bigint,
        NAME_ varchar(512),
        primary key (DBID_)
    ) ;

    create table JBPM4_PARTICIPATION (
        DBID_ bigint not null IDENTITY,
        DBVERSION_ int not null,
        GROUPID_ varchar(255),
        USERID_ varchar(255),
        TYPE_ varchar(255),
        TASK_ bigint,
        SWIMLANE_ bigint,
        primary key (DBID_)
    ) ;

    create table JBPM4_SWIMLANE (
        DBID_ bigint not null IDENTITY,
        DBVERSION_ int not null,
        NAME_ varchar(255),
        ASSIGNEE_ varchar(255),
        EXECUTION_ bigint,
        primary key (DBID_)
    ) ;

    create table JBPM4_TASK (
        DBID_ bigint not null IDENTITY,
        CLASS_ char(1) not null,
        DBVERSION_ int not null,
        NAME_ varchar(255),
        DESCR_ varchar(512),
        STATE_ varchar(255),
        SUSPHISTSTATE_ varchar(255),
        ASSIGNEE_ varchar(255),
        FORM_ varchar(255),
        PRIORITY_ int,
        CREATE_ datetime,
        DUEDATE_ datetime,
        PROGRESS_ int,
        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_)
    ) ;

    create table JBPM4_VARIABLE (
        DBID_ bigint not null IDENTITY,
        CLASS_ varchar(255) not null,
        DBVERSION_ int not null,
        KEY_ varchar(255),
        CONVERTER_ varchar(255),
        HIST_ bit,
        EXECUTION_ bigint,
        TASK_ bigint,
        DATE_VALUE_ datetime,
        DOUBLE_VALUE_ double precision,
        LONG_VALUE_ bigint,
        STRING_VALUE_ varchar(255),
        TEXT_VALUE_ varchar(512),
        LOB_ bigint,
        EXESYS_ bigint,
        primary key (DBID_)
    ) ;

   
    create index IDX_DEPLPROP_DEPL on JBPM4_DEPLOYPROP (DEPLOYMENT_);

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

    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 constraint FK_EXEC_PARENT 
        foreign key (PARENT_) 
        references JBPM4_EXECUTION;

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

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

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

    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 constraint FK_HACTI_HPROCI 
        foreign key (HPROCI_) 
        references JBPM4_HIST_PROCINST;

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

    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 constraint FK_HDETAIL_HPROCI 
        foreign key (HPROCI_) 
        references JBPM4_HIST_PROCINST;

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

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

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

    create index IDX_HSUPERT_SUB on JBPM4_HIST_TASK (SUPERTASK_);

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

    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 constraint FK_HVAR_HPROCI 
        foreign key (HPROCI_) 
        references JBPM4_HIST_PROCINST;

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

    create index IDX_GROUP_PARENT on JBPM4_ID_GROUP (PARENT_);

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

    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 constraint FK_MEM_GROUP 
        foreign key (GROUP_) 
        references JBPM4_ID_GROUP;

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

    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 constraint FK_JOB_CFG 
        foreign key (CFG_) 
        references JBPM4_LOB;

    create index IDX_LOB_DEPLOYMENT on JBPM4_LOB (DEPLOYMENT_);

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

    create index IDX_PART_TASK on JBPM4_PARTICIPATION (TASK_);

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

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

    create index IDX_SWIMLANE_EXEC on JBPM4_SWIMLANE (EXECUTION_);

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

    create index IDX_TASK_SUPERTASK on JBPM4_TASK (SUPERTASK_);

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

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

    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 constraint FK_VAR_LOB 
        foreign key (LOB_) 
        references JBPM4_LOB;

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

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

    alter table JBPM4_VARIABLE 
        add constraint FK_VAR_TASK 
        foreign key (TASK_) 
        references JBPM4_TASK;

SQLServer 2008测试通过

1
0
分享到:
评论
1 楼 accommands 2012-06-06  
不错,真棒。。。

相关推荐

    JPBM实战经验以及相关参考文档

    JPBM,全称为Java Business Process Management,是一款开源的工作流引擎,它主要用于管理和执行业务流程。在本文中,我们将深入探讨JPBM的核心概念、安装配置、实战应用以及相关资源,帮助你快速掌握这一强大的工具...

    深入浅出JPBM 第9章相关源代码

    在JPBM项目中,可能会有定义流程定义的BPMN(Business Process Model and Notation)文件,实现业务逻辑的Java类,以及相关的配置文件,如数据库连接配置、事务管理设置等。 4. **BPMN文件**:BPMN是一种图形化语言...

    流程控制应用JPBM

    4. **standard.jar** - 可能包含JSTL(JavaServer Pages Standard Tag Library),用于在JSP页面中执行常见的Web开发任务。 5. **log4j-1.2.15.jar** - 这是Apache Log4j的日志库,一个广泛使用的Java日志框架,...

    myeclipse中安装jpbm插件

    ### myeclipse中安装jpbm插件 #### 背景介绍 在软件开发过程中,集成各种插件是提高工作效率的重要手段之一。对于使用MyEclipse进行Java开发的工程师而言,安装JBPM(Business Process Management)插件可以极大地...

    jpbm公文流转实现

    另一方面,删除功能则允许用户在必要时清理不再需要的公文记录,但通常会设置权限控制,防止重要文件被误删。删除操作通常需要确认,以避免误操作带来的损失。 其次,公文流转的核心在于任务节点的设定和分配。在...

    JPBM 开发手册 开发指南

    2. **安装与配置**:详细介绍了如何在开发环境中安装和配置jBPM,包括数据库连接、工作目录设置和启动服务等步骤。 3. **jPDL介绍**:深入解析jPDL语法,包括基本元素如任务、分支、合并,以及高级特性如条件、事件...

    jpbm eclipse插件

    `jpbm eclipse插件`是一个专为Eclipse集成开发环境设计的扩展工具,主要用于提升开发者在处理业务流程建模(Business Process Modeling)时的效率和体验。版本号为3.0.13,表明这是一个经过多次迭代和优化的成熟产品...

    jpbm文件流jar包

    jpbm文件流依赖库,jbpm-jpdl-3.2.GA\jbpm-jpdl.jar

    JPBM的学习文档,学习工作流的朋友可以看看

    《JBPM工作流开发指南》是一份详尽的文档,旨在帮助开发者理解和使用JPBM这一工作流管理系统。JPBM(JBoss Business Process Management Suite)是Red Hat公司开发的一款开源工作流引擎,它提供了业务流程管理的全套...

    jpbm表结构ER图

    设计师会根据ER图来创建SQL脚本,进而创建实际的数据库表。因此,理解和分析"jpbm表结构ER图"对于开发、维护和优化"jpbm"系统至关重要。无论是数据库管理员、开发者还是业务分析师,都需要对这样的ER图有清晰的理解...

    JPBM实例报销和采购源代码

    **JPBM实例报销和采购源代码详解** JPBM(Java Business Process Management)是一种流行的工作流管理系统,用于在Java环境中管理业务流程。它提供了一种灵活、可扩展的方式来定义、执行和监控复杂的业务流程。本...

    工作流jpbm集成在ssh中(非原创)

    在Spring配置文件中,我们需要声明一个SessionFactory来创建和管理数据库会话,并设置数据源。同时,还要配置jBPM的EntityManagerFactory,以使jBPM能与Hibernate进行数据交互。 在Struts2中,我们需要创建一个...

    jbpm4 开发手册

    6. **jpbm4安装手册**:jbpm4的安装手册详细指导了如何设置开发环境、下载和配置jbpm4,以及启动和测试基本流程,是新用户入门的重要参考资料。 7. **jpbm学习笔记**:这些笔记可能包含开发者在实践过程中的经验...

    JPBM.zip_jbpm_jpbm

    "JPBM╢}╡o½ⁿ½n.pdf" 这个文件可能是JBPM 4.0开发手册的PDF版,其中可能涵盖了以上所有知识点的详细讲解,包括流程设计实例、代码示例、配置教程以及常见问题解答等内容。对于想要深入学习和使用JBPM 4.0的...

    jpbm工作流例子,已经搭建好,部署就可以

    1. **jbpm.sql**:这通常是一个数据库脚本,用于初始化jbpm相关的数据库表结构。在部署前,你需要先运行这个脚本到你的数据库服务器,为jbpm创建必要的数据表。 2. **jbpm-console.xml**:这是jbpm管理控制台的配置...

    深入浅出JPBM 第7章源代码

    【深入浅出JPBM 第7章源代码】是关于企业级业务流程管理(Business Process Management,简称BPM)系统开发的实践教程。本章节聚焦于报销与采购流程的实现,通过提供完整的工程源代码,帮助读者更直观地理解JPBM在...

    jpbm jar包和资料

    标题"jpbm jar包和资料"表明这是一个关于"jpbm"的资源集合,其中包含了一个jar包和相关的资料。jar包是Java平台上的可执行文件格式,通常用于打包Java类库或应用程序。资料可能包括帮助文档、教程或其他辅助学习材料...

Global site tag (gtag.js) - Google Analytics