February 23, 2017 at 12:48 pm #15990
I have several mappings from “managed/user” to “system/X” and the problem is if one of the mappings fails (because of a foreign key or an atribute contains “ilegal” characters on the resource) the following mappings don’t run and what I want is run all mappings even if one fails.
I’ve seen the compensate.json but it’s not what I want.
I tried to run a script on the behaviors tab in each mapping something like this:
But I can’t catch the error so the other mappings break if one mapping fails if they are after the failed mapping.
So what I’ve decided is set the action to ASYNC to keep running the other mappings but make a openidm.update() and catch it:
//target is not what I expected, target is the same as openidm.read(‘/system/XXX/account/’ + target._id);
openidm.update(‘system/XXX/account/’ + target._id,null,target);
The idea is working as I expected. The problem is that the target object contain only the read object of the resource. It doesn’t have the attributes that are in the mapping.
My question is: How can I transform the target object with the propertties in the mapping?
ThxFebruary 24, 2017 at 11:42 pm #16010Jake FeaselModerator
What version of OpenIDM are you seeing that in?February 27, 2017 at 9:31 am #16020March 2, 2017 at 10:31 am #16090
You must be logged in to reply to this topic.