onAfter script:
INCIDENT EXAMPLE:
INCIDENT EXAMPLE:
//--Attachments handling:
(function runTransformScript(source, map, log, target /*undefined
onStart*/ ) {
//gs.log('--test attach');
if (source.u_attachments.nil()){
return; // noop
}else{
//gs.log('--test attach 2');
var pspAtt = new
PerspectiumAttachment();
var xmldoc = new XMLDocument(source.u_attachments);
var nodelist = xmldoc.getNodes("//attachment");
if (nodelist == null){
return; // noop
}
for (var ii=0; ii < nodelist.getLength(); ii++) {
var nodeItem = nodelist.item(ii);
pspAtt.addAttachment(nodeItem, "incident", target.sys_id, "msp_client_incident_sent");
}
}
})(source,
map, log,
target);
-------------------------------------------
PROBLEM EXAMPLE:
pspAtt.addAttachment(nodeItem, "problem", target.sys_id, "msp_client_problem_sent");
-------------------------------------------
PROBLEM EXAMPLE:
pspAtt.addAttachment(nodeItem, "problem", target.sys_id, "msp_client_problem_sent");
Comments
Post a Comment