Find all XML Forms of a Specific Type and Return the XML content.
You can use the E4X module of Javascript to parse XML.
var store = avm.lookupStore('test');
var results = store.luceneSearch('wca\\:parentformname:Press Release');
var pressreleases = new XML();
pressreleases = <pressreleases></pressreleases>
for (var i=0, len=results.length; i<len; i++) {
//do something
}
You can then return the XML using this:
${pressreleases}
IMPORTANT NOTE:
When using in a workflow definition XML, a Javascript ‘//‘ comment style stops following code from executing as linebreaks are removed before processing. Use the ‘/* … /‘ comment format instead.
在工作流定义XML中使用时,因此在处理之前将删除换行符,所以Javascript’//‘注释样式将会停止代码的执行,请改为使用’/。。。*/‘注释格式。
以下内容来自原文链接,没有理解其意思,可能原文有文本缺失,暂时先拷贝过来
Also, the ‘
/* Javascript E4X module has problems with XML header */
if ( str.substr(0,5).indexOf('<?xml') != -1 ) {
positionRootElement = str.indexOf('<', 5);
str = str.substr( positionRootElement, str.length - 1 );
}
One of the ways to escape ‘
bpm_package.children[0].content = '
So, all the text containing ‘
org.mozilla.javascript.EvaluatorException: missing ; before statement (AlfrescoJS#1)
文档更新时间: 2020-02-16 16:47 作者:凌云文档