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

Variable "context" is not available to mapping transform scripts

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • OpenIDM 5.0.0, OpenIDM 5.5.0, OpenIDM 6.0.0
    • 6.5.0
    • documentation
    • None
    • 1
    • OpenIDM Sprint 6.5-3

    Description

      Variable "context" is supposed to be available to mapping transform scripts, but it is not.

      Reproducible on IDM 5.0.0 and 5.5.0.

      The doc states:
      https://backstage.forgerock.com/docs/idm/5.5/integrators-guide/#script-triggers-sync.json

      transform
      Returns JSON object
      • source: Represents the source object
      • linkQualifier: The link qualifier associated with the current sync operation
      • context: Represents the associated context

       

      But it is missing:

      • example of mapping transform:
                           "transform" : {
                                "type" : "text/javascript",
                                "globals" : { },
                                "source" : "logger.warn('WY - source: = {} ', source);\nlogger.warn('WY - context: = {} ', context);\nsource;"
                            }
      • upon running recon:
        org.forgerock.openidm.sync.SynchronizationException: Transformation script error :  ReferenceError: "context" is not defined. for attribute '/givenName'
             at org.forgerock.openidm.sync.PropertyMapping.apply(PropertyMapping.java:146)
        ...

       

      Attachments

        Issue Links

          Activity

            People

              Mike2 Mike Jang [X] (Inactive)
              wei-yee.lum Wei-Yee Lum
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: