"Operation against file 'problem' was aborted by Business Rule 'Transform synchronously^<sys_id>'. Business Rule Stack:Transform synchronously"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2020 02:23 AM
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?
- Labels:
-
Problem Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-28-2020 04:56 AM
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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-28-2020 05:26 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-28-2020 05:36 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-28-2020 06:21 AM
Hi,
Then there is some issue in script.
Please post the code used to update the state again.
Thanks,
Ashutosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-28-2020 05:49 PM
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);