Create an XML stream rule to define an XML template or skeleton message as part of an interface between the Pega Platform and an external system. You can use XML Stream rules with Connect SOAP, Service SOAP, and Service Email rules, or call them from an activity.
An XML Stream rule has three key parts: a class, a namespace, and an XML type. Typically, the namespace and XML type match the values on the root node in the tree view. However, they are not required to match.
- In the header of Dev Studio, click .
- On the Create page, in the Label field,
enter a name for this XML Stream rule. Choose a name that starts with a letter and contains only letters, numbers, and a hyphen.
- In the XML Type field, enter the literal
MapFromif this XML stream rule is to be referenced in the Response tab of a Service or Connector rule, such as Service SOAP or Connect SOAP.This key part is arbitrary and is referenced primarily when XML text (in one Rule-Obj-XML rule) uses the
<pega:include >JSP tag, which instructs the system to incorporate a second XML stream (where the third key parts must match).
You can use special characters, such as #, &, *, ( ), in this key part. However, as a best practice, begin the name with a letter and follow the rules for a Java identifier.
- In the Context section, in the Apply to
field, select the class of the page that is the basis for stream processing to generate an
XML document from this rule.
The list of available class names depends on the ruleset that you select. Each class can restrict applying rules to an explicit set of rulesets as specified on the Advanced tab of the class form.
- Click Create and open.
Result: The XML Stream rule opens on the Mapping tab.