到 Google 资讯主页   
EasyJF首页   资料   源码   软件    论坛   网站    
   使用帮助    
    该信息为本站MyRSS系统缓存内容,部分图片及附件有可能无法正常使用.easyjf.comwww.blogjava.net无关,不对该信息负责.通过http://www.blogjava.net/zolly/archive/2007/08/17/generatexml.html访问该信息的原始内容.
页面功能  【加入收藏】 【推荐给朋友】 【字体:  】 【关闭】   
PegaRULES Process Commander(PRPC)
------How to Generate XML
作者:zolly 来源:www.blogjava.net  发布时间:2007-08-21 10:34:59.89

XML is a key technology in PRPC. How to generate the XML which the format you want. You can follow these steps below:

1. Create an instance of Rule-Obj-XML.

This XML rule is the rule which will make up the XML you want. For example:

<?xml version="1.0" encoding="UTF-8"?>
<UIForm>
<FormProperty>
<FormID><pega:reference name = ".FormID" mode="literal" /></FormID>
<FormName><pega:reference name = ".FormName" mode="literal" /></FormName>
</FormProperty>
</UIForm> 

*pega:reference is a common method. Any others please refer to HTML, Directives, and JSP Tags in prhelp.
*Mode=”literal” means that it will delete the XML especial symbol like “&it;”, “&gt;” and so on.

2. Create a model to initialize properties.(Optional)

Model is used to initialize properties. This is an optional step, and you can use Activity’s Property-Set method instead.

3. Create an Activity to call method Property-Set-XML.

The most important of XML generation is method Property-Set-XML in Activity. Example Screenshot:

*XMLGenerated is a local variable defined in Parameter Tab. It is used to save final XML.
*XMLStream and XMLType have presented in XML rule.

Generated XML just like this:

<?xml version="1.0" encoding="UTF-8"?>
<UIForm>
<FormProperty>
<FormID>the value you set for the property .FormID</FormID>
<FormName>the value you set for the property .FormName</FormName>
</FormProperty>
</UIForm> 

Additionally, for ValueList properties, the code in XML like this:

<pega:forEach name = ".StyleLink">
<StyleLink><pega:reference name = "$this" mode="literal" /></StyleLink>
</pega:forEach> 

For PageList properties, you can refer to this code, the precondition is you should use class Code-Pega-List.

<pega:forEach name="XMLStreamListPage.pxResults">
<pega:when test="$THIS.pxObjClass = 'Rule-XUI-Obj-TabStrip'">
<pega:reference name = "$THIS.XMLStream" mode="literal" />
</pega:when>
</pega:forEach> 

Copyright by Zolly in Cognizant.

zolly 2007-08-17 19:17 发表评论

 
相关文章
 
页面功能  【加入收藏】 【推荐给朋友】 【字体:  】 【关闭】   


EasyJF.com 2006 隐私政策 使用EasyJF前必读