Description:
This step closes a group of process steps with an “open” or “sleeping” status and returns values as configured in the design.
The Close Task Group workflow step automatically closes active tasks associated with the current workflow instance, based on the configured workflow steps and their return values.
This step allows administrators to define which workflow steps should trigger the closure of related task groups, ensuring that obsolete or no-longer-required tasks are completed automatically.
The step supports:
- Automatic closure of workflow tasks
- Mapping workflow steps to specific return values
- Multiple-step configurations
- Workflow cleanup after branching or parallel execution
- Simplified task lifecycle management
This step can be used for:
- Closing parallel approval tasks
- Cancelling remaining user tasks after a decision
- Completing obsolete work items
- Synchronizing parallel workflow branches
- Workflow cleanup
- Improving user experience by removing unnecessary tasks
Inputs
- stepConfig - Configure one or more workflow steps together with the return value that should trigger automatic task closure. Multiple mappings can be configured to support complex workflow scenarios.
Returns
- True - Step executed successfully.
- False - Step execution failed.
Usage:
The Close Task Group step is typically placed after a workflow decision, approval, or completion point where outstanding tasks should no longer remain active.

The step evaluates the configured workflow step mappings and automatically closes any matching active task groups.
This helps prevent users from completing tasks that are no longer applicable after the workflow has progressed.
Typical scenarios include:
- Parallel approval processes
- Alternate approval paths
- Exception handling
- Early workflow completion
- Cancellation scenarios
Example:
Let’s build and execute the “ClosedTaskGroupDef” example:
- Create a new process definition named “ClosedTaskGroupDef” and open it in designer mode.
- Drag a “Task, RouteForm, and closedTaskGroup” steps to the canvas.
- Connect the dots between the “Start” and other steps as shown above. Select the connection line between “Task 1” and “ClosedTaskGroup” and change the type to “rejected”.
- Click a "Task" step to configure its "Required" properties. Provide a unique name for the step. Note: Click the "AI Predict" button to have the Copilot add new process steps that match your process description.

- Click a "Task" step to configure its "Optional" properties. Select the users to route the task to. Click the Save button. In this example, the task is assigned to the user who creates the process instance using “variable.initiatorID” as a system variable.

- Repeat the “Task” step configuration for the remaining “Task” steps.
- Click the "RouteForm" step to configure its "Required" properties. Provide a name for the step. Select a Form Definition from the drop-down list. Provide a variable or global reference to store the Form Instance ID. Note: Click the "AI Predict" button to have the Copilot add new process steps that match your process description.

- Click the "RouteForm" step to configure its "Optional" properties. Select the users to route the task to. Click the Save button. In this example, the Form task is assigned to the user who creates the process instance using “variable.initiatorID” as a system variable.

- Click the "CloseTaskGroup" step to configure its "Required" properties. Provide a name for the step. Note: Click the "AI Predict" button to have the Copilot add new process steps that match your process description.

- Click the "CloseTaskGroup" step to configure its "Optional" properties. Click the button to configure the steps. A pop-up window is displayed for configuration. Click the “Add Row (+)” button to insert an empty row. Select the step name from the drop-down list. Provide a return value for this step. You can add multiple steps using the “Add Row” button. Click the Save button to finish.

- The “Logging” configuration is necessary for documentation and also measures workflow progress and percent complete. This is achieved by configuring the step state and percent fields individually, as shown below. Configure the “Logging” using the following properties.

- Save the Process Definition. Create a new Process Instance and execute it. Render the process instance. When one of the configured workflow steps reaches the specified return value, the Close Task Group step automatically closes the remaining active tasks in the configured task group. The workflow then continues with the next configured step.

- Navigate to “Items > Tasks” to view the task and its “open” status.

- Navigate to “Engage > Tasks”.

- Select “Task 1” from the list. The task is rendered on the same page. Provide comments and “reject” the task. The workflow continues to execute the “CloseTaskGroup”, the next step in sequence.

- The process step “CloseTaskGroup” is executed, and the set of tasks configured by a group is “closed” as configured. Refresh the task page and select the process instance to view the “closed” task status.

- Also, refresh the process instance page to view the “closed” task status.

Tips:
- Configure only workflow steps that should terminate outstanding tasks.
- Ensure the configured return values match the actual outcomes of workflow steps.
- Use this step after parallel workflow branches to prevent duplicate work.
- Review task dependencies before automatically closing user tasks.
- Test all configured mappings to verify that the correct tasks are closed.
- Combine this step with workflow decisions for cleaner process execution.
Notes:
- The Close Task Group step only closes tasks that belong to the current workflow instance.
- Only configured workflow steps and matching return values trigger automatic task closure.
- Incorrect mappings may leave unnecessary tasks active or close tasks earlier than intended.
- This step simplifies workflow maintenance by eliminating manual cleanup logic.
- Consider using descriptive workflow step names to make task mappings easier to manage.
Definition Sample:
You may download the sample definition(s) from the link provided and later import them into your FlowWright Process Definition (XML file) or Form Definition (HTML file) page.
Note: Verify and complete any missing configuration after importing the sample, including:
- Workflow step mappings
- Return value mappings
- Parallel workflow configuration
- Task assignments
- Environment-specific settings
After verifying the configuration, save the Process Definition before execution.
Click here to download the sample file.