Skip to main content


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

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.

Calling web services using queued execution

Updated on September 10, 2021

To preserve business data integrity across multiple Pega 7 Platform instances, messages can be sent asynchronously from one system to another. If the receiving system is unable to receive the message, the message can be queued until it can be resent later.

While a process is running, invoked web services cannot return a message. Instead, the SOAP Connector Invoke activity maps the outbound data to the list of Java objects that are saved as a parameter on the parameter page. The connect activity calls the RequestProcessor queueConnectRequest method instead of calling the SOAP service. This method creates a queue item instance in the PegaRULES database, saves the primary page, parameter page, and dequeuing options to it, and sets the status to “scheduled” for an agent to resend the message.

You must have a functioning connector to use this feature.

Suggested approach

To enable web services queuing, do the following tasks:

Select a queue

You can either use the default queue (System-Queue-ExecutionRequest-Connect-Default) or create a queue by defining a new concrete class within the System-Queue-ExecutionRequest-Connect- class.

Create a connect request processor

The connect request processor defines the queue location and dequeuing options for the queued connection. To define a new connect request processor:

  1. Click Create > Integration-Resources > Connect Request Processor.
  2. On the New Rule Instance tab, enter a short description in the Short Description field of the connect request processor.
  3. In the RuleSet field, enter the ruleset name that you want to save the connect request processor to. The ruleset name must be the same name as the Connect rule that you are using.
  4. In the Request processor field, enter the connect request processor name.
  5. On the Queuing Options tab, enter the queue class name in the Queue class name field to specify the queue that you want to store the queued messages in.
  6. On the Dequeuing Options tab, specify what actions cause items to be removed from the queue.
  7. Click Save to save the connect request processor.

Edit the connect rule

The connect rule needs to specify that the request must be queued instead of processed immediately. To edit the connect rule:

  1. Open the connect rule.
  2. On the Service tab, in the Processing options section, select the queuing (response will not be available) option from the Intended for field.
  3. In the Request processor field, enter the request processor that you created earlier.

Edit the connect activity

Set the connect activity to run the connect rule in queued mode. To edit the connect activity:

  1. Open the connect activity.
  2. Expand the step that runs the web service.
  3. In the form for the ExecutionMode field, select Queue.
  4. Because queuing a connection request is a database operation, include a Commit step in one of the following ways:
  • After the web service invocation step in this activity
  • In the parent activity that calls the connect activity
Even if the activity does not contain any explicit database operations, you cannot save the queue to the database without a Commit step.

Test the web service

You can test the web service process to ensure that all the connections work correctly.

  1. Run the process that invokes the web service.
  2. View the instances of the queue class that you specified in the connect request processor. The Instances dialog box shows the instance and its status.Instances dialog box that shows when an instance was created and its status.

    Instances dialog box

    If you do not configure your connect request processor to keep items in the queue after successful completion, queue instances with a success status are not displayed.

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