Assignment/Unassignment of managed object based on relationship

This topic has 0 replies, 1 voice, and was last updated 6 years, 3 months ago by Akshay Date.

  • Author
    Posts
  • #12609
     Akshay Date
    Participant

    Please find below the details regarding our use case:

    1. We have one way (not reverse) relationship between managed objects A & B
    2. What we want to achieve is, when object A is assigned to/unassigned from a user, object B should be assigned to/unassigned from the user implicitly. (Kind of like Role -> Assignment functionality)
    3. This assignment should be limited to OpenIDM only. It should not get reflected to any of the target systems. (Unlike Role -> Assignment functionality)
    4. I tried to implement the same using onUpdate scripts on user object, but they I found out that it’s a known bug that those scripts don’t get triggered for relationship changes in OpenIDM 4.
    5. I tried to implement the same using taskscanner scheduled tasks as well, but it’s not working either. It works only once after changing the flagAttribute to true. (Not sure if my scheduler configuration & database query are correct)

    Configuration:
    “scan” : {
    “_queryId” : “scan-Custom-tasks”,
    “object” : “managed/<Object>”,
    “property” : “/<FlagAttribute>”,
    “condition” : {
    “before” : “true”
    },
    “taskState” : {
    “started” : “/task-started”,
    “completed” : “/task-completed”
    },
    “recovery” : {
    “timeout” : “10m”
    }
    },
    “task” : {
    “script” : {
    “type” : “text/javascript”,
    “file” : “script/<someScript>.js”
    }
    }

    Query: “scan-school-tasks” : “SELECT * FROM ${unquoted:_resource} WHERE ${dotnotation:property} = ${condition.before} SKIP ${unquoted:_pagedResultsOffset} LIMIT ${unquoted:_pageSize}”

    Any ideas on how this can be achieved?

Viewing 1 post (of 1 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?