Skip to main content


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

Wait method

Updated on August 16, 2022

Use this method to pause a thread for a specified time interval. This method causes the current thread to wait a specified time interval (at least) before continuing with activity processing. (This method performs a Java sleep().)

Use this method only when truly necessary and for short intervals, as system resources are consumed during the wait. Do not create activities that may loop indefinitely on a wait condition.

Parameters

The Wait method has two optional parameters. Enter a value for at least one of them. If you specify both parameters, the system adds the two parameters together so the resulting wait interval is WaitSeconds plus WaitMillSeconds.

ParameterDescription
WaitSecondsEnter a length of time to wait in seconds as an integer value, or a numeric expression or property reference.
WaitMillSecondsEnter a length of time to wait in milliseconds as an integer value from 0 to 999, or a numeric expression or property reference.

Results

This method causes both the system and the client to wait for the specified number of seconds and milliseconds.

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.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us