OBE's database configuration process (Supplemental Edition)
Configuring a database
Thanks for Snailhyy, thanks to DCOMLI
Here is an explanation with mysql, preparation work is to install the MySQL database.
1. Create a database name OBE
2. Run the D: /OBE/OBE/obeserver/etc/ddl/mysql-ddl file. SQL file. (Remember to remove "type = InnoDB" and remove the comment inside, otherwise it will report an error) After the modification can be used, the DDL file can be used later in this article.
3. Run the D: /OBE/OBE/obeserver/etc/ddl/populatedb.sql file. This file is initially initialized.
4. Create a user name OBE, password is OBE
5. Establish permissions for this user, of course, you must first set up permission to operate the OBE database. Other can be selected.
The process of configuring the database is over. You can use MySQL client test, connect Obe @ localhost: 3306 to see if it is successful, then connects to the Obe database.
DDL file full text
Drop Table Obeauditry;
Drop Table ObeattributeInstance;
Drop Table ObeworkItem;
Drop Table ObectivityInstance;
Drop Table ObeprocessInstance;
DROP TABLE OBEPROCESSDEFINITION;
Drop Table Obepackage;
DROP TABLE OBESEQUENCE;
DROP TABLE OBEAUDITEVENT;
Drop Table ObectivityInstancestate;
Drop Table ObeattributeType;
Drop Table Obeattributeowner;
DROP TABLE OBEPROCESSINSTANCESTATE;
DROP TABLE OBEPROCESSDEFINITIONSTATE;
Create Table Obe.obeprocessDefinitionState
State Tinyint Not Null,
Name varchar (64) Not null,
PRIMARY Key
State
)
);
Create Table Obe.obeprocessInstancestate
State Tinyint Not Null,
Name varchar (64) Not null,
PRIMARY Key
State
)
);
Create Table Obe.obeattributeowner
Ownertype Tinyint Not Null,
TableName Varchar (64) Not NULL,
PRIMARY Key
Ownertype
)
);
Create Table Obe.obeattributeType
Type Tinyint Not Null,
Name varchar (64) Not null,
PRIMARY Key
Type
)
);
Create Table Obe.obeActivityInstancestate
State Tinyint Not Null,
Name varchar (64) Not null,
PRIMARY Key
State
)
);
Create Table Obe.obeauditEvent
Event Tinyint Not Null,
Name varchar (64) Not null,
PRIMARY Key
Event
)
);
CREATE TABLE OBE.OBESEQUENCE
Name varchar (64) Not null,
MaxKey Bigint Not Null, Primary Key
Name
)
);
Create Table Obe.obepackage
PackageID VARCHAR (64) Not NULL,
Name varchar (64) Not null,
Description varchar (254) NULL,
Version varchar (16) NULL,
Author varchar (32) NULL,
Vendor Varchar (32) NULL,
XPDLPACKAGEBLOB NOT NULL,
PRIMARY Key
PackageID
)
);
Create Table Obe.obeprocessDefinition
ProcessDefinitionID VARCHAR (64) Not null,
Name varchar (64) NULL,
Description varchar (254) NULL,
Author varchar (32) NULL,
Status varchar (32) NULL,
CreatedDate DateTime Null,
ValidFromDate DateTime NULL,
Validtodate DateTime Null,
State Tinyint Not Null,
PackageID VARCHAR (64) NULL,
PRIMARY Key
ProcessDefinitionID
),
Index (packageID),
Foreign Key
PackageID
)
References Obepackage (PackageID),
Index (State),
Foreign Key
State
)
References ObeprocessDefinitionState (State)
);
Create Table Obe.obeprocessInstance
ProcessInstanceId Bigint Not Null,
ParentActivityInstanceId Bigint Null,
Priority Tinyint NOT NULL,
CompletedDate DateTime Null,
CreatedDate DateTime Not Null,
ActivityDuedate DateTime Null,
ActivityTargetdate DateTime NULL,
Duedate DateTime Null,
Targetdate DateTime Null,
StartedDate DateTime Null,
Name varchar (64) NULL,
Participants Longblob Null,
State Tinyint Not Null,
ProcessDefinitionid varchar (64) NULL,
PRIMARY Key
ProcessInstanceID
),
INDEX (ProcessDefinitionID),
Foreign Key
ProcessDefinitionID
)
References obeprocessdefinition (ProcessDefinitionID),
Index (State),
Foreign Key
State
)
References ObeprocessInstancestate (State)
);
Create Table Obe.obeActivityInstance
ActivityInstanceId Bigint Not Null,
ActivityDefinitionID VARCHAR (64) Not Null,
StartedDate DateTime Null,
CompletedDate DateTime Null, Duedate DateTime NULL,
Targetdate DateTime Null,
SerialData Longblob NULL,
Name varchar (64) NULL,
Participants Longblob Null,
Priority Tinyint NOT NULL,
State Tinyint Not Null,
ProcessDefinitionid varchar (64) NULL,
ProcessInstanceId Bigint Null,
BLKACTIVITYINSTANCEID BIGINT NULL,
ToolIndex Tinyint Not Null,
PRIMARY Key
ActivityInstanceId
),
INDEX (ProcessDefinitionID),
Foreign Key
ProcessDefinitionID
)
References obeprocessdefinition (ProcessDefinitionID),
Index (ProcessInstanceID),
Foreign Key
ProcessInstanceID
)
References ObeprocessInstance (ProcessInstanceId),
Index (State),
Foreign Key
State
)
References ObeactivityInstanceState (state)
);
Create Index ObeactivityDefinitionId_idx ON ObeactivityInstance
ProcessInstanceID,
ActivityDefinitionID,
BLKACTIVITYINSTANCEID
);
Create Table Obe.obeworkItem
WorkItemid Bigint Not NULL,
Name varchar (64),
Participant varchar (64) Not null,
Performer varchar (64) Not null,
Priority Tinyint NOT NULL,
StartedDate DateTime Null,
CompletedDate DateTime Null,
Duedate DateTime Null,
Targetdate DateTime Null,
State Tinyint Not Null,
ActivityInstanceId Bigint Null,
ProcessInstanceId Bigint Null,
ProcessDefinitionid varchar (64) NULL,
ToolIndex Tinyint Not Null,
PRIMARY Key
WorkItemid
),
Index (ActivityInstanceId),
Foreign Key
ActivityInstanceID
)
References ObeactivityInstance (ActivityInstanceId),
Index (ProcessInstanceID),
Foreign Key
ProcessInstanceID
)
References ObeprocessInstance (ProcessInstanceId),
INDEX (ProcessDefinitionID),
Foreign Key
ProcessDefinitionID
)
References obeprocessdefinition (ProcessDefinitionID),
Index (State),
Foreign Key
State
)
References ObeactivityInstanceState (State));
Create Index ActivityInstanceId_idx ON ObeworkItem
ActivityInstanceID
);
Create Table Obe.obeattributeInstance
Ownerid Bigint NOT NULL,
Ownertype Tinyint Not Null,
Name varchar (64) Not null,
ProcessDefinitionID VARCHAR (64) Not null,
ProcessInstanceId Bigint Null,
Type Tinyint Not Null,
BoolValue Bool Null,
DateValue DateTime Null,
DBLVALUE FLOAT NULL,
INTVALUE Smallint NULL,
Objvalue Longblob Null,
Strvalue varchar (254) NULL,
PRIMARY Key
Ownerid,
Ownertype,
Name
),
Index (ProcessInstanceID),
Foreign Key
ProcessInstanceID
)
References ObeprocessInstance (ProcessInstanceId),
Index (Ownertype),
Foreign Key
Ownertype
)
References Obeattributeowner (Ownertype),
Index (Type),
Foreign Key
Type
)
References ObeattributeType (Type)
);
Create Table Obe.obeauditry
Auditryid Bigint Not Null,
ProcessDefinitionID VARCHAR (64),
ActivityDefinitionID VARCHAR (64),
InitialProcessInstanceId Bigint,
CurrentProcessInstanceId Bigint,
ActivityInstanceId Bigint,
ProcessState Tinyint,
Event Tinyint Not Null,
Domainid varchar (64) Not null,
Nodeid varchar (64) Not null,
Userid varchar (64),
RoleId varchar (64),
Auditdate DateTime Not Null,
Auditry Longblob Not NULL,
PRIMARY Key
Auditryid
),
Index (Event),
Foreign Key
Event
)
References ObeauditeVent (Event),
INDEX (ProcessState),
Foreign Key
ProcessState
)
References ObeprocessInstancestate (State)
);
Create Index Obeauditry_Inst_idx ON Obeauditiff (
InitialProcessInstanceId,
ActivityInstanceID
);