Understanding the Activity-Set-Status method

Use the Activity-Set-Status method to set the execution outcome of an activity. After you run the activity by itself, the status (pxMethodStatus property) of the activity is set to the value that you set in the Severity parameter.

If you are calling an activity from another activity, this method updates the pxMethodStatus property of the calling activity to the severity that you specify. However, processing continues on subsequent steps in the calling activity, even if the status of the activity is set to Fail.
Consider the following scenario:
  • There are two activities: ActivityA and ActivityB.
  • ActivityA has seven steps.
  • On step three, ActivityA calls ActivityB (the Call ActivityB method is configured in this step).
  • The Activity-Set-Status method is configured in a step in ActivityB. The method severity is set to Fail.
    When you run ActivityA, the following steps occur:
    1. Steps one and two are run on ActivityA.
    2. On step three, ActivityA calls ActivityB.
    3. All the steps of ActivityB are run.
    4. After ActivityB has finished running, the status of ActivityA is set to Fail.
    5. Processing resumes on ActivityA at step five and continues through each remaining step.

      Standard processing continues, unless you do a check on the pxMethodStatus property of the pxThread page. A check on the property typically occurs when you are using a transition and one of the three standard when conditions (StepStatusGood, StepStatusFail, or StepStatusWarn).

      For example, in a subsequent step you can use a transition with the StepStatusGood condition that is set to False, to cause the activity to exit at that step. For more information about using transitions, see Testing method results using a transition.