Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info

Maybe we can add some proposed solutions to this below.


Proposed approach(es)solutions:

Solution #Description
1

Add an additional check in PAP to check that the delta policies are a subset of the full list of policies.

In UpdateReq.checkResponse(PdpStatus response): the actualSet of policies is compared to the expectedSet of policies.

This compares the full list of policies sent back in the response against the full list of policies in the PDP_UPDATE message. The proposal here would be to satisfy APEX-PDP sending back the deployed list of policies is to check if the deployed policies are a subset of the full list of policies. 

→ Changing "if (!actualSet.equals(expectedSet))" to "if (!actualSet.conatinsAll(deployedListOfPoliciesInResponseMessage) || !actualSet.equals(expectedSet))". This will satisfy both drools and apex as the full list sent back from drools will be checked as before and the deployedPolicies from APEX will be checked to see if it a subset.

ISSUE: actualSet.containsAll(emptySet) will always return true as an empty set is always a subset of another set. Therefore, if the deployedPolicies list is null - this condition will pass and will result in unexpected behaviors. To overcome this, additional null checks will need to be added to the existing check(s).