k2 blackpearl k2serverlog database erd · the k2serverlog database the k2serverlog database...

29
INTRODUCTION K2 blackpearl K2ServerLog Database ERD March 4 DOCUMENT VERSION | 0.4

Upload: others

Post on 20-Feb-2020

11 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: K2 blackpearl K2ServerLog Database ERD · THE K2SERVERLOG DATABASE The K2ServerLog database relationships can basically be divided into 2 halves: the design-time data and the runtime

INTRODUCTION

K2 blackpearl K2ServerLog Database ERD

March 4

DOCUMENT VERSION | 0.4

Page 2: K2 blackpearl K2ServerLog Database ERD · THE K2SERVERLOG DATABASE The K2ServerLog database relationships can basically be divided into 2 halves: the design-time data and the runtime

The K2 blackpearl ServerLog Database contains all current and completed workflow data transactions.

CONTENTS

INTRODUCTION ................................................................................................................................................. 1

CONTENTS ......................................................................................................................................................... 2

THE K2SERVERLOG DATABASE....................................................................................................................... 3

Design-Time ............................................................................................................................................ 4

Runtime ................................................................................................................................................ 12

APPENDIX A – STATUS ................................................................................................................................... 27

Page 3: K2 blackpearl K2ServerLog Database ERD · THE K2SERVERLOG DATABASE The K2ServerLog database relationships can basically be divided into 2 halves: the design-time data and the runtime

THE K2SERVERLOG DATABASE

The K2ServerLog database relationships can basically be divided into 2 halves: the design-time data and the

runtime data. The design-time data contains all the process definitions. The reason that this data is duplicated

here (when one would expect that this data would only appear within the Transaction database) is that reporting

components (such as K2 View Flow) make use of this definition data in order to render a view of the process

definition, and thereupon overlay the runtime data over it. Therefore without the design-time data, there would not

be definition data (such as the actual co-ordinates of process elements) such that a design view could be

rendered.

The runtime data (also called the Instance data) contains all the data for the running instances of processes and

their components. This potentially includes detail all the way down to audit data for the changing of process and

activity data. The level of data logging is set in the K2 Service Manager, and can be set per process. By default,

all details for each process are logged.

The only component that logs any data into the Log database is the K2LogServer. All other components merely

read data from within this database.

Page 4: K2 blackpearl K2ServerLog Database ERD · THE K2SERVERLOG DATABASE The K2ServerLog database relationships can basically be divided into 2 halves: the design-time data and the runtime

DESIGN-TIME

Relationship Diagram

Page 5: K2 blackpearl K2ServerLog Database ERD · THE K2SERVERLOG DATABASE The K2ServerLog database relationships can basically be divided into 2 halves: the design-time data and the runtime

Design-Time Tables

Table ProcSet

Purpose

This table contains the names of each of the processes for the current K2 Server. This table is designed to abstract the process name from the actual

process definition, as there can be multiple definitions (versions) for a single process name. This table therefore contains the header information (name, description, etc) that is global to the entire process (regardless of version).

Fields:

Field Name Field Type Field Purpose

ID int The unique ID of this named process.

Name

nvarchar(128) The name of the process. This name must be unique, if a second process is created with the same name as an

existing process of the same name, it is considered to be a new version of the same process.

FullName nvarchar(1024) The full name of the K2 process.

Folder nvarchar(1024) The folder path in which the process exists.

Descr nvarchar(128) The description for the specific process.

ProcVerID int The Default Process version ID

Table Proc

Purpose

This table is the container for a single version of a process. The version number and date also reside within this table. Even though this table does

not contain many fields, there are many tables that link back to this table due to its unique identifier ID.

Fields:

Field Name Field Type Field Purpose

ID

int This is the unique ID for a particular ‘version’ of a

process. Only versions of processes can be planned so this ID is referenced in multiple places.

ProcSetID int Foreign key reference for associated row in ProcSet.

Metadata ntext Additional descriptive metadata (could be in XML

format) for the object.

Priority int The priority of the process.

ExpectedDuration The expected duration of the process.

LogLevel

tinyint The amount of detail that will be logged.

0 – No Logging 1 – Process Header Information

2 – Process and activity information 3 – complete logging

Page 6: K2 blackpearl K2ServerLog Database ERD · THE K2SERVERLOG DATABASE The K2ServerLog database relationships can basically be divided into 2 halves: the design-time data and the runtime

BusinessOwner nvarchar(128) The username tagged as the business owner for the

process. This can be used to send e-mails during

business related exceptions for the specific process.

TechnicalOwner

nvarchar(128) The username tagged as the technical owner for the

process. This can be used to send e-mails during technical related exceptions for the specific process.

Ver int The Version number for the specific process. Each

process begins at version 1.

VerDate

datetime The date that the particular version was exported.

Therefore this field contains the date and time of exporting of the process.

Table ProcRights

Purpose This table represents the permissions that users have to a specific process in ProcSet. The details are added to this table as the user logs into the K2 Server.

Fields:

Field Name Field Type Field Purpose

ProcSetID int Foreign Key link back to the process within ProcSet (the

named process) to which users have access.

User nvarchar(128) The specific username to which the permissions apply.

Admin bit Specifies whether the user has rights to administrate

the process.

Start bit Specifies whether the user has rights to start the

process.

View bit Specifies whether the user has view rights to the

process.

ViewPart bit Specifies whether the user has rights to view the

process if the user partakes in that process.

ServerEvent bit Specifies whether the user has rights to complete a

Server Event.

Table ProcGroup

Purpose This table represents the permissions that groups have to a specific process in ProcSet. The details are added to this table as the group logs into the K2 Server.

Fields:

Field Name Field Type Field Purpose

ProcSetID int Foreign key reference for associated row in ProcSet.

Group nvarchar(128) The specific group username to which the permissions

apply.

Admin bit Specifies whether the user has rights to administrate

Page 7: K2 blackpearl K2ServerLog Database ERD · THE K2SERVERLOG DATABASE The K2ServerLog database relationships can basically be divided into 2 halves: the design-time data and the runtime

the process.

Start bit Specifies whether the user has rights to start the

process.

View bit Specifies whether the user has view rights to the

process.

ViewPart bit Specifies whether the user has rights to view the

process if the user partakes in that process.

ServerEvent bit Specifies whether the user has rights to complete a

Server Event.

Table ProcData

Purpose The associated data fields for a specific process. This table links back to

Proc because the data fields can vary in different versions of a process.

Fields:

Field Name Field Type Field Purpose

ProcID int Foreign Key linking back to the process definition that

contains the specific data field.

Name nvarchar(128) The Name of the Data Field

Hidden bit Indication if this is a hidden data field

Audit bit Indicates if an audit trail is kept on this data field

OnDemand bit Indication if this is an on demand data field

Type tinyint The Data Type of the Data Field (E.g. String, Integer

etc)

Value ntext The initial value for the data field.

Metadata ntext Additional descriptive metadata (could be in XML

format) for the object.

Category nvarchar(128) The Object Browser Category

Table ProcXML

Purpose The associated XML fields for a specific process. This table links back to Proc because the XML fields can vary in different versions of a process.

Fields:

Field Name Field Type Field Purpose

ProcID int Foreign Key linking back to the process definition that

contains the specific data field.

Name nvarchar(128) The Name of the XML Field

Hidden bit Indication if this is a hidden XML data field

Audit bit Indicates if an audit trail is kept on this XML data field

OnDemand bit Indication if this is an on demand XML data field

Metadata ntext Additional descriptive metadata (could be in XML

format) for the object.

Page 8: K2 blackpearl K2ServerLog Database ERD · THE K2SERVERLOG DATABASE The K2ServerLog database relationships can basically be divided into 2 halves: the design-time data and the runtime

Schema ntext The Schema of the XML document.

Xsl ntext The Xsl Schema to be used to transform XML

Category nvarchar(128) The Object Browser Category

Table Act

Purpose This table contains all the activities for a specific version of a process. Therefore it links back to Proc.

Fields:

Field Name Field Type Field Purpose

ID int The unique ID for this particular activity.

ProcID int Foreign Key linking back to the process definition that

contains the specific activity.

Name nvarchar(128) The name of the activity. (display name)

Descr nvarchar(128) The description of the activity.

Metadata ntext Additional descriptive metadata (could be in XML

format) for the object.

Priority int The design-time priority of this activity.

ExpectedDuration int The expected duration for the activity.

Type int Specifies the Activity’s destination type i.e.

DestInstanceParallel, DestInstanceSerial,

SingleInstance, SlotInstanceParallel, SlotInstanceSerial

Slots int Determines the number of slots available as configured

in the K2 design environment (i.e K2 Designer for

Visual Studio).

UseTran bit Specifies whether the entire activity must be executed

as a single transaction.

Rect nvarchar(64) Coordinate information used to display the activity.

Maximized bit

Table ActData

Purpose Stores the associated data fields for a specific activity.

Fields:

Field Name Field Type Field Purpose

ActID int Foreign key to the activity.

Name nvarchar(128) The name of the data field.

Hidden bit Specifies whether this field will be displayed in reports.

Audit bit Specifies whether Audit trail will be kept on this data

field.

OnDemand bit Specifies if this data field should be loaded by default or

not.

ActScope bit Specifies if the Activity Datafield is Shared or not for

Page 9: K2 blackpearl K2ServerLog Database ERD · THE K2SERVERLOG DATABASE The K2ServerLog database relationships can basically be divided into 2 halves: the design-time data and the runtime

the Activity definition

Type tinyint The data type of the data field (String, Integer etc)

Value ntext The initial values for the data field.

Metadata ntext Additional descriptive metadata (could be in XML

format) for the object.

Category nvarchar(128) The Object Browser Category

Table ActXML

Purpose Stores the associated XML fields for a specific activity.

Fields:

Field Name Field Type Field Purpose

ActID int Foreign key to the activity.

Name nvarchar(128) The name of the XML field.

Hidden bit Indication if this is a hidden XML data field

Audit bit Indicates if an audit trail is kept on this XML data field

OnDemand bit Indication if this is an on demand XML data field

ActScope bit Specifies if the Activity Datafield is Shared or not for the

Activity definition

Metadata ntext Additional descriptive metadata (could be in XML

format) for the object.

Schema ntext The schema for the XML document field.

Xsl ntext The XSL schema used to transform XML

Category nvarchar(128) The Object Browser Category

Table Event

Purpose This table contains all the Events for a specific Activity. Therefore it links back to Act.

Fields:

Field Name Field Type Field Purpose

ID int The unique ID for this particular Event.

ProcID int Foreign Key linking back to the process definition that

contains the specific activity for this Event.

ActID int Foreign Key linking back to Activity definition for this

Event.

Name nvarchar(128) The name of the Event. (display name)

Descr nvarchar(256) The description of the Event.

Metadata ntext Additional descriptive metadata (could be in XML

format) for the object.

Priority int The design-time priority of this Event.

ExpectedDuration int The expected duration for the Event.

Pos bit The Position of the Event within the Activity.

Page 10: K2 blackpearl K2ServerLog Database ERD · THE K2SERVERLOG DATABASE The K2ServerLog database relationships can basically be divided into 2 halves: the design-time data and the runtime

Type tinyint Is this Event a Server Event, Client Event or IPC.

UseTran tinyint Used in Transactions.

Table Line

Purpose This table is used to link activities to one another through the use of lines.

Foreign keys are included to both of the activities that are linked by a line.

Fields:

Field Name Field Type Field Purpose

ID int The unique ID for a single line.

ProcID int Foreign Key link back to the specific version of the

process in which this line appears.

Name nvarchar(128) The name for the specific line. This name is used to

uniquely identify the line.

Descr nvarchar(256) The description for this line.

Metadata ntext Additional descriptive metadata (could be in XML

format) for the object.

StartID int Foreign Key linking to the ActID for the activity to which

the start of this line is linked.

FinishID int Foreign Key linking to the ActID for the activity to which

the end of this line is linked.

Coordinates nvarchar(64) Contains the coordinates for all the points for the line.

Type tinyint The line type (for display purposes in K2 View Flow)

Lbl nvarchar(64) This fields contains the label for the specific line.

LblRect nvarchar(64) The coordinates for the label object.

LblOffset nvarchar(50) The offset of the label object to the actual line.

LblStart bit This field relates to the position of the label for the

specific line.

LblPos bit This field relates to the position of the label for the

specific line.

LblStartOr tinyint This field relates to the position of the label for the

specific line.

LblFinishOr tinyint This field relates to the position of the label for the

specific line.

Table Esc

Purpose This table is used for the definition of escalations for a specific activity.

Fields:

Field Name Field Type Field Purpose

ID int The unique ID of the escalation.

ProcID int Foreign Key link back to the specific version of the

process in which this escalation appears.

Page 11: K2 blackpearl K2ServerLog Database ERD · THE K2SERVERLOG DATABASE The K2ServerLog database relationships can basically be divided into 2 halves: the design-time data and the runtime

ActID int Foreign Key link back to the activity for which the

escalations are defined.

Name nvarchar(128) The name of the escalation.

Descr nvarchar(256) The description of the escalation.

Metadata ntext Additional descriptive metadata (could be in XML

format) for the object.

Page 12: K2 blackpearl K2ServerLog Database ERD · THE K2SERVERLOG DATABASE The K2ServerLog database relationships can basically be divided into 2 halves: the design-time data and the runtime

RUNTIME

Relationship Diagram

Page 13: K2 blackpearl K2ServerLog Database ERD · THE K2SERVERLOG DATABASE The K2ServerLog database relationships can basically be divided into 2 halves: the design-time data and the runtime

Runtime Tables

Table ProcInst

Purpose This is the most important table of all the runtime tables. It holds the process instance. Many tables refer to the ID primary key of this table.

Fields:

Field Name Field Type Field Purpose

ID int The unique ID for this process instance. This value can

be obtained as the ProcInstID when the process is planned through the object model.

ProcID int Foreign Key link to the process definition in table Proc.

Status

tinyint The current status for the process. Please refer to

Appendix A – Status for details on process instance statuses.

StartDate datetime The date and time that the process started.

FinishDate datetime The date and time that the process completed.

Originator nvarchar(128) The username of the person that planned (started) the

process.

Priority int The current priority value of this process instance.

ExpectedDuration

int The runtime expected duration of the process instance. This could be the same as the design time value, or could have changed during the planning/running of the

process.

Folio

nvarchar(1024) The folio for this particular process instance. The folio is

a string-based field that can be used to uniquely identify this process instance in any required manner.

BatchID

int This id is internal to LogServer. LogServer assigns

batch id’s to each thread logging data.

Delegated bit True or False field indicating whether or not the process

instance has been delegated

DelegatedBy nvarchar(128) The User to whom the process instance has been

delegated to if the above field is set to True

Table ProcInstData

Purpose

This table contains the instance data for a specific process instance. The actual values are stored for the field names that are defined during the process design. This table contains the current values for each data field.

Any changes are logged and all previous values for each data field are stored in the ProcInstDataAudit table.

Fields:

Field Name Field Type Field Purpose

Page 14: K2 blackpearl K2ServerLog Database ERD · THE K2SERVERLOG DATABASE The K2ServerLog database relationships can basically be divided into 2 halves: the design-time data and the runtime

ProcInstID int Foreign Key reference to the Process Instance ID to

which this data field is linked.

ID int The unique instance ID for this data field instance.

Name nvarchar(128) The Name of the data field.

Value ntext The current Value of the data field.

Table ProcInstAudit

Purpose

This table is used to log any changes made to any process instance. The related ProcInst table stores the current values of the Process Instance. Note that when a process is planned, the initial values are not considered to

be a changed. Audit values are only populated IF the system auditing features have been initiated – see KB000298 for more information on logging and auditing.

Fields:

Field Name Field Type Field Purpose

ProcInstID int Foreign Key reference to the Process Instance ID to

which this item is linked.

User nvarchar(128) Name of user that made a change.

Date datetime Date that change was made.

Descr nvarchar(256) Description of change made.

Table ProcInstDataAudit

Purpose

This table is used to log any changes made to any process instance data variables. The related ProcInstData table stores the current value of the data field. Note that when a process is planned, the initial values are not

considered to be a change to the data values. Audit values are only populated IF the system auditing features have been initiated – see KB000298 for more information on logging and auditing.

Fields:

Field Name Field Type Field Purpose

ProcInstID int Foreign Key reference to the Process Instance ID to

which this data field is linked.

Name nvarchar(128) The name of the data field

User nvarchar(128) The name of the user that changed the data field. Note

that this could also be the K2Server.

Location nvarchar(128) Specifies the location within the Process where the

audit took place. Value format is “<Event type> -

<Event Name>” i.e. ‘Server Event – My Server Event’

Value ntext This contains that new value of the Process Instance

Data field as changed by the user referred to in the

‘Username’ field.

Date datetime The date and time that the data value was changed.

Page 15: K2 blackpearl K2ServerLog Database ERD · THE K2SERVERLOG DATABASE The K2ServerLog database relationships can basically be divided into 2 halves: the design-time data and the runtime

Table ProcInstXML

Purpose

This table contains the instance XML fields for a specific process instance.

The actual values are stored for the XML field names that are defined during the process design. This table contains the current values for each XML field. Any changes are logged and all previous values for each data

field are stored in the ProcInstXMLAudit table.

Fields:

Field Name Field Type Field Purpose

ProcInstID int Foreign Key reference to the Process Instance ID to

which this XML field is linked.

ID int The unique instance ID for this XML field instance.

Name nvarchar(128) The Name of the XML field.

Value ntext The current Value of the XML field.

Table ProcInstXMLAudit

Purpose

This table is used to log any changes made to any process instance XML variables. The related ProcInstXML table stores the current value of the XML field. Note that when a process is planned, the initial values are not

considered to be a change to the XML values. Audit values are only populated IF the system auditing features have been initiated – see KB000298 for more information on logging and auditing.

Fields:

Field Name Field Type Field Purpose

ProcInstID int Foreign Key reference to the Process Instance ID to

which this XML field is linked.

Name nvarchar(128) The Name of the XML field.

User nvarchar(128) The name of the user that changed the XML field. Note

that this could also be the K2Server.

Location nvarchar(128) Specifies the location within the Process where the

audit took place. Value format is “<Event type> -

<Event Name>” i.e. ‘Server Event – My Server Event’

Value

ntext This contains that new value of the Process Instance

XML field as changed by the user referred to in the ‘Username’ field.

Date datetime The date and time that the XML value was changed.

Table ActInst

Purpose

This table contains the activity instances linked back to the related process

instance. Note that the same activity may appear more than once because an activity instance can occur more than once during a process instance.

Page 16: K2 blackpearl K2ServerLog Database ERD · THE K2SERVERLOG DATABASE The K2ServerLog database relationships can basically be divided into 2 halves: the design-time data and the runtime

Fields:

Field Name Field Type Field Purpose

ProcInstID int Foreign Key linking back to the related process instance

in which this activity instance resides.

ID int Unique instance ID for a particular activity instance.

ActID int Foreign Key linking back to the Activity for the specific

activity instance.

Status tinyint Current Status of the activity. Please refer to Appendix

A – Status for details on activity instance statuses.

StartDate datetime The date and time that the activity started.

FinishDate datetime The date and time that the activity completed.

Slots int Slots Allocated

Priority int The current priority value of this activity instance.

ExpectedDuration int The runtime expected duration for the activity. This

could be the same as the design time value, or could

have been changed.

PrecRuleResult tinyint The result of the preceding rule is stored, such that it

can be accessed at a later stage. (via the Object Model)

StartRuleResult tinyint The result of the Start Rule is stored, such that it can be

accessed at a later stage. (via the Object Model)

DestRuleResult tinyint The result of the Destination Rule is stored, such that it

can be accessed at a later stage. (via the Object Model)

Table ActInstAudit

Purpose

This table is used to log any changes made to any Activity instance. The related ActInst table stores the current values of the Activity Instance.

Audit values are only populated IF the system auditing features have been initiated – see KB000298 for more information on logging and auditing.

Fields:

Field Name Field Type Field Purpose

ProcInstID int Foreign Key reference to the Process Instance ID to

which this item is linked.

ActInstID int Foreign Key reference to the Activity Instance ID to

which this item is linked.

User nvarchar(128) Name of user that made a change.

Date datetime Date that change was made.

Descr nvarchar(256) Description of change made.

Table ActInstDest

Purpose This table contains an entry for each person/group that a specific activity was allocated to.

Fields:

Page 17: K2 blackpearl K2ServerLog Database ERD · THE K2SERVERLOG DATABASE The K2ServerLog database relationships can basically be divided into 2 halves: the design-time data and the runtime

Field Name Field Type Field Purpose

ProcInstID int Foreign Key linking back to the related process instance

in which this activity instance destination resides.

ID int The unique ID for the Activity Instance.

ActInstID int Foreign Key linking back to the related activity instance

in which this activity instance destination resides.

User varchar(128) The user performing the Action

Status tinyint Current Status of the activity. Please refer to Appendix

A – Status for details on activity instance statuses.

StartDate datetime This contains the start date for the activity instance

destination.

FinishDate datetime This contains the end date for the activity instance

destination.

SucRuleResult tinyint The result of the succeeding rule is stored per activity

destination.

Table ActInstDestData

Purpose

This table contains the instance data for a specific activity instance. The actual values are stored for the field names that are defined during the

process design. This table contains the current values for each data field. Any changes are logged and all previous values for each data field are stored in the ActInstDestDataAudit table.

Fields:

Field Name Field Type Field Purpose

ProcInstID int Foreign Key linking back to the related process instance

in which this activity data field resides.

ID int The unique instance ID for this activity data field

instance.

ActInstDestID int Foreign Key linking to the associated entry in

ActInstDest for each data field.

Name nvarchar(128) The Name of the data field.

Value ntext The current value of the data field.

Table ActInstDestDataAudit

Purpose

This table is used to log any changes made to any activity instance data variables. The related ActInstDestData table stores the current value of the data field.

Audit values are only populated IF the system auditing features have been initiated – see KB000298 for more information on logging and auditing.

Fields:

Field Name Field Type Field Purpose

ProcInstID int Foreign Key linking back to the related process instance

Page 18: K2 blackpearl K2ServerLog Database ERD · THE K2SERVERLOG DATABASE The K2ServerLog database relationships can basically be divided into 2 halves: the design-time data and the runtime

in which this activity data field resides.

ActInstDestID int Foreign Key linking to the associated entry in

ActInstDest for each data field.

Name nvarchar(128) The Name of the data field.

User nvarchar(128) The name of the user that changed the data field. Note

that this could also be the K2Server.

Location nvarchar(128) Specifies the location within the Process where the

audit took place. Value format is “<Event type> - <Event Name>” i.e. ‘Server Event – My Server Event’

Value ntext This contains that new value of the Activity Instance

Data field as changed by the user referred to in the

‘Username’ field.

Date datetime The date and time at which the change was made.

Table ActInstDestXML

Purpose

This table contains the instance XML data for a specific activity instance. The actual values are stored for the field names that are defined during the

process design. This table contains the current values for each XML data field. Any changes are logged and all previous values for each data field are stored in the ActInstDestXMLAudit table.

Fields:

Field Name Field Type Field Purpose

ProcInstID int Foreign Key linking back to the related process instance

in which this activity XML field resides.

ID int The unique instance ID for this activity XML field

instance.

ActInstDestID int Foreign Key linking to the associated entry in

ActInstDest for each XML field.

Name nvarchar(128) The Name of the XML field.

Value ntext The current value of the XML field.

Table ActInstDestXMLAudit

Purpose

This table is used to log any changes made to any activity instance XML variables. The related ActInstDestXML table stores the current value of the XML field.

Audit values are only populated IF the system auditing features have been initiated – see KB000298 for more information on logging and auditing.

Fields:

Field Name Field Type Field Purpose

ProcInstID int Foreign Key linking back to the related process instance

in which this activity XML field resides.

ActInstDestID int Foreign Key linking to the associated entry in

Page 19: K2 blackpearl K2ServerLog Database ERD · THE K2SERVERLOG DATABASE The K2ServerLog database relationships can basically be divided into 2 halves: the design-time data and the runtime

ActInstDest for each XML field.

Name nvarchar(128) The Name of the XML field.

User nvarchar(128) The name of the user that changed the data field. Note

that this could also be the K2Server.

Location nvarchar(128) Specifies the location within the Process where the

audit took place. Value format is “<Event type> -

<Event Name>” i.e. ‘Server Event – My Server Event’

Value ntext This contains that new value of the Activity Instance

XML field as changed by the user referred to in the

‘Username’ field.

Date datetime The date and time at which the change was made.

Table EventInst

Purpose This table contains event instances. Each event instance is linked back to an associated activity instance (in which the specific event instance occurs).

Fields:

Field Name Field Type Field Purpose

ProcInstID int Foreign Key linking to the associated process instance

for each event instance.

ID int The unique ID for this event instance.

ActInstDestID int Foreign Key linking to the associated entry in

ActInstDest for each event instance.

EventID int Foreign Key linking to the associated Event definition in

table Event.

Status tinyint Current Status of the activity. Please refer to Appendix

A – Status for details on event instance statuses.

StartDate datetime The start date and time for the specific event instance.

FinishDate datetime The date and time that this event was completed.

Priority int The current priority value of this activity instance.

ExpectedDuration

int The runtime expected duration for the event. This could

be the same as the design time definition but could have changed.

Table LineInst

Purpose This table is used to represent instances of lines.

Fields:

Field Name Field Type Field Purpose

ProcInstID int Foreign Key linking to the associated process instance

for each line instance.

ID int The unique ID for this line instance.

LineID int Foreign Key linking to the design time Line table for

each line instance.

Page 20: K2 blackpearl K2ServerLog Database ERD · THE K2SERVERLOG DATABASE The K2ServerLog database relationships can basically be divided into 2 halves: the design-time data and the runtime

StartActInstID int Foreign Key linking to the ActInstID for the activity

instance which the start of this line is linked.

FinishActInstID int Foreign Key linking to the ActInstID for the activity

instance which the end of this line is linked.

Result tinyint The result of the line rule for this particular line instance.

Note that the same line can have multiple instances for a single process instance.

Table EscInst

Purpose This table is used to house an instance of an escalation.

Fields:

Field Name Field Type Field Purpose

ProcInstID int Foreign Key linking to the associated process instance

for each escalation instance.

ActInstID int Foreign Key linking to the associated activity instance

for each escalation instance.

EscID int Foreign Key linking to the associated escalation for

each escalation instance.

ExecDate datetime The exact date and time that this escalation will fire.

Table IPC

Purpose This table is used to house an instance of an IPC.

Fields:

Field Name Field Type Field Purpose

SrcProcInstID int Foreign Key linking to the associated process instance

for each IPC instance Source.

SrcEventInstID int Foreign Key linking to the associated Event instance for

each IPC instance Source.

DestServer nvarchar(128) Name of destination server.

DstPort int Port number for Destination server

DstProcInstID int Foreign Key linking to the Destination process instance

for each IPC instance.

Table LogBatch

Purpose This table is used to ensure that integrity of log data stays intact.

Fields:

Field Name Field Type Field Purpose

ID int Unique ID of logging Instance.

ProcInstID int Identity of Process Instance logged.

Page 21: K2 blackpearl K2ServerLog Database ERD · THE K2SERVERLOG DATABASE The K2ServerLog database relationships can basically be divided into 2 halves: the design-time data and the runtime

Table Worklist

Purpose This table contains the required worklist data for a client event. Each Worklist is linked back to an associated process instance.

Fields:

Field Name Field Type Field Purpose

ProcInstID int Foreign Key reference to the Process Instance ID to

which this worklist field is linked

ActInstDestID int Foreign Key reference to the Activity Instance

Destination

Destination nvarchar(255) The User to whom the worklist item is assigned to

DestType int User, Role, or Group

StartDate datetime The date that the worklist item was ‘planned’ by the K2

Server

EndDate datetime The date that the worklist item was completed

Status

int Current Status of the worklist item. Please refer to

Appendix A – Status for details on wordlist item statuses.

Table ProcEsc

Purpose If the process was designed with a Process Escalation clause then this table stores the values defining the escalation.

Fields:

Field Name Field Type Field Purpose

ID int Unique ID of the process escalation instance.

ProcID int Foreign Key linking back to the process definition that

contains the specific process escalation

Name nvarchar(128) The Name of the Process Escalation

Descr nvarchar(256) The description of the Process Escalation

MetaData ntext Additional descriptive metadata (could be in XML

format) for the object.

Table ProcEscInst

Purpose This table contains process escalation instances. Each process escalation instance is linked back to an associated process instance.

Fields:

Field Name Field Type Field Purpose

ProcInstID int Foreign Key reference to the Process Instance ID to

which this process escalation field is linked.

EscID int Foreign Key reference to the Escalation ID to which this

process escalation instance is linked.

ExecDate datetime The date that the escalation executed on.

Page 22: K2 blackpearl K2ServerLog Database ERD · THE K2SERVERLOG DATABASE The K2ServerLog database relationships can basically be divided into 2 halves: the design-time data and the runtime

Table ActInstData

Purpose This table stores the Activity level Data fields of each instance of the Activity

Fields:

Field Name Field Type Field Purpose

ProcInstID int Foreign Key reference to the Process Instance ID to

which this action data field is linked

ID int Unique ID of the action’s slot instance.

ActInstID int Foreign Key linking to the associated activity instance

for each slot instance.

Name nvarchar(128) The Name of the data field.

Value ntext The data value (typically the last value that the field was

set to)

Table ActInstDataAudit

Purpose Each change in the ActInstData table is stored in this table. Audit values are only populated IF the system auditing features have been initiated – see KB000298 for more information on logging and auditing.

Fields:

Field Name Field Type Field Purpose

ProcInstID int Foreign Key reference to the Process Instance ID to

which this action audit data field is linked.

ActInstID int Foreign Key linking to the associated activity instance

for each slot instance.

Name nvarchar(128) The Name of the data field.

User nvarchar(128) The name of the user that changed the data field. Note

that this could also be the K2Server.

Location nvarchar(128)

Value ntext The value of the changed Data field

Date datetime The date that the Data field was changed

Table ActInstXml

Purpose This table stores the Activity level XML fields of each instance of the Activity

Fields:

Field Name Field Type Field Purpose

ProcInstID int Foreign Key reference to the Process Instance ID to

which this action Xml field is linked

ID int Unique ID of the action’s slot instance.

ActInstID int Foreign Key linking to the associated activity instance

for each slot instance.

Name nvarchar(128) The Name of the XML field.

Value ntext The value of the XML field.

Page 23: K2 blackpearl K2ServerLog Database ERD · THE K2SERVERLOG DATABASE The K2ServerLog database relationships can basically be divided into 2 halves: the design-time data and the runtime

Table ActInstXmlAudit

Purpose Each change in the ActInstXml table is stored in this table Audit values are only populated IF the system auditing features have been initiated – see KB000298 for more information on logging and auditing.

Fields:

Field Name Field Type Field Purpose

ProcInstID int Foreign Key reference to the Process Instance ID to

which this action audit Xml field is linked

ActInstID int Foreign Key linking to the associated activity instance

for each activity instance.

Name nvarchar(128) The Name of the XML field.

User nvarchar(128) The name of the user that changed the data field. Note

that this could also be the K2Server.

Location nvarchar(128)

Value ntext The value of the changed Xml field

Date datetime The date that the Xml field was changed

Table ActInstSlot

Purpose The table keeps track of Client Event activities; tracking which user

performed the activity and action for each activity slot.

Fields:

Field Name Field Type Field Purpose

ProcInstID int Foreign Key reference to the Process Instance ID to

which this slot action field is linked

ID int Unique ID of the action’s slot instance.

ActInstID int Foreign Key linking to the associated activity instance

for each slot instance.

User nvarchar(128) The user that performed the action.

Status tinyint Current Status of the activity. Please refer to Appendix

A – Status for details on event instance statuses.

StartDate datetime The date/time that the Activity Instance was planned.

FinishDate datetime The date/time that the Activity was completed.

SucRuleResult tinyint Specifies the outcome value of the succeeding rule.

i.e. if the succeeding rule evaluated to true or false.

FinalAction nvarchar(128) The Action that was performed.

AssignedDate datetime Used to track if and when the Activity was delegated or

redirected to another user

Page 24: K2 blackpearl K2ServerLog Database ERD · THE K2SERVERLOG DATABASE The K2ServerLog database relationships can basically be divided into 2 halves: the design-time data and the runtime

Table ActInstSlotData

Purpose Stores the Activity level Data fields specific to each slot of an Activity

Fields:

Field Name Field Type Field Purpose

ProcInstID int Foreign Key reference to the Process Instance ID to

which this slot action Data field is linked

ID int Unique ID of the action’s slot data instance.

ActInstSlotID int Foreign Key reference to the Activity Slot Instance to

which this slot action Data field is linked.

Name nvarchar(128) The name of the Data field.

Value ntext The value of the Data field

Table ActInstSlotDataAudit

Purpose

Each change in the ActInstSlotData table is stored in this table

Audit values are only populated IF the system auditing features have been initiated – see KB000298 for more information on logging and auditing.

Fields:

Field Name Field Type Field Purpose

ProcInstID int Foreign Key reference to the Process Instance ID to

which this action slot audit data field is linked

ActInstSlotID int Foreign Key reference to the ID of the action’s slot

instance

Name nvarchar(128) The Name of the data field.

User nvarchar(128) The name of the user that changed the data field. Note

that this could also be the K2Server.

Location nvarchar(128) Specifies the location within the Process where the

audit took place. Value format is “<Event type> - <Event Name>” i.e. ‘Server Event – My Server Event’

Value ntext The value of the changed Data field

Date datetime The date that the Data field was changed

Table ActInstSlotXml

Purpose Stores the Activity level Xml fields specific to each slot of an Activity

Fields:

Field Name Field Type Field Purpose

ProcInstID int Foreign Key reference to the Process Instance ID to

which this action slot Xml field is linked

ID int Unique ID of the action’s slot Xml instance.

ACtInstSlotID int

Name nvarchar(128) The name of the Xml field.

Value ntext The value of the Xml Field

Page 25: K2 blackpearl K2ServerLog Database ERD · THE K2SERVERLOG DATABASE The K2ServerLog database relationships can basically be divided into 2 halves: the design-time data and the runtime

Table ActInstSlotXmlAudit

Purpose Each change in the ActInstSlotXml table is stored in this table Audit values are only populated IF the system auditing features have been initiated – see KB000298 for more information on logging and auditing.

Fields:

Field Name Field Type Field Purpose

ProcInstID int Foreign Key reference to the Process Instance ID to

which this action slot audit Xml field is linked

ActInstSlotID int Foreign Key reference to the ID of the action’s slot

instance

Name nvarchar(128) The Name of the XML field.

User nvarchar(128) The name of the user that changed the data field. Note

that this could also be the K2Server.

Location nvarchar(128) Specifies the location within the Process where the

audit took place. Value format is “<Event type> - <Event Name>” i.e. ‘Server Event – My Server Event’

Value ntext The value of the changed Xml field

Date datetime The date that the Xml field was changed

Table EventEsc

Purpose If the process was designed with an Event Escalation clause then this table stores the values defining the escalation.

Fields:

Field Name Field Type Field Purpose

ID int Unique ID of the event escalation instance.

ProcID int Foreign Key linking back to the process definition that

contains the specific event escalation.

EventID int Unique ID of the Event escalation

Name nvarchar(128) The name of the Event escalation

Descr nvarchar(256) The description of the Event escalation

MetaData ntext Additional descriptive metadata (could be in XML

format) for the object.

Table EventEscInst

Purpose This table contains Event escalation instances. Each Event escalation instance is linked back to an associated process instance.

Fields:

Field Name Field Type Field Purpose

Page 26: K2 blackpearl K2ServerLog Database ERD · THE K2SERVERLOG DATABASE The K2ServerLog database relationships can basically be divided into 2 halves: the design-time data and the runtime

ProcInstID int Foreign Key linking to the associated process instance

for each event escalation instance.

EventInstID int Foreign Key linking to the associated Event instance for

each event escalation instance

EscID int Foreign Key reference to the Escalation ID to which this

process escalation instance is linked.

ExecDate datetime The date that the escalation executed on.

Page 27: K2 blackpearl K2ServerLog Database ERD · THE K2SERVERLOG DATABASE The K2ServerLog database relationships can basically be divided into 2 halves: the design-time data and the runtime

APPENDIX A – STATUS

Various status indicators are used in different places. These are all integer based fields. This section defines what many of the statuses mean. The details shown in this section are also contained within table Status, Priority.

Process Status

Status Meaning

0 Error

1 Running

2 Active

3 Completed

4 Stopped

5 Deleted

Activity Status

Status Meaning

0 Empty

1 Waiting

2 Active

3 Expired

4 Completed

Page 28: K2 blackpearl K2ServerLog Database ERD · THE K2SERVERLOG DATABASE The K2ServerLog database relationships can basically be divided into 2 halves: the design-time data and the runtime

Activity Destination Status

Status Meaning

0 Active

1 Expired

2 Complete

Event Status

Status Meaning

0 Empty

1 Active

2 Expired

3 Completed

4 Error

Worklist Status

Status Meaning

0 Available

1 Allocated

2 Open

3 Sleep

Page 29: K2 blackpearl K2ServerLog Database ERD · THE K2SERVERLOG DATABASE The K2ServerLog database relationships can basically be divided into 2 halves: the design-time data and the runtime

Priority

Priority Meaning

0 High

1 Medium

2 Low

Slot Status

Priority Meaning

0 Available

1 Allocated

2 Open

3 Sleep

4 Completed