WorkflowEngine v1.5.5 Release Notes

  • 🚀 In this release several features have been added to simplify the generation of forms based on commands.

    • The sign IsRequired for command parameter. You can take it into account when generating forms, also it is used in the command validation before the execution of command.
    • 0️⃣ The Default value for command parameter. You can access it using CommandParameter.DefaultValue property, after you have received the list of available commands. You can set all command parameters to default value using WorkflowCommand.SetAllParametersToDefault or WorkflowCommand.SetParameterToDefault functions. The Default value must be a valid JSON (which can be deserialized to type which is specified in the bond Parameter) or will be interpreted as a string.
    • ⚙ An autocomplete was added in the field Type of Parameter (editing window Parameters). It makes a suggestions about types which can be used such as primitive types (Int32, String etc.) or your custom types. Types from assemblies which was registered using _runtime.RegisterAssemblyForCodeActions 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.
    • The Initial values were added for Parameters. You can yse Initial value only for Parameters which have Purpose = Persistence. This values must be a valid JSON (which 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.
    • 0️⃣ The JSON editor was added for edit Parameter.InitialValue (Parameters window), Command.InputParameters.DefaultValue (Commands window), Actor.Value (Actors window), Activity.Implementation.ActionParameter (Activity window), Transition.Condition.ActionParameter (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 json5.js 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.
    • There are two new events was added to WorkflowRuntime. Both are occurred only in normal execution mode (not in pre-execution). BeforeActivityExecution - is occurred after the Runtime has chosen an appropriate transition for execution but before Actions in an Activity were executed. ProcessActivityChanged - is occurred after some Activity was executed. You can use ProcessActivityChanged.TransitionalProcessWasCompleted property to ensure that the command (or timer) execution was finished. Using of these events could be more convenient than ProcessStatusChanged in some cases.
    • GetAllActorsForCommandTransitions(ProcessInstance) method was added to WorkflowRuntime. You can use this method to get next potential approvers for current state.
    • 🔧 You can change the JSON Serializer settings for Parameters deserialization using SetParameterSerializerSettings configuration method.