v5.2-v5.5

The migration from version 5.2 to version 5.5 of the product includes the changes from versions 5.3 and 5.4. These updates were released for the Cloud version of the product, and with the release of version 5.5, their changes are included in the OnPremise version of the product.

Migration considerations from Qflow 5.2

Changes in custom forms

Support for anonymous tasks in custom forms

Many of the methods used to invoke actions, such as obtaining the start form of a process, responding to a task, or editing a process, have been changed to asynchronous methods. This means that changes need to be made to the forms that use them to make them work.

Warning

Given these changes, it is important to note that depending on how it is implemented, the methods might not produce compilation errors. Developers creating forms might not notice issues, however, undesired effects may occur if the await instructions are not added where appropriate.

You can see these changes reflected in the controllers section of the custom form design manual.

Support for anonymous/external flow start and task response in custom forms

Now it’s possible to use custom forms for the start or response of external/anonymous tasks. To ensure existing custom forms continue to work with these types of actions, modifications will need to be made to the process start forms and task response forms.

The first thing to do is update the ViewStart file with the necessary changes for these types of forms. This involves adding the condition for the new layout, CustomFormsGuestLayout, to this file. The file should look like this:

{
    if (Qframework.Web.Mvc.SessionManagement.SessionManagerHelper.GetSessionManager<Qflow.Web.Mvc.SessionManagement.QflowSessionManager>().IsGuest)
    {
        Layout = "~/Views/Shared/_CustomFormsGuestLayout.cshtml";
    }
    else if (Request.QueryString["useEmptyLayout"] == null || Request.QueryString["useEmptyLayout"] !="True")
    {
        Layout = "~/Views/Shared/_CustomFormsLayout.cshtml";
    }
    else
    {
        Layout = "~/Views/Shared/_CustomFormsEmptyLayout.cshtml";
    }
}

For both start and response forms, you should include a reference to the Qflow.Mvc.Multitenancy library in their views. You can do this by adding the following line to the list of usings at the beginning of the view file:

@using Qflow.Mvc.Multitenancy

For the views of flow start forms, replace the following:

@using (Html.BeginForm(null, null, new { templateId = Model.TemplateId, useEmptyLayout = Request.QueryString["useEmptyLayout"] },
FormMethod.Post, new { id = "submitForm", enctype = "multipart/form-data" }))

for the following code:

@using (Html.BeginForm(null, null, new { templateId = Model.TemplateId, useEmptyLayout = Request.QueryString["useEmptyLayout"],
tenantId = TenantResolver.GetRequestTenantIdOrDefault() }, FormMethod.Post, new { id = "submitForm", enctype = "multipart/form-data" }))

For the views of task response forms, replace the following:

if (Request.QueryString["DisplayLinks"] == null || bool.Parse(Request.QueryString["DisplayLinks"]))
{
    ViewBag.Links = ModelHelper.GetPageLinks("DisplayTask", Model.FlowId, Guid.Empty, Model.VersionId, Url);
}

for the following code:

var isGuest = Model is GuestTaskModel;
var displayLinks = Request.QueryString["DisplayLinks"] == null || bool.Parse(Request.QueryString["DisplayLinks"]);
if (!isGuest && displayLinks)
{
    ViewBag.Links = ModelHelper.GetPageLinks("DisplayTask", Model.FlowId, Guid.Empty, Model.VersionId, Url);
}

Also, replace:

@using (Html.BeginForm(null, null, new { flowId = Model.FlowId, taskId = Model.FlowStepId,
taskToId = Model.FlowStepToId, useEmptyLayout = Request.QueryString["useEmptyLayout"] }, FormMethod.Post,
new { id = "submitForm", enctype = "multipart/form-data" }))

for the following:

@using (Html.BeginForm(null, null, new { flowId = Model.FlowId, taskId = Model.FlowStepId,
taskToId = Model.FlowStepToId, useEmptyLayout = Request.QueryString["useEmptyLayout"],
tenantId = TenantResolver.GetRequestTenantIdOrDefault() }, FormMethod.Post,
new { id = "submitForm", enctype = "multipart/form-data" }))

For task response forms, we also need to include the QGuest helper in the view as follows:

@Html.QGuest(Request)

Change in “Manage links” permission

Since the “Links” functionality in Qflow Task was removed in version 5.5 and replaced by the “Customize the sidebar menu” functionality, the “Manage links” permission at the installation level was also replaced by the new “Manage the sidebar menu” permission. For environments where the WebForms site is used, this permission will need to be added again so that users can continue using the “Links” functionality on the WebForms site.

Nullable properties of work queue configuration objects

The “ValidFrom” and “ValidTo” properties of the WorkQueueConfiguration objects, which are returned by methods that provide information about organizational nodes in the web services, are now nullable objects. Therefore, users who utilize them need to take this consideration into account.

New system parameters

A series of system parameters were added in this version that change the behavior of Qflow. Each of these parameters should be reviewed to ensure that everything functions correctly. The parameters are:

  • StartFlowAsGuestLink: Specifies the format of the links for starting anonymous/external flows. This parameter is unique per installation and should not be modified to ensure correct functionality.

  • GuestResponseLink: Specifies the format of the links for task responses dispatched to external users. An instance of this parameter is added for each workspace and should not be modified to ensure correct functionality.

Changes in web.config files for sites and backend API

The web.config files for the sites and backend API have changes in their assemblyBinding properties. You can perform a clean installation and review the installed files to see what these properties are.

New configurations have been added that need to be included in the web.config file of the Qflow Task site. These configurations should be added under the configuration/ appSettings section of the file.

  • Table Export Configuration: the following configuration related to table export should be included in the site’s web.config file:”

    <!-- Table export config -->
    <add key="ExportFormats" value="csv,html,excel" />
    <add key="ShowTableExportAsButtons" value="false" />
    

    The property ExportFormats allows us to choose which export formats are permitted for exporting tables. We can remove some of the values if we want to disable the option to export in that format. The property ShowTableExportAsButtons allows us to configure whether the export options are shown as separate actions or grouped in a dropdown list.

  • reCaptcha Configuration for Starting External/Anonymous flows: The following configuration should be included to enable a reCaptcha challenge for starting external/anonymous flows:

    <!-- ReCAPTCHA config -->
    <add key="ReCAPTCHASiteKey" value="" />
    <add key="ReCAPTCHASecretKey" value="" />
    <add key="ReCAPTCHAVerifyUrl" value="https://www.google.com/recaptcha/api/siteverify?secret={{0}}&amp;response={{1}}" />
    <add key="ReCAPTCHARenderUrl" value="https://www.google.com/recaptcha/api.js?onload=onReCaptchaLoad&amp;render=explicit" />
    

    To enable the reCaptcha challenge, we need to fill in the values for the ReCAPTCHASiteKey and ReCAPTCHASecretKey properties. You can read about how to obtain these values here.

The following property is added to the system.config file, found in the installation directory of the Qflow backend services, under the configuration section:

<SecurityProperties>
    <TokenEncryptionPepper></TokenEncryptionPepper>
</SecurityProperties>

What is provided as the value for this property, within the TokenEncryptionPepper node, is added to the secrets before encrypting them, as an extra security measure to make decryption more difficult.