GetOutcomesForFlexiTask
Gets the collection of available outcomes that are configured for a Flexi task action in a workflow.
Syntax
public ConfiguredOutcomeCollection GetOutcomesForFlexiTask( int spTaskId, string taskListName )
Parameters
- spTaskId
- Type: System.Int32
Required. The identifier of the list item for the task.
- taskListName
- Type: System.String
Optional. The name of the task list that contains the list item for the task.
Returns
Type: ConfiguredOutcomeCollection
A collection of ConfiguredOutcome objects, each of which represents information about an available outcome for the specified task item.
Remarks
An error occurs if the task list specified in taskListName or the task item specified in spTaskId does not exist. The task list for a Flexi task action in a workflow is not created until the action has been performed at least once.
When specifying an outcome in the ProcessFlexiTaskResponse2 method, use the value of the Name property in a ConfiguredOutcome object from the collection returned by this method to specify the outcome of the task response.
Example
The following example demonstrates how to use this operation to delete a form.
Request
The following SOAP request attempts to retrieve the list of configured outcomes for the task list item with an identifier of 1 in the task list named Workflow Tasks.
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:nin="http://nintex.com"> <soap:Header/> <soap:Body> <nin:GetOutcomesForFlexiTask> <nin:spTaskId>1</nin:spTaskId> <nin:taskListName>Workflow Tasks</nin:taskListName> </nin:GetOutcomesForFlexiTask> </soap:Body> </soap:Envelope>
Response
The following SOAP response returns a collection of three configured outcomes for the task list item, named Approve, Reject, and Consider, all of which allow optional comments.
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <GetOutcomesForFlexiTaskResponse xmlns="http://nintex.com"> <GetOutcomesForFlexiTaskResult> <ConfiguredOutcome Id="1" Name="Approve" CommentsMode="Optional" Description="" BranchIndex="1"/> <ConfiguredOutcome Id="2" Name="Reject" CommentsMode="Optional" Description="" BranchIndex="0"/> <ConfiguredOutcome Id="3" Name="Consider" CommentsMode="Optional" Description="" BranchIndex="2"/> </GetOutcomesForFlexiTaskResult> </GetOutcomesForFlexiTaskResponse> </soap:Body> </soap:Envelope>