How to pass entitlement2 value in add entitlement 1 operation

Hi Experts,

There is a question in web services connector

There are 2 entitlements in the source.

The access profile will have both the entitlements.

I am building a before operation rule for *add entitlement 1* and I will need the value of entitlement 2 to set certain values in entitlement 1.

Will I be able to pass the entitlement 2 value

Yes, in Web Services connector Before Operation Rule, we can access other entitlement values because the rule receives the complete provisioning plan. As long as both entitlements are part of the same provisioning request, we can read entitlement-2 value from attribute requests and use it to construct payload for entitlement-1

1 Like

Hi,

You should be able to retrieve the value of the whole provisioning plan using something like this in your rule :

import sailpoint.object.ProvisioningPlan;
import sailpoint.object.ProvisioningPlan.AccountRequest;

//Double check the provisioning plan for debugging
if (provisioningPlan != null) {
  for (sailpoint.object.ProvisioningPlan.AccountRequest ar : connector.common.Util.iterate(provisioningPlan.getAccountRequests())) {
    for (sailpoint.object.ProvisioningPlan.AttributeRequest att : connector.common.Util.iterate(ar.getAttributeRequests())) {
      log.info("Plan attr: " + att.getName() + " = " + att.getValue());
    }
  }
} else {
  log.warn("No provisioningPlan in this operation (non-provisioning op?)");
}
1 Like

Thank you !!!

Observation
My test case included the already existing entitlement value for the user hence it was not appearing in the plan.