Using OIMService API for raising request

With the latest R2PS2 release OIMService API is been provided to raise any kind of request in OIM. It is a simple yet powerful API with single method which can generate any kind of request.
It uses Android’s Intent concept to let the framework decide what to do at runtime by exposing following method.
OperationResult   doOperation(RequestData requestData,OIMService.Intent intent)
Invoking doOperation method will result into either request creation or direct operation based on the Intent passed.
The intent value can be “ANY“, “REQUEST” or  “DIRECT“.
  • If Intent is “ANY“, operation will result in to either request or direct based on authorization of logged-in user.
  • If Intent is “REQUEST“, a request will be created for the operation.
  • If Intent is “DIRECT“, operation will be performed immediately, subject to authorization of logged-in user.
Very important aspect of using entity key for entitlement is as follows:
If you are working on grant and revoke entitlement request,
Though the rest code remains the same, there is a important attribute needs to be changed while provisioning and deprovisioing entitlement.attribute name is `entityKey`
RequestBeneficiaryEntity requestEntity = new RequestBeneficiaryEntity();
requestEntity.setEntityKey(entityKey); 
which is
entitlement.getEntitlementKey();for Provisioning and
entitlementInstance.getEntitlementInstanceKey()for deprovisioning.

Reference Links: OIMService API

Comments

Popular posts from this blog

Troubleshooting Scheduler plugin in OIM

Creating simple Prepopulate Adapter in OIM