Workflow tasks

In SharePoint 2013, workflow tasks are a key component of workflows, allowing workflows to interact with users to track and satisfy the requirements of a business process. Nintex Workflow 2013 extends the functionality of workflow tasks, by providing several workflow actions that can be incorporated into Nintex workflows to generate various types of workflow tasks. For more information about workflow tasks in Nintex, see the Nintex Workflow 2013 product documentation.

Task types

Nintex Workflow supports several task types, all derived from the NintexTask class in the Nintex.Workflow.HumanApproval namespace:

Workflow approval tasks

Workflow approval tasks are created when a Nintex workflow containing a Request approval action is run. Workflow approval tasks are represented by the ApprovalTask class, in the Nintex.Workflow.HumanApproval namespace.

Workflow review tasks

Workflow review tasks are created when a Nintex workflow containing a Request review action is run. Workflow review tasks are represented by the ReviewTask class, in the Nintex.Workflow.HumanApproval namespace.

Workflow data tasks

Workflow data tasks are created when a Nintex workflow containing a Request data action is run. Workflow data tasks are represented by the CollectDataFromUserTask class, in the Nintex.Workflow.HumanApproval namespace.

Workflow to-do tasks

Workflow to-do tasks are created when a Nintex workflow containing an Assign to-do task action is run. Workflow to-do tasks are represented by the TodoTask class, in the Nintex.Workflow.HumanApproval namespace.

Flexi task tasks

Flexi task tasks, also known as multi-outcome tasks, are created when a Nintex workflow containing an Assign Flexi task action is run. Flexi task tasks are represented by the MultiOutcomeTask class, in the Nintex.Workflow.HumanApproval namespace.

Getting running workflow tasks

Before you can interact with workflow tasks that are assigned to users, you must first retrieve information about those running workflow tasks. You can use the following web service operations to retrieve information about running workflow tasks:

Processing responses for workflow tasks

You can use one of the following service operations to process responses for workflow tasks, depending on the task type:

For more information, see Processing workflow task responses.

Delegating tasks

The task user or an administrator can delegate tasks either interactively, using the Delegate page provided by Nintex Workflow 2013, or programmatically, using one of the following web service operations:

In addition, a workflow can delegate a task by invoking the Delegate workflow task workflow action, allowing workflows to process information and delegate tasks as needed. For more information about using the workflow action, see the Nintex Workflow 2013 product documentation.

Allowing delegation

Tasks cannot be delegated unless the workflow action that creates the task allows delegation. If the task does not allow delegation, only the task owner or an administrator has the rights to approve the task; otherwise, either the task owner or an administrator can delegate the task to another user. To allow delegation, ensure that Allow delegation is selected in the configuration page of the workflow action that generates the task, or set the value of the AllowDelegation property to true for the appropriate workflow action adapter of that workflow action.

Task tokens

A task token is an encoded string that uniquely identifies the combination of an approver, a task item, and the Nintex content database that contains information about the task item. When LazyApproval is enabled, the task token serves as the identification code used in notification emails and OCS/Lync conversations.

The task token is represented by the following string format, where <EncodedValue> represents the variable-length encoded string for the task token:

[#<EncodedValue>#]

Caution: Do not tamper or alter the encoded string in the task token; otherwise, unpredictable results or errors may occur.

You can programmatically obtain task tokens for running workflow tasks by retrieving the value of the TaskToken property from a TaskStub object, returned from either an instantiated TaskStubCollection object in the Nintex.Workflow.Reports namespace, or the results of the GetTaskStubsForCurrentUser service operation.

If you have a task token, you can use the ProcessTaskResponseUsingToken method to process task responses for workflow tasks. For more information about processing task responses, see Processing workflow task responses.

See Also

Concepts

Delegation rules

Workflows

Operations

Working with workflow tasks

Reference

Web Service Reference