Skip to main content

         This documentation site is for previous versions. Visit our new documentation site for current releases.      

TaskStatus-Set method

Updated on August 10, 2022

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.


This method has two parameters:

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.
TaskStatusInfoOptional. Enter a short explanation for the status.


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

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best. is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us