Skip to main content


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

Connect-Wait method

Updated on August 16, 2022

Use the Connect-Wait method

  • to join the current requestor session with a parallel connector requestor session created previously. Any of the four RDB- methods or eight Connect- methods can operate in parallel.
  • with the Load-DataPage method. Load-DataPage uses the PoolID property to group requestors loading data as part of the same activity. Connect-Wait lets processing wait for the stated timeout interval, or until all requestors with the same PoolID have finished loading data.

Parameters

This method accepts two parameters:

ParameterDescription
WaitSecondsEnter a positive number of seconds as a timeout interval, or enter -1 to cause an indefinite wait.
PoolID PoolID is an arbitrary identifier used in the activity methods Load-DataPage and Call-Async-Activity to help manage asynchronous data loading. Provide a value when using Connect-Wait in an activity of type Asynchronous. PoolID can be any valid String, a property reference, or a parameter.

PoolID exists in the context of the activity using it, so you can have identical PoolID values in different activities without causing a problem.

Results

  1. WaitSeconds has a value and PoolID has a value: Wait for child requestors to finish (if any) and then wait for data pages which belong to PoolID to finish loading. The entire operation has a timeout of the specified WaitSeconds.
  2. WaitSeconds has no value and PoolID has a value: Wait for child requestors to finish (if any) and then wait for data pages which belong to PoolID to finish loading. The entire operation has a timeout of indefinite.
  3. WaitSeconds has a value and PoolID has no value: Wait for child requestors to finish (if any). The entire operation has a timeout of specified WaitSeconds.
  4. WaitSeconds has no value and PoolID has no value: Wait for child requestors to finish (if any). The entire operation has a timeout of indefinite.

When awakened, if the method status is Good, the activity can examine the results pages of the connector methods. If the method status is Fail, this may indicate that one or more of the parallel child requestors has not completed.

The Connect-Wait method sets the method status to Good or Fail even if you simulate the connector rule through a Connector Simulation data instance.

Checking the method status

This method updates the pxMethodStatus property. See How to test method results using a transition.

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