More about XML Stream rules

Results

Pega Platform does not check whether a document produced from applying an XML stream rule is well-formed, nor does it validate the document against a DTD or XSDL.

Accordingly, the document may contain simple text, and not contain angle bracket characters (< >) or other XML syntax. For example, you can create and write out a text file using an XML Stream rule, the Property-Set-XML method, and the WriteFileOutput() function.

XML editor

To include the value of a property, use the <pega:reference > JSP tag. In most cases, include the normal mode in each reference JSP tag. For example:

<pega:reference name="pyWorkpage.pyStatusWork" mode="normal" />

This causes stream processing to replace any < and > characters that may appear the corresponding entities &lt; and &gt;, and (unlike the default display mode) does not add a space before and after the property value.

If the property value contains XML markup, use the literal directive:

{literal TheXMLdoc }

or the equivalent literal mode for the reference tag:

<pega:reference name=".TheXMLdoc" mode="literal" />

These suppress stream processing of the value.

You can use other JSP tags (such as include, Java, and foreach) within the XML text. Processing of JSP tags in XML is identical to JSP tags in HTML.

Viewing the Java code of a rule

Click Actions > View Java to view the generated Java of a rule. You can use the Java code to debug your application or to examine how rules are implemented.

Using the Tracer

To trace the start and end of XML stream rule executions:

  1. Open the Tracer.
  2. Click Settings to open the Tracer Settings panel.
  3. Under the Rule Types to Trace section, select the Stream Rules check box.

Parent class

The Rule-Obj-XML class is not derived from the Rule-Obj- abstract class. The immediate parent class of the Rule-Obj-XML class is the Rule-Stream class.

Example

For an example use of the XML form, see PDN article How to create an XML document.