Custom filter for synchronization

The following groovy script can be used for selecting multiple accounts for synchronization as a custom filter. With this settings, the synchronization processes accounts with CNT_ID in (942512, 945036, 998516, 945288).

Note that you can't use multiple OR clauses due to a bug in ConnId (, that's why we use NOT AND(NOT EQ, NOT EQ, NOT EQ, NOT EQ) - De Morgan's laws.

import  eu.bcvsolutions.idm.ic.filter.impl.IcFilterBuilder;
import  eu.bcvsolutions.idm.ic.filter.api.IcFilter;
import  eu.bcvsolutions.idm.ic.api.IcAttribute;
import  eu.bcvsolutions.idm.ic.impl.IcAttributeImpl;
return IcFilterBuilder.not( 
    IcFilterBuilder.and (
IcFilterBuilder.not(IcFilterBuilder.equalTo (new IcAttributeImpl("CNT_ID",942512))),
IcFilterBuilder.not(IcFilterBuilder.equalTo (new IcAttributeImpl("CNT_ID",945036))),
IcFilterBuilder.not(IcFilterBuilder.equalTo (new IcAttributeImpl("CNT_ID",998516))),
IcFilterBuilder.not(IcFilterBuilder.equalTo (new IcAttributeImpl("CNT_ID",945288)))

No authorities are needed.

  • by apeterova