Connect EJB form – Completing the Remote tab

Use the Remote tab to specify the data values that the remote system passes as input parameters to the remote method of the EJB client stub. The Pega Platform maps the data from the clipboard to parameter values of the remote method.

Note: Connect EJB rules are no longer being actively developed, and are being considered for deprecation in upcoming releases. Using Connect EJB rules does not follow Pega development best practices. Consider other implementation options instead.

Completed the data fields of the Service tab first. The list of parameters and their data types are automatically filled in on this tab.

Parameters

Field Description
Data type This column contains the external Java data type of each parameter of the remote method. Both primitive Java types ( int, boolean, char, String, and so on) and arrays of primitive types are supported.
Map from Select how the system creates the request parameter values. The choice you make for this field depends on the Data Type:
  • Clipboard — The system maps the data value to the scalar property specified by the Map from key.
  • Constant — The system sends a fixed value.
  • HTML Stream — The system composes a stream of HTML text formatted according to an HTML rule.

If more choices appear, they identify a custom function rule in a MapFrom library. Review the function rule to determine what it does.

Map from key Enter a source for the Map from value:
  • If you map from Clipboard, enter the property name from which the data is to be mapped.
  • If you map from Constant, enter a literal text string. To include blank spaces in your text string surround the string with double quotes.
  • If you map from HTML Stream, enter the Stream Name key part of HTML rule that is to generate the data stream. The system uses the Applies To class of this Connect EJB rule as the Applies To class of the HTML rule.
  • If you map from Rule-Utility-Function from a MapFrom library, either select the property that holds the value to be processed by the function or leave this field blank, as appropriate for the function.

Return value

Field Description
Data type This field contains the external Java data type of the return value, or void. Both primitive Java types ( int, boolean, char, String, and so on) and arrays of primitive types are supported.

You can map complex return values. For example, the return value may have data type:

com.sun.j2ee.blueprints.shoppingcart.cart.model.ShoppingCartModel
Map to Select how the system creates the response parameter values. The choice you make for this field depends on the Data Type:
  • Clipboard — The system maps the data value from the scalar property specified by the Map to key.
  • XML ParseRule — Indicates that the incoming data value is a stream of XML that can be parsed using the data mappings specified in a rule of the Rule-Parse-XML rule type.
  • HTML PostData — Indicates that the incoming data value is a stream of data posted from an HTML form that contains property key/value pairs.

If more choices appear, they identify a custom function rule in a MapTo library. Review the function rule to determine what it does.

Map to key
  • If you map to Clipboard, enter the name of the property name to map the data to.
  • If you map to XML Parse Rule, enter the Namespace name (second key part) and the Element Name name — third key part — of the appropriate Parse XML rule. Separate the Namespace from the Element name with a space; use the syntax "NamespaceName ElementName". The system uses the Applies To class of this connector rule as the first key part of the parse rule.
    Note: To maintain backward compatibility for connector rules created in releases before PRPC 5.2, you can specify a data mapping with only a Namespace value. In that case, the system at runtime determines the Element Name key from the root element of the incoming XML document. However, this mapping works only if the Parser Type of the Parse XML rule is set to DOM and validation is not enabled. As a best practice, specify both the Namespace Name and the Element Name of the rule.
  • If you map to HTML PostData, leave this field blank.