"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-27-2020 04:33 AM
Hi,
do you have onafter transform script which sets the value; if business rule is disabled then that BR should not trigger
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2020 04:40 AM
It is an 'On Before' Transform script which sets the value.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2020 04:45 AM
Hi,
so onBefore sets the state value and Run business rule is disabled;
in your onBefore anywhere you are querying target record and updating it?
Can you share the script here?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2020 05:44 PM
I am just trying to parse the incoming payload and based on certain conditions, im updating the state and closed_notes in the target record
(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);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2020 06:05 AM
Hi,
I would suggest to use field map script. because i think in onBefore script you are trying to update the record and BR is trigger when you try to update the state field.
I can give you 2 advice
1) use setWorkflow(false) in that script
2) use field map script and set value there.
Thanks,
Ashutosh