44// ReSharper disable once CheckNamespace
55namespace OptimaJet . Workflow . DbPersistence
66{
7- public class WorkflowProcessInstance : DbObject < WorkflowProcessInstance >
7+ public class WorkflowProcessInstance : DbObject < WorkflowProcessInstance >
88 {
9+ static WorkflowProcessInstance ( )
10+ {
11+ DbTableName = "WorkflowProcessInstance" ;
12+ }
13+
14+ public WorkflowProcessInstance ( )
15+ {
16+ DbColumns . AddRange ( new [ ]
17+ {
18+ new ColumnInfo { Name = "Id" , IsKey = true , Type = SqlDbType . UniqueIdentifier } ,
19+ new ColumnInfo { Name = "ActivityName" } ,
20+ new ColumnInfo { Name = "IsDeterminingParametersChanged" , Type = SqlDbType . Bit } ,
21+ new ColumnInfo { Name = "PreviousActivity" } ,
22+ new ColumnInfo { Name = "PreviousActivityForDirect" } ,
23+ new ColumnInfo { Name = "PreviousActivityForReverse" } ,
24+ new ColumnInfo { Name = "PreviousState" } ,
25+ new ColumnInfo { Name = "PreviousStateForDirect" } ,
26+ new ColumnInfo { Name = "PreviousStateForReverse" } ,
27+ new ColumnInfo { Name = "SchemeId" , Type = SqlDbType . UniqueIdentifier } ,
28+ new ColumnInfo { Name = "StateName" } ,
29+ new ColumnInfo { Name = "ParentProcessId" , Type = SqlDbType . UniqueIdentifier } ,
30+ new ColumnInfo { Name = "RootProcessId" , Type = SqlDbType . UniqueIdentifier }
31+ } ) ;
32+ }
33+
934 public string ActivityName { get ; set ; }
1035 public Guid Id { get ; set ; }
1136 public bool IsDeterminingParametersChanged { get ; set ; }
@@ -19,26 +44,6 @@ public class WorkflowProcessInstance: DbObject<WorkflowProcessInstance>
1944 public string StateName { get ; set ; }
2045 public Guid ? ParentProcessId { get ; set ; }
2146 public Guid RootProcessId { get ; set ; }
22- public WorkflowProcessInstance ( )
23- {
24- DbTableName = "WorkflowProcessInstance" ;
25- DbColumns . AddRange ( new [ ]
26- {
27- new ColumnInfo ( ) { Name = "Id" , IsKey = true , Type = SqlDbType . UniqueIdentifier } ,
28- new ColumnInfo ( ) { Name = "ActivityName" } ,
29- new ColumnInfo ( ) { Name = "IsDeterminingParametersChanged" , Type = SqlDbType . Bit } ,
30- new ColumnInfo ( ) { Name = "PreviousActivity" } ,
31- new ColumnInfo ( ) { Name = "PreviousActivityForDirect" } ,
32- new ColumnInfo ( ) { Name = "PreviousActivityForReverse" } ,
33- new ColumnInfo ( ) { Name = "PreviousState" } ,
34- new ColumnInfo ( ) { Name = "PreviousStateForDirect" } ,
35- new ColumnInfo ( ) { Name = "PreviousStateForReverse" } ,
36- new ColumnInfo ( ) { Name = "SchemeId" , Type = SqlDbType . UniqueIdentifier } ,
37- new ColumnInfo ( ) { Name = "StateName" } ,
38- new ColumnInfo ( ) { Name = "ParentProcessId" , Type = SqlDbType . UniqueIdentifier } ,
39- new ColumnInfo ( ) { Name = "RootProcessId" , Type = SqlDbType . UniqueIdentifier } ,
40- } ) ;
41- }
4247
4348 public override object GetValue ( string key )
4449 {
@@ -80,7 +85,7 @@ public override void SetValue(string key, object value)
8085 switch ( key )
8186 {
8287 case "Id" :
83- Id = ( Guid ) value ;
88+ Id = ( Guid ) value ;
8489 break ;
8590 case "ActivityName" :
8691 ActivityName = value as string ;
@@ -116,11 +121,11 @@ public override void SetValue(string key, object value)
116121 ParentProcessId = value as Guid ? ;
117122 break ;
118123 case "RootProcessId" :
119- RootProcessId = ( Guid ) value ;
124+ RootProcessId = ( Guid ) value ;
120125 break ;
121126 default :
122127 throw new Exception ( string . Format ( "Column {0} is not exists" , key ) ) ;
123128 }
124129 }
125130 }
126- }
131+ }
0 commit comments