Pega 7 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.
If you are entering XML code directly (Auto-generated XML is not checked) and your workstation has an XML editor, you can set up the open authoring feature to help you compose your XML code. If you don't designate an editor, the system uses Windows Notepad.
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 <
and >
, 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.
When you save an XML stream rule, the system converts your XML text and JSP tags or directives to Java source code. As a learning or debugging aid, you can review this Java code.
Click the Show Java toolbar button to see the system-generated Java code that implements the XML Stream rule. The window presents a read-only preview of the Java that implements this rule instance. This Java code is not identical to the Java that is executed at runtime, which includes Java code inlined from other rule instances and reflects rules in the requestor's ruleset list.
To trace the start and end of XML stream rule executions:
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.
For an example use of the XML form, see PDN article How to create an XML document.