Uploaded image for project: 'OpenIDM'
  1. OpenIDM
  2. OPENIDM-5887

SyncResult always specifies default situation action and not the actual action determined during synchronization

    Details

      Description

      The syncResult returned during synchronization operations always lists the situation action as the default for the current situation and NOT the actual action which was determined.

      For example:

      syncResult = (org.forgerock.json.fluent.JsonValue) { "oldTargetValue": null, "reconId": "84ea20ed-50fd-4b2b-b8a4-7f5bd9be8ccf", "action": "DELETE", "targetId": "uid=bjensen,ou=Customers,dc=example,dc=com", "mapping": "managedUser_systemLdapAccounts", "situation": "UNQUALIFIED", "sourceId": "60854e2c-a2e2-4de5-be5a-930f758c1863" }
      

      With the following situation policy:

                      {
                          "situation" : "UNQUALIFIED",
                          "action" : "IGNORE"
                      }
      

      Note that in the above action == DELETE and not IGNORE as was specified in the policy.

      The offending code is the following:

              public JsonValue toJsonValue() throws SynchronizationException {
                  return json(object(
                          field("reconId", reconId),
                          field("mapping", ObjectMapping.this.getName()),
                          field("situation", situation.name()),
                          field("action", situation.getDefaultAction().name()),
                          field("target", "true"),
                          field("oldSource", getSourceObject()),
                          field("linkQualifier", linkObject.linkQualifier),
                          (targetObjectAccessor != null && targetObjectAccessor.getLocalId() != null) 
                              ? field("targetId", targetObjectAccessor.getLocalId()) 
                              : null)); 
              }
      

        Attachments

          Activity

            People

            • Assignee:
              cgdrake Chris Drake
              Reporter:
              cgdrake Chris Drake
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: