Skip to main content

Introducing Formengine - The New Formbuilder, try for FREE formengine.io.

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() and WorkflowDesigner.ediatblemode() methods have been added to WorkflowDesigner object in the client. readonlymode makes Designer uneditable. printablemode 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. editablemode makes 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 the IDesignerAutocompleteProvider interface and by transferring implementation to the WorkflowRuntime object via _runtime.WithDesignerAutocompleteProvider(provider).
  • The GetConditions method has been added to the IWorkflowActionProvider interface. 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 == -1 means that the current transition will not be executed until the respective timer has a defined value. Timer.Value == 0 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 _runtime.NeedTimerValue event.
  • 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 implementation of IWorkflowActionProvider you should add a public List<string> GetConditions() method to it. It is advisable that the GetActions returns only the list of available Actions, whereas the GetConditions 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 GetConditions method throws a NotImplementedException. In this case, everything should work as it used to.
  • IF you use Oracle, you should run an update_1_5_to_2_0.sql script from the Oracle provider ZIP archive or a NuGet package.