How to solve Operation against file 'cmdb_rel_ci' was aborted by Business Rule 'Transform synchronously problem?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-10-2016 05:13 PM
I'm sending REST API calls to a web service that is attempting to insert a record into the CI Relationship [cmdb_rel_ci] table. In my dev instance, this works fine. I have everything setup in production that exact same way (web service, transform map, onBefore script, etc). However, when I run this in production, I get the following business rule problem.
Here is a representation of my data that I'm trying to load. The names being the same should NOT be causing the problem as this works in dev and the sys_class_names are different so they are in different tables. That is, I have a linux server called server1 and vm instance with same name. Any ideas would be much appreciated!!!!!
{
"parent" : "server1",
"u_child_sys_class_name" : "cmdb_ci_vmware_instance",
"u_relation_type_name" : "Virtualized by::Virtualizes",
"u_parent_sys_class_name" : "cmdb_ci_linux_server",
"child" : "server1"
}
- Labels:
-
Integrations
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-18-2016 02:15 PM
Hi Todd,
Looking at error logs, it appears that this error occurs when out of box business rule 'Prevent Recursion in CI Relationships' on table 'cmdb_rel_ci' is triggered. This business rule is triggered when record's child and parent have same value. In your request both child and parent contains value 'server1'. I think this business rule is inactive on your dev but active on production, causing behavior to be different on dev vs prod instances.
Thanks,
Pankaj

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-22-2016 09:29 PM
HI Pankaj,
I have plenty of examples where the names are different and the sys_id's are different and I still get this same error message. Here is an example JSON that I sent to the web service I have. I then have an onBefore script that uses this values to lookup both CI's to get sysids as well as the relationship type. I still get this business rule error that doesn't make sense to me. Furthermore, I can create the exact same relationship manually and it works fine. It just gives me this error when pushing it through via REST API. Any help is appreciated. Thanks.
Todd
{
"parent" : "ABCMAX01-2382",
"u_child_sys_class_name" : "cmdb_ci_esx_server",
"u_relation_type_name" : "Provides storage for::Stored on",
"u_parent_sys_class_name" : "cmdb_ci_storage_volume",
"child" : "erxc01171"
}
parent sysid: ca1f6cc513dfa680f415345fd144b03b
child sysid: 4e1f6cc513dfa680f415345fd144b03b
Rel type sysid: 4e1f6cc513dfa680f415345fd144b03b
Again, I can add this exact relationship manually with no problems.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-09-2017 07:45 AM
Hi Todd,
Did you find the solution for this scenario? I am also facing the same exact issue, just its in a transformation script.
Cheers,
Naveen

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-14-2017 11:34 AM
Hi Naveen,
It's been quite a while and I don't recall what was causing this but I think the problem went away. Sorry that I don't have a solid answer for you. Maybe try removing all these relationships for the two types causing the issue and then reload. Thanks.
Todd