Terminate Workflow Instances

Terminates instances of the specified workflow name on the specified site, with a resulting status of “Terminated.” Associated tasks are unaffected; that is, terminating a workflow instance does not change the status of the tasks that it created.

Note: Workflow instances listed in the Completed Workflows section of the Workflows page cannot be terminated.

You can terminate instances of workflows associated with a site or list item. Associated workflow instances are listed on the Workflows page for the site or item. This action includes an option to preserve workflow instances that have the status “Activity in progress.” Instances listed in the Completed Workflows section of the Workflows page cannot be terminated.

Unlike the action Terminate Current Workflow, this action manages instances of a workflow anywhere within the Office 365 environment.

You can use this action to terminate instances of the specified workflow. For example, when administrating a site, you may want to terminate instances of a workflow that tends to become suspended due to incorrect inputs. In this scenario, you can create a workflow that uses the workflow action Query List to get all list items and to loop through each item; within the loop, you could use this action, selecting the option to not terminate active workflows.

Action settings

Do one of the following to open the Action configuration window:

  • Double-click the action.
  • Click on the action and then click Configure.

See Action configuration window for more information.

Field Description
Destination site URL

URL of the site or site collection containing the workflow instances to be terminated. The URL is tenant-specific.

You can terminate workflow instances on multiple tenants. For example, you can query a list of tenant URLs and pass each tenant URL to an instance of this action, one at a time, using a loop action or other method.

Connection
  • Permissions required: Terminate instances of workflows on the specified site.
  • Connection type required: SharePoint Online: List & library. For more information about Connection types, see Connection types and Connector actions.
Username / Password

(Displayed for legacy actions not yet updated.) Unmanaged credentials.

  • Permissions required: Terminate instances of workflows on the specified site.

Note: As a best practice, manage credentials by updating actions to use connections.

Workflow name

Name of the workflow to terminate. All instances of the workflow with the specified workflow name are terminated, with potential exceptions for Terminate active instances (“No” value).

List item ID

ID or GUID of the item associated with instances of the indicated workflow. Required for workflows associated with document libraries and lists.

To view workflow instances associated with a site or item, access the Workflows page for that site or item. To identify the list item ID, enable the “ID” SharePoint column on the view for the document library or list.

Terminate active instances

Option to terminate instances of the workflow that have the status “Activity in progress.” The value “Yes” terminates instances without checking for this status; “No” preserves instances that have the status “Activity in progress” and terminates others.

Default value: Yes.

To determine if a workflow instance has the status “Activity in progress,” view the Workflow Status page for the workflow instance and then click More Information () to the right of Internal Status. “Activity in progress” is listed in the message box if the workflow instance has that status.

For more information about how to use Lookups in configuration fields, see Lookups in action configuration fields.