Skip to content

Commit f2e865f

Browse files
committed
upated to 2.2.3
1 parent 6eb6801 commit f2e865f

33 files changed

Lines changed: 111 additions & 56 deletions

Provider for MS SQL Server/Scripts/CreatePersistenceObjectsForAzureSQL.sql

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ BEGIN
2020
[RootSchemeCode] nvarchar (max) NULL,
2121
[RootSchemeId] uniqueidentifier NULL,
2222
[AllowedActivities] nvarchar (max) NULL,
23-
[StartingTransition] nvarchar (max) NULL,
23+
[StartingTransition] nvarchar (max) NULL,
2424
CONSTRAINT [PK_WorkflowProcessScheme] PRIMARY KEY CLUSTERED([Id] ASC)
2525
)
2626

@@ -31,7 +31,7 @@ IF NOT EXISTS (SELECT 1 FROM [INFORMATION_SCHEMA].[TABLES] WHERE [TABLE_NAME] =
3131
BEGIN
3232
CREATE TABLE [WorkflowProcessInstance](
3333
[Id] [uniqueidentifier] NOT NULL,
34-
[StateName] [nvarchar](max) NOT NULL,
34+
[StateName] [nvarchar](max) NULL,
3535
[ActivityName] [nvarchar](max) NOT NULL,
3636
[SchemeId] [uniqueidentifier] NULL,
3737
[PreviousState] [nvarchar](max) NULL,
@@ -67,8 +67,8 @@ BEGIN
6767
CREATE TABLE [WorkflowProcessTransitionHistory](
6868
[Id] [uniqueidentifier] NOT NULL,
6969
[ProcessId] [uniqueidentifier] NOT NULL,
70-
[ExecutorIdentityId] [nvarchar](max) NOT NULL,
71-
[ActorIdentityId] [nvarchar](max) NOT NULL,
70+
[ExecutorIdentityId] [nvarchar](max) NULL,
71+
[ActorIdentityId] [nvarchar](max) NULL,
7272
[FromActivityName] [nvarchar](max) NOT NULL,
7373
[ToActivityName] [nvarchar](max) NOT NULL,
7474
[ToStateName] [nvarchar](max) NULL,
@@ -107,15 +107,15 @@ BEGIN
107107
END
108108

109109

110-
IF NOT EXISTS (SELECT 1 FROM [INFORMATION_SCHEMA].[TABLES] WHERE [TABLE_NAME] = N'WorkflowRuntime')
111-
BEGIN
112-
CREATE TABLE [WorkflowRuntime](
113-
[RuntimeId] [uniqueidentifier] NOT NULL,
114-
[Timer] [nvarchar](max) NOT NULL,
115-
CONSTRAINT [PK_WorkflowRuntime] PRIMARY KEY CLUSTERED([RuntimeId] ASC)
116-
)
117-
PRINT 'WorkflowRuntime CREATE TABLE'
118-
END
110+
-- IF NOT EXISTS (SELECT 1 FROM [INFORMATION_SCHEMA].[TABLES] WHERE [TABLE_NAME] = N'WorkflowRuntime')
111+
-- BEGIN
112+
-- CREATE TABLE [WorkflowRuntime](
113+
-- [RuntimeId] [uniqueidentifier] NOT NULL,
114+
-- [Timer] [nvarchar](max) NOT NULL,
115+
-- CONSTRAINT [PK_WorkflowRuntime] PRIMARY KEY CLUSTERED([RuntimeId] ASC)
116+
-- )
117+
-- PRINT 'WorkflowRuntime CREATE TABLE'
118+
-- END
119119

120120
IF NOT EXISTS (SELECT 1 FROM [INFORMATION_SCHEMA].[TABLES] WHERE [TABLE_NAME] = N'WorkflowScheme')
121121
BEGIN

Provider for MySQL/DbObject.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public static T SelectByKey(MySqlConnection connection, object id)
7272
throw new Exception(string.Format("Key for table {0} isn't defined.", DbTableName));
7373
}
7474

75-
string selectText = string.Format("SELECT * FROM {0} WHERE `{1}` = @p_id", DbTableName, key.Name.ToUpper());
75+
string selectText = string.Format("SELECT * FROM {0} WHERE `{1}` = @p_id", DbTableName, key.Name);
7676
var pId = new MySqlParameter("p_id", key.Type) {Value = ConvertToDBCompatibilityType(id)};
7777

7878
return Select(connection, selectText, pId).FirstOrDefault();
@@ -88,7 +88,7 @@ public static int Delete(MySqlConnection connection, object id, MySqlTransaction
8888
var pId = new MySqlParameter("p_id", key.Type) {Value = ConvertToDBCompatibilityType(id)};
8989

9090
return ExecuteCommand(connection,
91-
string.Format("DELETE FROM {0} WHERE `{1}` = @p_id", DbTableName, key.Name.ToUpper()), transaction, pId);
91+
string.Format("DELETE FROM {0} WHERE `{1}` = @p_id", DbTableName, key.Name), transaction, pId);
9292
}
9393
public static int ExecuteCommand(MySqlConnection connection, string commandText,
9494
params MySqlParameter[] parameters)
@@ -144,7 +144,7 @@ public static T[] Select(MySqlConnection connection, string commandText, params
144144
{
145145
T item = new T();
146146
foreach (var c in item.DBColumns)
147-
item.SetValue(c.Name, row[c.Name.ToUpper()]);
147+
item.SetValue(c.Name, row[c.Name]);
148148
res.Add(item);
149149
}
150150

Provider for Oracle/DbObject.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public virtual int Insert(OracleConnection connection)
5353
{
5454
command.CommandText = string.Format("INSERT INTO {0} ({1}) VALUES ({2})",
5555
ObjectName,
56-
String.Join(",", DBColumns.Select(c=>c.Name.ToUpper())),
56+
String.Join(",", DBColumns.Select(c=>c.Name.ToUpperInvariant())),
5757
String.Join(",", DBColumns.Select(c=> ":" + c.Name)));
5858

5959
command.Parameters.AddRange(
@@ -69,8 +69,8 @@ public int Update(OracleConnection connection)
6969
{
7070
string command = string.Format(@"UPDATE {0} SET {1} WHERE {2}",
7171
ObjectName,
72-
String.Join(",", DBColumns.Where(c => !c.IsKey).Select(c => c.Name.ToUpper() + " = :" + c.Name)),
73-
String.Join(" AND ", DBColumns.Where(c => c.IsKey).Select(c => c.Name.ToUpper() + " = :" + c.Name )));
72+
String.Join(",", DBColumns.Where(c => !c.IsKey).Select(c => c.Name.ToUpperInvariant() + " = :" + c.Name)),
73+
String.Join(" AND ", DBColumns.Where(c => c.IsKey).Select(c => c.Name.ToUpperInvariant() + " = :" + c.Name )));
7474

7575
var parameters = DBColumns.Select(c =>
7676
new OracleParameter(c.Name, c.Type, GetValue(c.Name), ParameterDirection.Input)).ToArray();
@@ -89,7 +89,7 @@ public static T SelectByKey(OracleConnection connection, object id)
8989
throw new Exception(string.Format("Key for table {0} isn't defined.", ObjectName));
9090
}
9191

92-
string selectText = string.Format("SELECT * FROM {0} WHERE {1} = :p_id", ObjectName, key.Name.ToUpper());
92+
string selectText = string.Format("SELECT * FROM {0} WHERE {1} = :p_id", ObjectName, key.Name.ToUpperInvariant());
9393
var parameters = new[] {new OracleParameter("p_id", key.Type, ConvertToDBCompatibilityType(id), ParameterDirection.Input)};
9494

9595
return Select(connection, selectText, parameters).FirstOrDefault();
@@ -103,7 +103,7 @@ public static int Delete(OracleConnection connection, object id)
103103
throw new Exception(string.Format("Key for table {0} isn't defined.", ObjectName));
104104

105105
return ExecuteCommand(connection,
106-
string.Format("DELETE FROM {0} WHERE {1} = :p_id", ObjectName, key.Name.ToUpper()),
106+
string.Format("DELETE FROM {0} WHERE {1} = :p_id", ObjectName, key.Name.ToUpperInvariant()),
107107
new OracleParameter[]{
108108
new OracleParameter("p_id", key.Type, ConvertToDBCompatibilityType(id), ParameterDirection.Input)});
109109
}
@@ -152,7 +152,7 @@ public static T[] Select(OracleConnection connection, string commandText, params
152152
{
153153
T item = new T();
154154
foreach (var c in item.DBColumns)
155-
item.SetValue(c.Name, row[c.Name.ToUpper()]);
155+
item.SetValue(c.Name, row[c.Name.ToUpperInvariant()]);
156156
res.Add(item);
157157
}
158158

Provider for PostgreSQL/Scripts/CreatePersistenceObjects.sql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
/*
22
Company: OptimaJet
33
Project: WorkflowEngine.NET Provider for PostgreSQL
4-
Version: 2.2
4+
Version: 2.3
55
File: CreatePersistenceObjects.sql
66
*/
77
-- WorkflowInbox
88
CREATE TABLE "WorkflowInbox"
99
(
1010
"Id" uuid NOT NULL,
1111
"ProcessId" uuid NOT NULL,
12-
"IdentityId" character varying(256) NOT NULL,
12+
"IdentityId" uuid NOT NULL,
1313
CONSTRAINT "WorkflowInbox_pkey" PRIMARY KEY ("Id")
1414
);
1515

16-
CREATE INDEX "WorkflowInbox_IdentityId_idx" ON "WorkflowInbox" USING btree ("IdentityId" COLLATE pg_catalog."default");
16+
CREATE INDEX "WorkflowInbox_IdentityId_idx" ON "WorkflowInbox" USING btree ("IdentityId");
1717
CREATE INDEX "WorkflowInbox_ProcessId_idx" ON "WorkflowInbox" USING btree ("ProcessId");
1818

1919
--WorkflowProcessInstance
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/*
2+
Company: OptimaJet
3+
Project: WorkflowEngine.NET Provider for PostgreSQL
4+
Version: 2.3
5+
File: update_2_2_to_2_3.sql
6+
*/
7+
8+
ALTER TABLE "WorkflowInbox" ALTER COLUMN "IdentityId" TYPE uuid;
9+

Samples/DLL/OptimaJet.Workflow.Core.XML

Lines changed: 22 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
-512 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
512 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)