Form Assignment Handler FlowsLast Updated: 07/21/2016 Introduced in Verision: 2.0
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.
This example demonstrates how to tag Form assignment at the time when the Form is being assigned.
We begin with creating a Main Flow with an Assigned Form. In the Designer Folder we click Create Flow button on the Folders Actions panel.
In the resulting window we Name the Flow and click Create to proceed to the Flow Designer.
In the Flow Designer we add Show Form step from the Favorite Steps category in the Flow Designer Wizard.
Next, we name our Form and click Create to proceed to the Form Designer.
Our Form for this example is designed as following… It has only two Button controls from Actions category in the Toolbox.
When finished, we can save and close Form Designer to return back to the Flow Designer.
Back in the Flow Designer we connect both outcomes from our Form to the End step in our Flow. With Form step selected on the workspace we navigate to the Form setting. We change Assignment Type option from In Session to Assigned.
Because every Assigned Form has to have at least one assignee, we click  Assignment. In the resulting pop up window we add All Users group to the Assign to Groups box. Then we click Done. Then, we can save and close Flow Designer for the Main Flow.
Now, we need to create an Assignment Handler for our Main Flow. In the Designer Folder we click Create Flow to create a new Flow.
In the resulting window we Name the Flow, pick Form Assignment Handler Flow Behavior Type, and click Create to proceed to the Flow Designer.
In the Flow Designer we expand Integrations > All Integrations > Internal Services > Tagging Service and add AddTag step to our Flow.
Next, we expand All Steps [Catalog] > Communications category and add Send Notification step next to our AddTag step.
We connect the outcome from Send Notification step to the End Step in our Flow. Then, we select AddTag step on the workspace and Step Information Layer pops up. We configure data mapping for this step as following… For objectId field we use Select Value mapping type and Form_AssignmentId as a Path for the Value. For shortObjectType we use Constant mapping type with Assignment as value. For the objectType field we use Constant mapping type with DecisionsFramework.ServiceLayer.Services.Assignments value. For the tag field we choose the desirable value.
Next, we select Send Notification step on the workspace and Step Information Layer for this step pops up. In the Notify To section we add All Users Group to the NotifyGroup box. Then we use desirable values for the Subject and Message fields. For the Message field we use Text Merge.Plain data mapping type in this example.
Our Merged Text for the Message field looks as following… It will show Tag and Assignment Url information.
This completes our Assignment Handler Flow. We can Save and close Flow Designer. Back in the Designer Folder we locate a thumbnail for our Main Flow and click Edit.
In the Flow Designer we select our Form Step on the workspace and navigate to the Step Configurations.
Then, we locate Start section and select SharedFlow option for Show Flow To Run configuration.
Next, in Flow To Run configuration we use Flow picker to pick our Assignment Handler Flow that we have created previously in this tutorial.
This completes our Main Flow.
In the Flow Designer we can click Debug Flow link from the top panel of the Flow Designer to test our Flow.
Note that in Decisions version 3.5 and above, you will need to click Test Flow rather than Debug Flow.
Our Assigned Form opens in the Debugger and we can see that two Notifications popped up. The First notifies us that new Form was assigned to us. The Second is a custom one and comes from the Assignment Handler Flow. As designed, it adds a tag to the Assignment and notifies us that the Tag was added.
Back in the Portal we can verify that our Tag is added to the Assignment and is available in the System.