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.

How to call Web services using queued execution (V5.5)

Updated on August 24, 2021

Summary

 

In order to preserve business data integrity across multiple Process Commander Systems, messages can be sent asynchronously from one system to another. In the case that the receiving system is unable to receive the message, the message can be queued and an attempt to resend can be made at a later time.

Web services invoked while a process is being run will not be able to return a message at that time. Instead, the SOAP Connector Invoke activity maps the outbound data into the list of Java objects that are saved as a parameter on the Parameter Page, and instead of calling the SOAP service calls the RequestProcessor queueConnectRequest method. 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 a scheduled execution by an Agent.

You will need to have a functioning connector in place to use this feature.

 

Suggested Approach

To enable web services queuing, you will need to:

  • Select a Queue
  • Create a Connect Request Processor
  • Edit your Connect rule
  • Edit your connect activity

Select a Queue

You can either use the default queue (System-Queue-ExecutionRequest-Connect-Default) or create a new 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 Application > New > Rule > Integration-Resources > Connect Request Processor. The New Rule Instance Dialog appears.
    Enter the RuleSet Name you would like to save the Request Processor to. This should be the same RuleSet as the Connect rule you are using. Enter a name for the Request Processor.
    Connect Request Processor
  2. On the Queuing Options tab, specify the queue you want to store the queued messages in. Specify the queue you defined above.
    Connect Request Processor
  3. On the Dequeuing Options tab, specify what actions will cause items to be removed from the queue. Save the Request Processor.

Edit the Connect Rule

The connect rule needs to specify that the request must be queued, as opposed to processed immediately. To edit the connect rule:

  1. Open the connect rule you wish to edit.
  2. On the Service tab, in the Processing Options section, select the queuing (response will not be available) option from the Intended for field and specify the Request Processor you created earlier.
    Connect Rule

Edit the Connect Activity

You need to set the connect activity to execute the connect rule in queued mode. To edit the connect activity:

  1. Open the connect activity.
  2. On the step that invokes the web service, set the Execution Mode to Queue.
    Activity
  3. Because queuing connection request is a database operation, you should include a Commit step either:
    • After the Connect-SOAP step in this activity
    • In the parent activity that calls the Connect activity
    Even if the activity does not contain any explicit database operations, without a Commit step, the queue item will not be saved to the database.

Note: Ensurethat the ProcessConnectQueue activity in at least one Agent-Schedule instance for the Pega-IntSvcs agent has been enabled.


 

To test the service:

  1. Run the process that invokes the Web service.
  2. View the instances of the queue class you specified in the Request Processor. You should see one instance.
    Queue
    Note: If you did not configure your Connect Request Processor to keep items in the queue after successful completion, you will not see anything in the queue.

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