Bundle Profile Relation Service Synchronizer error

The article contains a script in the last reply.

QueryOptions qo = new QueryOptions();
Iterator it = context.search(Bundle.class, qo);

while(it.hasNext()) {
  Bundle bundle = it.next();
  
  List profiles = bundle.getProfiles();
  
  for (Profile profile : Util.safeIterable(profiles)) {
    List constraints = profile.getConstraints();
    
    for(Filter cons : Util.safeIterable(constraints)) {
      Application app = profile.getApplication();
      if(app != null) {
        Schema accountSchema = app.getAccountSchema();
        
        if(accountSchema != null) {
          if(cons instanceof Filter.LeafFilter) {
            String property = cons.getProperty(); 
            
            Object map = accountSchema.getAttributeMap();
            
            if(map != null && !map.containsKey(property)) {
              returnValue += String.format("%s\n", bundle.getName());
            }
          }
        }
      }
    }
  }
}

return returnValue;

You can create a new rule for this via debug and directly run it via debug.

To easily run this rule you can use the Rule Runner Plugin created by Identity Works LLC.
Download via:

Developer Day presentation on the Rule Runner by Zac:
Identity Works LLC

– Remold

2 Likes