Workflow Engine 2.0
- Designer UI has been improved, transitions are now linear for better usability
- Scheme rendering library KineticJS has been replaced with Konva.js
WorkflowDesigner.readonlymode(),WorkflowDesigner.printablemode()andWorkflowDesigner.ediatblemode()methods have been added toWorkflowDesignerobject in the client.readonlymodemakes Designer uneditable.printablemoderemoves 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.editablemodemakes Designer editable.- Designer now allows users to make an autocomplete list for the following fields:
Actor.Value,Activity.Implementation.Action parameter,Transition.Condition.ActionParameter. The autocomplete list is being populated server-side via theIDesignerAutocompleteProviderinterface and by transferring implementation to theWorkflowRuntimeobject via_runtime.WithDesignerAutocompleteProvider(provider). - The
GetConditionsmethod has been added to theIWorkflowActionProviderinterface. Now, the choice of conditions and actions in Designer can be split. - 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:
_processInstance.SetParameter("parameterName",parameterValue,ParameterPurpose.Persistence),_processInstance.GetParameter<ParameterType>("parameterName")and_processInstance.RemoveParameter("parameterName"). - Ability to create Timers with a value which is undefined at the time of creation of a process has been added.
Timer.Value == -1means that the current transition will not be executed until the respective timer has a defined value.Timer.Value == 0means 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_runtime.NeedTimerValueevent. - Ability to modify execution time for timers in running processes has been added. Use methods
_runtime.SetTimerValue(processId,timerName,newValue)and_runtime.ResetTimerValue(processId, timerName)to change and reset timer values outside the process. Use methods_runtime.SetTimerValue(processInstance,timerName,newValue)and_runtime.ResetTimerValue(processInstance, timerName)to change and reset timer values from within your Actions. - Newtonsoft.Json version has been changed from 7.0.1 to 9.0.0.
The following additional actions must be taken to upgrade to Workflow Engine 2.0:
- Replace the link to KineticJS with the link to konva.min.js. Konva.js library is included in the ZIP archive and in
nuget package WorkflowEngine.NET-Designer. - Update Newtonsoft.Json.dll to 9.0.0. The library is included in the ZIP archive and in
nuget package WorkflowEngine.NET-Core. - If you use
implementationofIWorkflowActionProvideryou should add apublic List<string> GetConditions()method to it. It is advisable that theGetActionsreturns only the list of available Actions, whereas theGetConditionsmethod 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 theGetConditionsmethod throws aNotImplementedException. In this case, everything should work as it used to. - IF you use Oracle, you should run an
update_1_5_to_2_0.sqlscript from the Oracle provider ZIP archive or a NuGet package.