You are here: Reference > Activity methods > TaskStatus-Set

TaskStatus-Set method

Use this method in activities with an Activity Type of Utility that return a value that a flow rule can examine to make decisions. The system can test the output of this method to determine which connector to take.

For example, a utility named Direction could analyze geographic information and return one of four values, North, South, East,. and West. Four connector lines leading from this utility shape in the flow diagram can correspond to these four values.

Do not confuse the output of this method (the property Code-Pega-Thread.pxTaskStatus on the pxThread page, returned to a flow, to be tested by connectors) with the method status (a property on the pxResults page indicating whether method execution was successful). All but a few methods set the method status.

The value you set through this method remains until the next execution of the TaskStatus-Set, or a decision shape is processed, or the user completes a flow action. Advancing to another utility shape or testing the value does not clear the value.

Parameters

This method has two parameters:

Parameter

Description

TaskStatus Enter a literal text value to be returned to in the flow instance following the activity. The system sets this value in the pxTaskStatus property.
TaskStatusInfo Optional. Enter a short explanation for the status.

Results

This method sets the text value supplied in the TaskStatus parameter into the pxTaskStatus property on the pxThread page. This property value is arbitrary and unedited. The flow can examine this value to make a decision.

Also, this method sets the text value supplied in the TaskStatusInfo parameter into the pxTaskStatusInfo property.

Checking the method status

This method updates the pxMethodStatus property. See How to test method results using a transition.

Methods and instructions by function