Changes to the wizard-based integration between Workflows and SmartForms

  • 16 February 2021
  • 0 replies
  • 14 views

Userlevel 5
Badge +20
 

Changes to the wizard-based integration between Workflows and SmartForms

KB001855

PRODUCT
K2 Cloud
K2 Five

 

Introduction

Beginning with K2 Appit for SharePoint 1.5 Update 4, the way in which you integrate workflow and forms is different than it used to be where changes to the form happened on workflow deployment. Now, when you integrate a workflow with a form, workflow rules are added to the form immediately upon completing the wizard. This change solves dependency issues during workflow deployment when you change a form that is used in a workflow. If you are familiar with the previous Start and User Task event wizards, you will notice changes to those wizards which are detailed in this article.

The integration between the workflow and the form is also more decoupled, and there is no reference to the form or its settings in the definition of the workflow. These changes allow you to create a formless workflow for use as a sub-workflow, or to design a complete workflow first and then integrate a form at a later point. Generally, with this less dependent integration between workflows and forms, you are able to more easily create and modify workflows that use forms to start and action tasks. 

 

 

New Behavior

The following is a summary of the changes to workflow and form integration:

  • Start event wizard
    • Changes to the pages and options in the wizard
    • A new option is available to create a formless workflow
    • A configuration summary is available at the end of the wizard
  • User Task event wizard
    • Changes to the pages and options in the wizard
    • The configuration and parameter steps are now optional
    • A configuration summary is available at the end of the wizard
  • Form integration changes
    • Dependency removed between the form and the workflow
    • You don’t have to deploy a workflow for updates to the form
 
 
Start Event Wizard

The Start event wizard allows you to start the workflow with a SmartForm. You can instead opt to create a formless workflow for use as a sub-workflow, or manually integrate with a workflow by directly adding workflow rules and actions to the form. Do this by selecting the other (e.g. as a sub-workflow or manually) option in the first step. 

Image

The item reference and form state configuration is located on the Folio and Settings page. When you design a new workflow, the integration is configured on the base state (form integration no longer creates a new form state, but you can configure it to create one if necessary). 

Image

On the Start Form page, you can map form values to workflow data fields.

Image

A summary appears at the end of the wizard detailing the changes that will happen as soon as you click Finish.

Image

See the following Help topic for more information on the Start event wizard:

Start Event Settings

 
 
User Task Event Wizard

In the User Task event wizard, you can optionally configure form parameters (using the Parameters… button) and configure the Workflow View (using the Configure… button). 

Image

A summary appears at the end of the wizard detailing the changes that will happen as soon as you click Finish

Image

See the following Help topic for more information on the User Task event wizard:

SmartForms Task

 
 
Form Integration Changes

Form rules and states update as soon as you click Finish on the Summary page. If you don’t deploy the workflow right away and check the changes by editing the form, the rules indicate that the workflow must be deployed before a valid reference is created.

Image

You have the option to check in the form and related views when deploying the workflow. If you do not select this option, manually check in the form and related views later.

Image

Impact on Existing Solutions and Environments

  • The changes do not affect any existing workflows or forms. You only see changes once you edit the Start and User Task event wizards, or when deploying a workflow that is not deployed before upgrade. In these instances, you are notified of the wizards you need to re-run to synchronize the form with the workflow. 
  • If you have user task activities and the workflow is not deployed before upgrading, run these wizards to synchronize the workflow and form definitions after you upgrade K2. You will see a dialog when editing the workflow that lists the activities that require synchronization.
  • If a form’s default workflow rules are manually extended prior to upgrade, reconfigure these rules manually in the form after upgrading K2. If you run the workflow wizards, a message displays information about the form that needs to be manually updated.
  • If the option use an existing list control to display the actions is selected in the Action Settings of a user task before upgrade, the rule configuration is reserved and the option I will configure the rule actions myself is configured on the workflow so that you can change these to fit your custom logic.  
  • The option use an existing list control to display the actions is removed from the user task wizard. This option is automatically changed to I will configure the rule actions myself when upgrading to the latest release.
  • If you copy and pasted an action in the workflow designer before upgrading, reconfigure the action to apply the changes to the integrated form after upgrading K2. If you don’t reconfigure the action, you see a validation failure message when trying to deploy the workflow.

Recommendations

Use the following best practice principles when working with workflow and form integration:

  • Deploy all workflows and check in all views and forms before upgrading to the latest release.
  • Select the option to check in forms and views when you deploy a workflow.
  • Deploy the workflow when you change the name of an activity. The name change appears in the K2 Designer after the workflow is deployed.

Considerations

  • If you have more than one start workflow rule configured on a form, you cannot edit the start rules using the Start event wizard. You need to use the K2 Designer to edit these start rules.
  • If you cancel the Start or User Task event wizards, an undo check-out is performed on the form and the rules are not automatically added to the form.
  • When cancelling a workflow without saving, all rules injected as part of the Start and User Task event are still present in form rules. These rules are marked with the dependency checker icon (badged) in your form, which you can remove manually.
  • If any views in the form are checked out to someone else, the form is not checked in during deployment. You see a dialog listing the forms that contain checked out views. The same happens if any subviews or subforms are checked out to someone else.

 


0 replies

Be the first to reply!

Reply