Using the Form Assignment Handler Flow Behavior
  • 04 Dec 2020
  • 3 Minutes to read
  • Dark
    Light
  This documentation version is deprecated, please click here for the latest version.

Using the Form Assignment Handler Flow Behavior

  • Dark
    Light

Article summary

Overview

Automated actions, such as tagging a Form assignment, can occur at the moment a Form is assigned by utilizing our Form Assignment Handler Flow Behavior.

Example

This example demonstrates how to tag a Form assignment at the time the Form is being assigned. 

In a Designer Folder, select Create Flow from the bottom Action Bar. Select the Default Flow template and click Create, name the Flow then click Create again.


In the Flow Designer, click the orange arrow on the Done path from the Start step. When the Step Catalog window appears, add a Show Form step from the Favorite Steps section.


When the Default Editor window appears, enter a name for the new Form on the left side, then click Create.

Create a simple Approval Form with a Label Form Control and two Button Form Controls, then save and close the Form Designer.

Back in the Flow Designer, connect both paths from the Show Form step to the End step. Click the Show Form step to configure the Properties for this step on the right. Under the Assignment section, change the Assignment Type from InSession to Assigned.

For the Assign To text box, type All Users, then select the option when it appears. The rest of the Assignment information can be mapped to Ignore.



A Flow using the Assignment Handler Flow Behavior is now needed for our Main Flow. This will be a separate Flow.

From the Designer Folder, create a Flow using the Default template called Assignment Handler Flow. 


In the Flow Designer, navigate to the Flow Properties on the right side. Expand the Settings section and use the Behavior Type drop-down to change it from Default Flow Behavior to Form Assignment Handler Flow. 


Click the orange arrow on the Done path from the Start Step and when the Step Catalog window appears, navigate to Integrations > All Integrations > Internal Services > Tagging Service, then add an AddTag step to the Flow. Click the orange arrow on the Done path from the AddTag step and add a Send Notification step from All Steps [Catalog] > Communication.


Connect the outcome from the Send Notification step to the End Step in the Flow. Then, select the AddTag step on the workspace and click Edit on the toolbar that appears. Locate the Inputs section and map them so the objectId field uses the Select From Flow mapping type and map Form_AssignmentId for the Value. For short ObjectType, use Constant mapping type with Assignment as value. For the objectType field, use Constant mapping type with DecisionsFramework.ServiceLayer.Services.Assignments value. For the tag field, choose the desirable value.


Next, select the Send Notification step on the workspace and click Edit on the toolbar that appears. In the Notify To section, add All Users Group to the NotifyGroup box. Then use the desirable values for the Subject and Message fields. For the Message field, use Text Merge.Plain data mapping type in this example.


Configure the Text Editor as shown in the screenshot below. Hover the cursor over the desired data item on the left and click the plus to add that piece of data to the text editor.

2019-07-05_1115.png

This completes the Assignment Handler Flow and it can now be saved and closed. Back in the Designer Folder, locate the Main Flow and click Edit. In the Flow Designer, select the Form Step on the workspace and navigate to the Step Properties. Then, locate the Start section and select the SharedFlow option for Show Flow To Run configuration.

Next, in Flow To Run configuration, use Flow picker to pick our Assignment Handler Flow that was created previously in this tutorial.

This completes the Main Flow. In the Flow Designer, click the Debug button from the top Action Bar of the Flow Designer to test the Flow.


When the test begins, two Notifications popped up. The First notifies the user that a new Form was assigned to them. The Second is a custom one and comes from the Assignment Handler Flow. As designed, it adds a tag to the Assignment and notifies the user that the Tag was added.



Was this article helpful?