In a Utility, how do I set a Status that can be tested in the flow?
-
Use a Java step
-
Call History-Add
-
Use the TaskStatus-Add method
-
Use a Transition
The TaskStatus-Add method is the specific API used in utilities to set a status field that can be tested later in the workflow flow. Java steps and Transitions are different workflow constructs, and History-Add is for audit trails, not status testing.
To set a status inside a Utility activity that can later be tested by a Decision or other shape in the flow, you call the status-setting method (referred to here as TaskStatus-Add) on the work object, which records the new status so downstream flow logic can branch on it. A plain Java step or a Transition doesn't persist a status value the flow can query, and History-Add only logs an audit entry rather than setting a testable status.