Handling Tasks In MassLast Updated: 07/15/2016 Introduced in Verision: 2.0 |
What do you do when you have a lot of tasks in your queue and you have to work them 1 by 1? This is the typical situation in a workflow environment where a certain level of approval has to go to a specific person or group in an organization. For example: in your company it’s possible that all major expenditures get reviewed by a group at a standing meeting once a month where they review all like requests. In Decisions all of the pending approvals are sitting in the task lists of the members of the group, and to perform each approval the users of the group would have to go to each task and click the response link to get the approval form to show up so that they can record their decision.
If you want to be able to work tasks one after another, in a more efficient way, there is a Form control that you can use: FlowRunContainer.
This form control takes an assignment ID which must be an assignment in the database. You can get these assignment IDs from a report, a flow, or any other flow step.
Let’s start with a process that is built in another article http://decdocs3x.wpengine.com/assigning-form-interactions-as-tasks/.
Once the initial task flow has been created, it is necessary to create a second flow to call and handle the tasks needing approval.
Example
The goal of this example is to:
1. Create a flow.
2. Create a form in the flow that has a FlowRunContainer.
3. Create a report that filters the tasks requiring approval.
4. Run the newly created report in the flow.
5. Run the flow and verify it works as designed.
To begin, navigate to a Designer Project Folder and click the Create Flow button.
In the resulting New Flow pop-up window, name the flow and click Ok.
In the new flow, in the Flow Designer start-up window, expand the Flows, Rules, Forms and Reports > Forms[Interaction] category, and select a [Pick or Create Form] element. Click Add to place it into the flow.
Right click on the new flow step and select Pick or Create Flow from the action menu.
In the resulting New Form pop-up window, name the form and click Ok.
In the newly created form, click on the Explorer tab and select Surface.
in the Properties panel above, change the Container type to Grid in the Layout section.
In the Toolbox panel, expand the Advanced category and drag a Flow Run Container element into the form workspace.
In the Properties panel, configure the Data section with the Assignment ID Data Name and the Buttons to be seen on the on the form.
The form is now complete. Save and close the Form Designer.
Now that the flow and form are created, it is time to create the report that will contain the task list. Save the flow and close the Flow Designer.
In the Designer Project Folder, select the Create Report button, then Create Report.
In the resulting New Report pop-up window, name the report and click Ok,
Expand the category Data Sources > Common and drag an Assignment Data Source element into the Sources list.
Next, expand the Data Filters > Assignment Filters category and drag a Current element into the Filters list. This will give a list of all the tasks not in a completed state regardless of user. Additional filtering could be applied to narrow down the scope of the assignments shown in the report.
Now, expand the Assignment Data Source category and select the columns that will be included in the report. For this example, Assignment ID, Entity Name, Created By, and Created On Date have been selected.
The report is now complete. Save it and close the Report Designer.
Next, edit the flow that was created earlier. To do this, click on the Edit link on the flow’s thumbnail.
In the Toolbox tab, expand the Integration > Reporting > [Current Folder] > Report: Wrapper Report category, then drag a Run Report element into the flow.
Next, connect all of the flow steps. The example pictured has paths going to both the end step and back to the report. The Approve and Skip paths are intended to continue the working of the task list, therefore they do not go to the end of the flow.
Now, configure the input for the Wrapper Form. To do this, select the form and click on the Show Mapping Editor link at the top of the Properties tab.
In the mapping editor, expand the Wrapper Report category, then expand the First category and connect the Assignment ID element to the Things To Approve element. Once the connection is made, click Ok.
This flow is now ready to run. Save and close the Flow Designer.
To verify there are task awaiting approval, click on My Home and view the list of tasks.
Back in the Designer Project Folder, select Run Flow from the Actions menu on the thumbnail.
When the flow executes, it opens with the first task displayed.
The user is able to review the information relating to the task and chose to Approve, or Skip the task. The user can also choose to Close the flow. If the user chooses to Approve or Skip the current task, the appropriate action will be taken and the next task will be displayed.