Yeah, the ‘addRemoveEntInSingleReq’ flag doesn’t work for our scenario.
Here’s the rule we’ve used for your reference. The issue seems to be that when it comes to access profiles, the system triggers multiple requests based on the entitlement count. However, in our code, a static payload is generated each time, which leads to the error.
In this rule, we’ve processed all attribute requests in a single payload. However, the same payload is being passed for multiple requests. Is there a way to pass individual values into the payload for each request rather than processing and sending them all at once?
Example Scenario:
Let’s consider an access profile that consists of two entitlements: 18:A
and 18:B
.
In our current rule, the payload is generated in the following format:
[
{"roleId": 18, "ProductId": "A"},
{"roleId": 18, "ProductId": "B"}
]
The issue is that this same payload is passed twice since there are two entitlements in the access profile, and this is where the error occurs.
Requirement:
Instead of sending the entire payload twice, we need to process the entitlements individually. For example:
- During the first processing, the payload should be:
[{"roleId": 18, "ProductId": "A"}]
- During the second processing, the payload should be:
[{"roleId": 18, "ProductId": "B"}]
Request:
Is it possible to process the entitlements inside the access profile individually and generate separate payloads for each request? If so, could you suggest an approach for this?