"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

Hi,

Did you try setting to some other state?

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

If you try target.state = '107';


Thanks,
Ashutosh

I tried the below,

(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 = '106';
target.close_notes += 'Event resolved in Source system';

}

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

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

 

Now again I have started getting the same error 'Operation against file 'problem' was aborted by Business Rule 'Transform synchronously^<sys_id>'. Business Rule Stack:Trasnform synchronously"

in spite of using setWorkflow(false)

HI,


If you are doing it using Before script then you dont need target.setWorkflow(false); as you already set the run BR as false on transform map.

Thanks,
Ashutosh

Agreed. Then I don't understand how the business rule is still getting called.