Connect-Cassandra method

Methods and instructions by function

Use the Connect-Cassandra method to start a request/response interaction between PRPC and the external data store identified by a Connect Cassandra instance.

Parameters

This method operates on a named clipboard page that is the source and destination of data mappings. Make sure the Step Page specified in the activity step that calls this method is set to the appropriate page name.

This method has one required and two optional parameters:

Parameter

Description

ServiceName

Required. Enter the name of the Connect Cassandra instance you want to invoke.

ExecutionMode

Select to indicate the timing of execution:

  • Run — Execute the connector synchronously (default). The next step of the activity containing the Connect-Cassandra method does not execute until the connector response is received.
  • Run in Parallel — This connector runs in parallel as a child requestor of the current requestor. If selected, use the Connect-Wait method later in the current or a follow-on activity to access results from the connector. By default, an invoked connector retains control of the requestor session until it returns a response. Select this parameter if you want the connector to return control of the session directly after completing the request without waiting for a response. If a subsequent connector in the flow has a shape to accomplish, that connector can send its request before the first connector returns a response.
  • Queue — Add this connector request to a queue, defined by a Connect Request Processor data instance, for background processing by the Pega-IntSvcs ProcessConnectQueue agent. This mode works only if the Request Processor field on the Service tab of the service instance identifies a Data-Admin-RequestProcessor-Connect data instance. When the agent executes a queued connector request,  the execution runs with the authorization profile of the original requestor.
EndPointURL

Optional. Specify the URL of an external system to which you want to connect. A value specified for this parameter overrides the value set in the Connectionsettings of the Service tab of the Connect Cassandra rule.

Operation

Select the type of HTTP request:

  • Put
  • Get

Results

The Connect-Cassandra method works as follows:

  1. Using rule resolution, locates the Connect Cassandra instance identified by the ServiceName parameter and the class of the step page or primary page.
  2. Uses request information to assemble the request message.
  3. If the step page does not exist, creates a new page, of the class identified in the Pages & Classes tab.
  4. Checks whether simulation is in force for this instance. If true, results depend on the Execution mode value:
  1. If simulation is not in force, calls the service, or queues the request, depending on the Execution mode value:
  2. Processes the response message when it is received. (No response is available for queued connector requests.)

Checking the method status

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

CautionDesign the activity to detect and handle exceptions. If the Connect-Cassandra method with the RunInParallel check box selected fails in a way that causes the Connect-Wait method to be skipped, the child requestor can fail. If the limit of parallel requestors is then eventually reached, the parent requestor will fail as well. By default, the limit is 10 requestors in parallel; you can establish a higher or lower value in the prconfig.xml file or Dynamic System Settings using the services/maxRequestorChildren setting.

Related topics Connect-Wait method

UpMethods and instructions by function