You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the documentation, for creating a Policy with a constraint to match if the groups a BPNL is assigned are allowed to fetch the respective catalog, the rightOperand should be something similar to the following
However this implementation does not seem to be working properly, since the expanded value is the one being use for comparison instead of "simplified" values, but only seen when more than one entry in the collection is verified.
To Reproduce
So, using the example above, a BPNL assigned to the groups "some-group-1" and "some-group-2" would not pass the evaluation, however it should.
Simply creating a Policy with above constraint and ensure a testing BPNL is assigned to the aforementioned groups and try to see it pass the validation by requesting the Catalog (after Asset and Contract Definition are created).
Expected behavior
Since the BPNL is assigned to the groups explicit in the Policy constraint, then it should be able to see the full Catalog.
Context Information
After analysis, it is confirmed the match of ["some-group-1", "some-group-2] is done against the next:
Which will always fail since the Strings are different.
This may be due to this inference for a Collection. Here the instance type for the Collection is kept as Generic and the input of a JsonObject invalidates a direct conversion to String.
Important note:
As seen here, the comma-separated single String (instead of Collection) does not seem to be affected by this behaviour.
Possible Implementation
Three possible approaches:
Remove the availability of a Collection input, only allowing the comma-separated (single) String and update the documentation accordingly;
Fix the parsing of the input Collection to avoid the comparison of the expanded Strings. This would be a workaround done in BusinessPartnerGroupFunction to expose a collection with groups and not expanded view. This solution would not prevent expanded view on fetching catalog.
Fix in Upstream the parsing of the rightOperand (in here) to ensure the data consistency throughout.
The text was updated successfully, but these errors were encountered:
Describe the bug
According to the documentation, for creating a Policy with a constraint to match if the groups a BPNL is assigned are allowed to fetch the respective catalog, the
rightOperand
should be something similar to the followingHowever this implementation does not seem to be working properly, since the expanded value is the one being use for comparison instead of "simplified" values, but only seen when more than one entry in the collection is verified.
To Reproduce
So, using the example above, a BPNL assigned to the groups "some-group-1" and "some-group-2" would not pass the evaluation, however it should.
Simply creating a Policy with above constraint and ensure a testing BPNL is assigned to the aforementioned groups and try to see it pass the validation by requesting the Catalog (after Asset and Contract Definition are created).
Expected behavior
Since the BPNL is assigned to the groups explicit in the Policy constraint, then it should be able to see the full Catalog.
Context Information
After analysis, it is confirmed the match of ["some-group-1", "some-group-2] is done against the next:
Which will always fail since the Strings are different.
This may be due to this inference for a Collection. Here the instance type for the Collection is kept as Generic and the input of a JsonObject invalidates a direct conversion to String.
Important note:
As seen here, the comma-separated single String (instead of Collection) does not seem to be affected by this behaviour.
Possible Implementation
Three possible approaches:
The text was updated successfully, but these errors were encountered: