转换脚本status_message不在servicenow的SOAP响应主体中更新

时间:2017-09-08 10:20:41

标签: servicenow

我创建了一个onBefore转换脚本。

(function runTransformScript(source, map, log, target /*undefined onStart*/ ) {
    if(source.u_incident.nil()){
        status_message="The Record is not inerted";
        error_message="ERR001 Cell number can't be empty!";
        ignore = true;
    } 
})(source, map, log, target);

我从SOAP UI发送请求,如果u_incident值为空,则不会像我们提到的ignore=true那样创建新的请求,但在SOAP响应正文中我没有得到status_message 1}}和error_message正如预期的那样,默认消息即将到来。

1 个答案:

答案 0 :(得分:0)

(function runTransformScript(source, map, log, target /*undefined onStart*/ ) {
    if(source.u_incident.nil()){
        response.status_message="The Record is not inerted";
        response.error_message="ERR001 Cell number can't be empty!";
        ignore = true;
    } 
})(source, map, log, target);