forked from optimajet/WorkflowEngine.NET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrelease-notes.html
More file actions
108 lines (105 loc) · 15.6 KB
/
release-notes.html
File metadata and controls
108 lines (105 loc) · 15.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<!--Stay on the edge of our innovations and learn about the changes made to Workflow Engine with each of our releases.-->
<h1 id="release-notes">Release Notes</h1>
<h2 id="2-2">2.2</h2>
<ul>
<li>Now it is possible to create asynchronous Actions and Conditions. You can call asynchronous methods from Actions and Conditions using the <code>await</code> keyword. Such methods will be the most effective if you use asynchronous methods of the <code>WorkflowRuntime</code> object, for instance, <code>ExecuteCommandAsync</code> instead of <code>ExecuteCommand</code>, or <code>SetStateAsync</code> instead of <code>SetState</code>, etc. You can create asynchronous Actions in Designer. To do that you simply need to check the Async checkbox in the Action or Condition where you're going to call asynchronous methods from. If you use <code>IWorkflowActionProvider</code>, then you will need to implement 4 additional methods. <code>bool IsActionAsync(string name)</code> and <code>bool IsConditionAsync(string name)</code> should return true so that the Action or Condition are called asynchronously. The execution of an asynchronous Action or Condition is done in the <code>Task ExecuteActionAsync(string name, ProcessInstance processInstance, WorkflowRuntime runtime, string actionParameter, CancellationToken token)</code> and <code>Task<bool> ExecuteConditionAsync(string name, ProcessInstance processInstance, WorkflowRuntime runtime, string actionParameter, CancellationToken token)</code> methods. </li>
<li>Parameters conveyed to the process with the command no longer need to be described as command parameters. Iа such a parameter is described in the scheme, it will be a Temporary or a Persistence one, depending on which Purpose is specified in the scheme. If the parameter is not described in the scheme, it will be a Temporary one.</li>
<li>The <code>ExecuteCommand</code> and <code>ExecuteCommandAsync</code> methods return information on whether the command has been executed (it may not be executed under certain conditions) and the <code>ProcessInstance</code> state after the execution of a command.</li>
</ul>
<p><strong>The following additional actions must be taken to uprgade to Workflow Engine 2.2:</strong></p>
<ul>
<li>If you use <code>IWorkflowActionProvider</code>, you will need to add 4 new methods to it: <code>IsActionAsync</code>, <code>IsConditionAsync</code>, <code>ExecuteActionAsync</code>, <code>ExecuteConditionAsync</code>. If you do not yet intend to use asynchronous Actions, then the <code>IsActionAsync</code> and <code>IsConditionAsync</code> methods should always return false, whereas <code>ExecuteActionAsync</code> and <code>ExecuteConditionAsync</code> can throw a NotImplementedException. </li>
</ul>
<pre><code class="lang-csharp">public bool IsActionAsync(string name)
{
return false;
}
public bool IsConditionAsync(string name)
{
return false;
}
public async Task ExecuteActionAsync(string name, ProcessInstance processInstance, WorkflowRuntime runtime, string actionParameter, CancellationToken token)
{
throw new NotImplementedException();
}
public async Task<bool> ExecuteConditionAsync(string name, ProcessInstance processInstance, WorkflowRuntime runtime, string actionParameter, CancellationToken token)
{
throw new NotImplementedException();
}
</code></pre>
<hr>
<h2 id="2-1">2.1</h2>
<ul>
<li>Workflow Engine for .NET Core App 1.1 is released. All Workflow Engine features are supported. This version will be updated simultaneously along the .NET Framework version. 2 persistence providers are currently supported: MS SQL Server and PostgreSQL. Links to NuGet packages and samples can be found <a href="/downloads">here</a>.</li>
<li>Workflow Engine scheme import/export to/from BPMN2 has been added.</li>
<li>Bulk process creation has been added. Now you can create a large amount of processes (100 - 100,000) in significantly less time than when using the <code>CreateInstance</code> method. Use the <code>_runtime.BulkCreateInstance(..)</code> method to do that. Currently, the feature is available in the .NET Framework version of Workflow Engine and supports only MS SQL Server. The list of supported databases will be expanded.</li>
</ul>
<hr>
<h2 id="2-0">2.0</h2>
<ul>
<li>Designer UI has been improved, transitions are now linear for better usability</li>
<li>Scheme rendering library <a href="https://github.com/ericdrowell/KineticJS">KineticJS</a> has been replaced with <a href="https://konvajs.github.io/">Konva.js</a></li>
<li><code>WorkflowDesigner.readonlymode()</code>, <code>WorkflowDesigner.printablemode()</code> and <code>WorkflowDesigner.ediatblemode()</code> methods have been added to <code>WorkflowDesigner</code> object in the client. <code>readonlymode</code> makes Designer uneditable. <code>printablemode</code> removes the toolbar, the grid and all controls, zooming designer so that the scheme occupies the entire canvas. This mode can be used to print Designer's viewport to a PDF within a browser. <code>editablemode</code> makes Designer editable.</li>
<li>Designer now allows users to make an autocomplete list for the following fields: <code>Actor.Value</code>, <code>Activity.Implementation.Action parameter</code>, <code>Transition.Condition.ActionParameter</code>. The autocomplete list is being populated server-side via the <code>IDesignerAutocompleteProvider</code> interface and by transferring implementation to the <code>WorkflowRuntime</code> object via <code>_runtime.WithDesignerAutocompleteProvider(provider)</code>.</li>
<li>The <code>GetConditions</code> method has been added to the <code>IWorkflowActionProvider</code> interface. Now, the choice of conditions and actions in Designer can be split.</li>
<li>Parameters of any type not mentioned in the scheme can now be used in Actions' code. The type should be serialized in JSON. Three methods are available: <code>_processInstance.SetParameter("parameterName",parameterValue,ParameterPurpose.Persistence)</code>, <code>_processInstance.GetParameter<ParameterType>("parameterName")</code> and <code>_processInstance.RemoveParameter("parameterName")</code>.</li>
<li>Ability to create Timers with a value which is undefined at the time of creation of a process has been added. <code>Timer.Value == -1</code> means that the current transition will not be executed until the respective timer has a defined value. <code>Timer.Value == 0</code> means that in case the timer connected to a transition does not have a value, this transition shall be processed automatically. Initial value of a timer can be set with the <code>_runtime.NeedTimerValue</code> event.</li>
<li>Ability to modify execution time for timers in running processes has been added. Use methods <code>_runtime.SetTimerValue(processId,timerName,newValue)</code> and <code>_runtime.ResetTimerValue(processId, timerName)</code> to change and reset timer values outside the process. Use methods <code>_runtime.SetTimerValue(processInstance,timerName,newValue)</code> and <code>_runtime.ResetTimerValue(processInstance, timerName)</code> to change and reset timer values from within your Actions. </li>
<li>Newtonsoft.Json version has been changed from 7.0.1 to 9.0.0.</li>
</ul>
<p><strong>The following additional actions must be taken to uprgade to Workflow Engine 2.0:</strong></p>
<ul>
<li>Replace the link to KineticJS with the link to konva.min.js. Konva.js library is included in the ZIP archive and in <code>nuget package WorkflowEngine.NET-Designer</code>.</li>
<li>Update Newtonsoft.Json.dll to 9.0.0. The library is included in the ZIP archive and in <code>nuget package WorkflowEngine.NET-Core</code>.</li>
<li>If you use <code>implementation</code> of <code>IWorkflowActionProvider</code> you should add a <code>public List<string> GetConditions()</code> method to it. It is advisable that the <code>GetActions</code> returns only the list of available Actions, whereas the <code>GetConditions</code> method should return the list of available Conditions. In this case they should be filtered properly in the Designer. However, if you do not want to modify your code, make sure that the <code>GetConditions</code> method throws a <code>NotImplementedException</code>. In this case, everything should work as it used to.</li>
<li>IF you use Oracle, you should run an <code>update_1_5_to_2_0.sql</code> script from the Oracle provider ZIP archive or a NuGet package.</li>
</ul>
<hr>
<h2 id="1-5-6">1.5.6</h2>
<ul>
<li>Two new persistence providers were added to WorkflowEngine.NET Redis Provider for <a href="http://redis.io/">Redis</a> and Ignite Provider for <a href="https://ignite.apache.org/">Apache Ignite</a></li>
<li>notrendertoolbar property was added to the Designer object configuration (client side javascript). You can hide toobar in the workflow designer for end users.</li>
<li>Second parameter which allow ignore AutoSchemeUpdate sign of Activity was added to the WorkflowRuntime.UpdateSchemeIfObsolete method.</li>
<li>Several redundat operations related to subprocess features were removed to increase performance.</li>
<li>Conditions are checked for transitions that creating subprocesses.</li>
</ul>
<hr>
<h2 id="1-5-5">1.5.5</h2>
<p>In this release several features have been added to simplify the generation of forms based ot commands. </p>
<ul>
<li>The sign <code>IsRequired</code> for command parameter. You can take it into account when generating forms, also it is used in the command valudation before the execution of command.</li>
<li>The <code>Default value</code> for command parameter. You can access it using <code>CommandParameter.DefaultValue</code> property, after you have received the list of available commands. You can set all command parameters to default value using <code>WorkflowCommand.SetAllParametersToDefault</code> or <code>WorkflowCommand.SetParameterToDefault</code> functions. The Default value must be a valid JSON (wich can be deserialized to type which is specified in the bond Parameter) or will be interpreted as a string.</li>
<li>An <code>autocompete</code> was added in the field <code>Type of Parameter</code> (editing window Parameters). It makes a suugestions about types which can be used such as primitive types (Int32, String etc) or your custom types. Types from assemblies which was registerd using <code>_runtime.RegisterAssemblyForCodeActions</code> function are added in the autocomplete list. To prevent registration or filter the list you can use the last two optional parameters of _runtime.RegisterAssemblyForCodeActions function - ignoreForDesigner and designerTypeFilter.</li>
<li>The <code>Initial values</code> were added for Parameters. You can yse Initial value only for Parameters which have Purpose = Persistence. This values must be a valid JSON (wich can be deserialized to type which is specified in the bond Parameter) or will be interpreted as a string. These values will be set to the process when it is created.</li>
<li>The JSON editor was added for edit <code>Parameter.InitialValue</code> (Parameters window), <code>Command.InputParameters.DefaultValue</code> (Commands window), <code>Actor.Value</code> (Actors window),
<code>Activity.Implementation.ActionParameter</code> (Activity window), <code>Transition.Condition.ActionParameter</code> (Transition window). The JSON editor includes a syntax highlight and Format button. The Format button can be used to format your JSON. Please note that if you use JSON with unquoted property names, you must add reference on <code>json5.js</code> library on Designer page. For Parameter.InitialValue (Parameters window) and Command.InputParameters.DefaultValue (Commands window) the JSON editor aso includes Create button. This button can be used to create an empty object based on Parameter.Type. Designer (on server) uses only parameterless constructor to create the empty object.</li>
<li>There are two new events was added to <code>WorkflowRuntime</code>. Both are occured only in normal execution mode (not in pre-execution). <code>BeforeActivityExecution</code> - is occured after the Runtime has chosen an appropriate transition for execution but before Actions in an Activity were executed. <code>ProcessActivityChanged</code> - is occured after some Activity was executed. You can use <code>ProcessActivityChanged.TransitionalProcessWasCompleted</code> property to ensure that the command (or timer) execution was finished. Using of these events could be more convenient than <code>ProcessStatusChanged</code> in some cases.</li>
<li><code>GetAllActorsForCommandTransitions(ProcessInstance)</code> method was added to <code>WorkflowRuntime</code>. You can use this method to get next potential approvers for current state.</li>
<li>You can change the JSON Serializer settings for Parameters derialization using SetParameterSerializerSettings configuration method.</li>
</ul>
<hr>
<h2 id="1-5-4">1.5.4</h2>
<ul>
<li>Schema was added in constructors of all SQL providers. For MsSQL the default schema is "dbo". For PostgreSql the default schema is "public". For Oracle the default schema is null.</li>
<li>You are able to specify an interval timer value with milliseconds, seconds, minutes and days. For example "1d 2h 4m 30s" - one day two hours four minutes thirty seconds or "5m 30s", "14d", "12h", "10m", "10s" etc. You are able to use following names. d, day or days to specify interval in days. h, hour or hours to specify interval in hours. m, minute or minutes to specify interval in minutes. s, second or seconds to specify interval in seconds. ms, millisecond or milliseconds to specify interval in milliseconds. If the interval is specified as just a numeric value, it is interpreted as the interval in milliseconds.</li>
<li>You are able to pass initial parameters of a process by using <code>_runtime.CreateInstance(CreateInstanceParams createInstanceParams)</code> method. Parameters passed in the createInstanceParams.InitialProcessParameters property will be used as initial for parameters of a process.</li>
</ul>
<hr>
<h2 id="1-5-3">1.5.3</h2>
<ul>
<li>The JSON serializer used by the engine was changed from <code>ServiceStack.Text to Newtonsoft.JSON</code>. 1.5.3 version of WFE was built with the <code>verion 7.0 of Newtonsoft.JSON</code>.</li>
<li><em>MSSQL provider</em> was rewritten from LINQtoSQL to ordinary SQL queries.</li>
<li>The <em>Parameter</em> window in the designer was implroved. Now you can hide System parameters. They are hidden by default.</li>
<li>Working with types in the <em>Parameter</em> window in the designer was improved. Now you are able to use short type's names such as String, Guid, Int32 etc for primitive types. The type names including namespace for custom types (OptimaJet.Workflow.Core.Model.ActivityDefinition, Business.Approvers etc)- Also you are able to use <> for generic types and [] for arrays.</li>
<li>Fixed a bug in the timers for their correct restart after restart of the workflow runtime.</li>
</ul>
<hr>
<h2 id="1-5-2">1.5.2</h2>
<ul>
<li><code>ExecutedActivity</code> and <code>ExecutedTransition</code> properties added in <code>ProcessInstance</code> class. Via them, you can access executed transition and activity during a transitional process.</li>
<li>A scheme of a process downloaded from the designer with not ecoded <em>Code Actions</em>. You can upload a scheme with encoded or not encoded code actions.</li>
<li>The algorithm of sub-process scheme separation improved for it to work properly with the different schemes.</li>
<li><code>GetAvailableCommands</code> method returns distinct commands.</li>
<li>Fixed parsing of the values of the <em>Timers</em> in different cultures</li>
<li>While merging the processes you can access the parameters of a subprocess using the property <code>MergedSubprocessParameters</code> of the <code>ProcessInstance</code> class.</li>
</ul>