diff --git a/filter_ownership.aql b/filter_ownership.aql index 53ce8aa..cb48ebb 100644 --- a/filter_ownership.aql +++ b/filter_ownership.aql @@ -2,11 +2,11 @@ let meta = node.meta let owner = meta.owners let found = ( for o in owner - filter o.id == "urn:restorecommerce:acs:names:ownerIndicatoryEntity" && o.value == @entity - let nestedAttributes = o.attributes - for ownerInst in nestedAttributes - filter ownerInst.id == "urn:restorecommerce:acs:names:ownerInstance" && ownerInst.value in @instance - return true + for arg in @customArguments + filter o.id == "urn:restorecommerce:acs:names:ownerIndicatoryEntity" && o.value == arg.entity + let nestedAttributes = o.attributes + for ownerInst in nestedAttributes + filter ownerInst.id == "urn:restorecommerce:acs:names:ownerInstance" && ownerInst.value in arg.instance + return true ) filter true in found -