How to test method results using a transitionAs an activity executes, the method referenced in each step (implemented in Java) is called and executes. Most methods update the pxMethodStatus property on the pxThread page with a status that starts with one of the values Good:, Warn:, or Fail:. These three values are prefixes to a message key that is looked up as a field value rule.
Optionally, your activities can place additional information about an error or result in the property named pxMethodStatusInfo.
As a sound development practice, test this status prefix against Good in those activity steps that may fail. In the When dialog, reference a when condition rule, and branch or jump to handle the failure.
You can use two standard when conditions named @baseclass.StepStatusGood and @baseclass.StepStatusFail in transitions:
StepStatusFail condition returns True when the status is Fail.StepStatusGood condition returns True when the status is Good.
button on the step row to open the condition pop-up dialog.Good and has a normal gray background. That is, the transition mechanism is intended to allow you to catch previously unhandled Java RuntimeExceptions, not checked exceptions.
|
transition |
|
Activity form — Completing the Steps tab — Entering transitions
Activity-Clear-Status method Activity-Set-Status method How to customize the success and exception windows |