Share all details related to your problem, including any error messages you may have received.
Hello
We are removing some entitlements based on inactivity. We’re doing this here:
AttributeRequest attrReqIIQ=new AttributeRequest(“assignedRoles”,ProvisioningPlan.Operation.Remove, entName);
This is in a scheduled task that we run. The tasks checks the last login date and removes entitlements if the last login date is greater than a certain date.
I think we can do, you should pass identityRequest Number and play with it
IdentityRequest ir = new IdentityRequest();
ir = context.getObjectByName(IdentityRequest.class, idRNum);
Here you will get the object, now u can create IdentityRequestItem or and save in IR,
Like example
``
IdentityRequest YOURIR = new IdentityRequest();
YOURIR = context.getObjectByName(IdentityRequest.class, idRNum);
IdentityRequestItem IRI = new IdentityRequestItem();
IRI.setApplication(appName);
IRI.setName("Your IRII Name");
IRI.setOperation("IRIType");
IRI.setValue(YourGroupName);
IRI.setProvisioningState(ApprovalItem.ProvisioningState.valueOf("Finished"));
IRI.setApprovalState(WorkItem.State.valueOf("Finished"));
YOURIR.add(IRI);
context.saveObject(YOURIR);
context.commitTransaction();
This is just code sample. but you will get idea how you can achieve it.