Skip to content

Commit 8f569ee

Browse files
committed
2.1 -> 2.2 update
1 parent 14177f5 commit 8f569ee

66 files changed

Lines changed: 398 additions & 153 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Interfaces/ITimerManager.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.Collections.Generic;
3+
using System.Threading.Tasks;
34
using OptimaJet.Workflow.Core.Model;
45
using OptimaJet.Workflow.Core.Persistence;
56

@@ -54,7 +55,7 @@ public interface ITimerManager
5455
/// <param name="processId">Process id</param>
5556
/// <param name="timerName">Timer name in Scheme</param>
5657
/// <param name="newValue">New value of the timer</param>
57-
void SetTimerValue(Guid processId, string timerName, DateTime newValue);
58+
Task SetTimerValue(Guid processId, string timerName, DateTime newValue);
5859

5960
/// <summary>
6061
/// Resets value of named timer
@@ -68,7 +69,7 @@ public interface ITimerManager
6869
/// </summary>
6970
/// <param name="processId">Process id</param>
7071
/// <param name="timerName">Timer name in Scheme</param>
71-
void ResetTimerValue(Guid processId, string timerName);
72+
Task ResetTimerValue(Guid processId, string timerName);
7273

7374
/// <summary>
7475
/// Register all timers for all outgouing timer transitions for current actvity of the specified process.

Interfaces/IWorkflowActionProvider.cs

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
using System.Collections.Generic;
2+
using System.Threading;
3+
using System.Threading.Tasks;
24
using OptimaJet.Workflow.Core.Model;
35

46
namespace OptimaJet.Workflow.Core.Runtime
@@ -18,6 +20,16 @@ public interface IWorkflowActionProvider
1820
/// <param name="actionParameter">Additional action parameter <see cref="ActionDefinitionReference.ActionParameter"/></param>
1921
void ExecuteAction(string name, ProcessInstance processInstance, WorkflowRuntime runtime, string actionParameter);
2022

23+
/// <summary>
24+
/// Execute action asynchronously
25+
/// </summary>
26+
/// <param name="name">Name of the action to execute</param>
27+
/// <param name="processInstance">Reference to ProcessInstance from which action is executed <see cref="ProcessInstance"/></param>
28+
/// <param name="runtime">Reference to WorkflowRuntime object which managed specified process instance <see cref="WorkflowRuntime"/></param>
29+
/// <param name="actionParameter">Additional action parameter <see cref="ActionDefinitionReference.ActionParameter"/></param>
30+
/// <param name="token">Cancellation token</param>
31+
Task ExecuteActionAsync(string name, ProcessInstance processInstance, WorkflowRuntime runtime, string actionParameter, CancellationToken token);
32+
2133
/// <summary>
2234
/// Check condition
2335
/// </summary>
@@ -29,6 +41,30 @@ public interface IWorkflowActionProvider
2941
bool ExecuteCondition(string name, ProcessInstance processInstance, WorkflowRuntime runtime,
3042
string actionParameter);
3143

44+
/// <summary>
45+
/// Check condition asynchronously
46+
/// </summary>
47+
/// <param name="name">Name of the condition to check</param>
48+
/// <param name="processInstance">Reference to ProcessInstance from which condition is checked <see cref="ProcessInstance"/></param>
49+
/// <param name="runtime">Reference to WorkflowRuntime object which managed specified process instance <see cref="WorkflowRuntime"/></param>
50+
/// <param name="actionParameter">Additional action parameter <see cref="ActionDefinitionReference.ActionParameter"/></param>
51+
/// <param name="token">Cancellation token</param>
52+
/// <returns>Condition result</returns>
53+
Task<bool> ExecuteConditionAsync(string name, ProcessInstance processInstance, WorkflowRuntime runtime, string actionParameter, CancellationToken token);
54+
55+
56+
/// <summary>
57+
/// Checks whether the action should be called asynchronously
58+
/// </summary>
59+
/// <param name="name">Name of the action</param>
60+
bool IsActionAsync(string name);
61+
62+
/// <summary>
63+
/// Checks whether the condition should be called asynchronously
64+
/// </summary>
65+
/// <param name="name">Name of the condition</param>
66+
bool IsConditionAsync(string name);
67+
3268
/// <summary>
3369
/// Return all user actions names
3470
/// </summary>
@@ -40,5 +76,7 @@ bool ExecuteCondition(string name, ProcessInstance processInstance, WorkflowRunt
4076
/// </summary>
4177
/// <returns>List of conditions names</returns>
4278
List<string> GetConditions();
79+
80+
4381
}
4482
}

Interfaces/IWorkflowBus.cs

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
using System;
22
using System.Collections.Generic;
3+
using System.Threading;
4+
using System.Threading.Tasks;
35
using OptimaJet.Workflow.Core.Runtime;
46

57
namespace OptimaJet.Workflow.Core.Bus
@@ -23,29 +25,34 @@ public interface IWorkflowBus
2325
/// Queue execution with the list of <see cref="ExecutionRequestParameters"/>
2426
/// </summary>
2527
/// <param name="requestParameters">List of <see cref="ExecutionRequestParameters"/></param>
28+
/// <param name="token">Cancellation token</param>
2629
/// <param name="notFireExecutionComplete">If true - the Bus must execute the Request without firing ExecutionComplete</param>
27-
void QueueExecution(IEnumerable<ExecutionRequestParameters> requestParameters, bool notFireExecutionComplete = false);
30+
/// <returns>True if some activity and actions were executed</returns>
31+
Task<bool> QueueExecution(IEnumerable<ExecutionRequestParameters> requestParameters, CancellationToken token, bool notFireExecutionComplete = false);
2832

2933
/// <summary>
3034
/// Queue execution with the <see cref="ExecutionRequestParameters"/>
3135
/// </summary>
3236
/// <param name="requestParameters">Instance of <see cref="ExecutionRequestParameters"/></param>
37+
/// /// <param name="token">Cancellation token</param>
3338
/// <param name="notFireExecutionComplete">If true - the Bus must execute the Request without firing ExecutionComplete</param>
34-
void QueueExecution(ExecutionRequestParameters requestParameters, bool notFireExecutionComplete = false);
39+
/// <returns>True if some activity and actions were executed</returns>
40+
Task<bool> QueueExecution(ExecutionRequestParameters requestParameters, CancellationToken token, bool notFireExecutionComplete = false);
3541

3642
/// <summary>
3743
/// Raises after the execution was complete
3844
/// </summary>
39-
event EventHandler<ExecutionResponseEventArgs> ExecutionComplete;
45+
// event EventHandler<ExecutionResponseEventArgs> ExecutionComplete;
46+
event Func<IWorkflowBus,ExecutionResponseEventArgs, Task> ExecutionComplete;
4047

4148
/// <summary>
4249
/// Raises before execution of choosen activity
4350
/// </summary>
4451
event EventHandler<BeforeActivityExecutionEventArgs> BeforeExecution;
4552

46-
/// <summary>
47-
/// Returns true if the bus supports asynchronous model of execution
48-
/// </summary>
49-
bool IsAsync { get; }
53+
///// <summary>
54+
///// Returns true if the bus supports asynchronous model of execution
55+
///// </summary>
56+
//bool IsAsync { get; }
5057
}
5158
}

Provider for Apache Ignite/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("2.1.0")]
36-
[assembly: AssemblyFileVersion("2.1.0")]
35+
[assembly: AssemblyVersion("2.2.0")]
36+
[assembly: AssemblyFileVersion("2.2.0")]

Provider for MS SQL Server/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("2.1.0")]
36-
[assembly: AssemblyFileVersion("2.1.0")]
35+
[assembly: AssemblyVersion("2.2.0")]
36+
[assembly: AssemblyFileVersion("2.2.0")]

Provider for MS SQL Server/Scripts/CreatePersistenceObjects.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
Company: OptimaJet
33
Project: WorkflowEngine.NET Provider for MSSQL
4-
Version: 2.1
4+
Version: 2.2
55
File: CreatePersistenceObjects.sql
66
77
*/

Provider for MS SQL Server/Scripts/CreatePersistenceObjectsForAzureSQL.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
Company: OptimaJet
33
Project: WorkflowEngine.NET Provider for Azure
4-
Version: 2.1
4+
Version: 2.2
55
File: CreatePersistenceObjectsForAzure.sql
66
*/
77

Provider for MS SQL Server/Scripts/DropPersistenceObjects.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
Company: OptimaJet
33
Project: WorkflowEngine.NET Provider for MSSQL
4-
Version: 2.1
4+
Version: 2.2
55
File: DropPersistenceObjects.sql
66
*/
77

Provider for MongoDB/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("2.1.0")]
36-
[assembly: AssemblyFileVersion("2.1.0")]
35+
[assembly: AssemblyVersion("2.2.0")]
36+
[assembly: AssemblyFileVersion("2.2.0")]

Provider for MySQL/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("2.1.0")]
36-
[assembly: AssemblyFileVersion("2.1.0")]
35+
[assembly: AssemblyVersion("2.2.0")]
36+
[assembly: AssemblyFileVersion("2.2.0")]

0 commit comments

Comments
 (0)