If one mapping fails, the others don't run

This topic has 3 replies, 2 voices, and was last updated 5 years, 9 months ago by david_plexus.

  • Author
  • #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:

    var action=’UPDATE’;
    console.log(‘Error: ‘+e);

    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:

    var action=’ASYNC’;
    //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);
    console.log(‘Error ‘+err);

    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?


     Jake Feasel

    What version of OpenIDM are you seeing that in?


    HI @jake-feasel,

    I see this in 4.0 version and also in the 5.0-snapshot that is not actually in the web.

    • This reply was modified 5 years, 9 months ago by david_plexus.

    Hi @jake-feasel,

    I’m trying to create a new topic but when I submit the topic it disappears.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

©2022 ForgeRock - we provide an identity and access platform to secure every online relationship for the enterprise market, educational sector and even entire countries. Click to view our privacy policy and terms of use.

Log in with your credentials

Forgot your details?