Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

To execute multiple strategies in parallel from an activity



Procedure to execute multiple strategies in parallel from an activity. At this moment, execution time is too high and that must be reduced. Hence, the requirement to run two strategies in parallel.


The explanation for this behavior is as follows:
You must note that there is no issue running strategies in parallel as long as the external resources are referenced by the strategy also run in parallel.
Strategies are invoked from Activities using an Interaction rule. Run the activities in parallel using the following API calls:
  •         tools.getRequestor().queueBatchActivity(…) -> to start new thread
  •         tools.getRequestor().waitOnBatchActivity(…) -> wait for the thread to finish

You can store the thread returned by queueBatchActivity in a list and afterwards loop through the list.
Call waitOnBatchActivity to wait on them and join back on the main thread.



Published January 31, 2016 - Updated October 8, 2020

Was this useful?

100% found this useful

Have a question? Get answers now.

Visit the Collaboration 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 Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us