"Operation against file 'problem' was aborted by Business Rule 'Transform synchronously^<sys_id>'. Business Rule Stack:Transform synchronously"

Alamelu1
Tera Contributor

Im trying to update the state of the problem record through an import set API transform script. I get an error

"Operation against file 'problem' was aborted by Business Rule 'Transform synchronously^<sys_id>'. Business Rule Stack:Transform synchronously"

How to resolve this?

30 REPLIES 30

Mine is a fresh installation of Orlando. Until before even my instance had values like the one in your screen shot. But, from Madrid onwards, in every fresh installation, the problem has a state management like the change _request record

See attached screenshot. Thats after when I was unable to update the state of the problem through transform script, even after setting 'Run Business Rule' to false.

Hi,

Now i see. Statehandler is in place and when you try to update the state it runs and restricts the updation.

Try to put it to some other state like assess and try once?


Thanks,
Ashutosh

I’ve tried new to assess. Resolved to closed. None of them seem to work.

Hi,

Then there is some issue in script.


Please post the code used to update the state again.

Thanks,
Ashutosh

function runTransformScript(source, map, log, target /*undefined onStart*/ ) {


try {
gs.info("Target record: " + target.sys_id);


var parser = new global.JSON();
var parsed = parser.decode(source.u_event_details);
gs.info("Sys_id" + source.u_snow_id);


if (parsed && Object.keys(parsed).length > 0) {

if (parsed.workflowIndicator == 'Problem') {
var state = parsed.issueDetails["Issue Status"];

if (state === 'ignored') {

target.state = 107;
target.close_notes += 'Event ignored in Source system';
} else if (state === 'resolved') {

target.state = 107;
target.close_notes += 'Event resolved in Source system';
}
}
}


} catch (ex) {
var message = ex.getMessage();
}

})(source, map, log, target);