Which IIQ version are you inquiring about?
8.4P2
Please share any images or screenshots, if relevant.
[Please insert images here, otherwise delete this section]
Please share any other relevant files that may be required (for example, logs).
[Please insert files here, otherwise delete this section]
Share all details about your problem, including any error messages you may have received.
Team,
We have a requirement where we need to auto approve the remove request workitems on 10th day (We are also sending 3 reminder mails to the owners without any escalation process.), if the owner doesnât take any action on it.
current process, the workitems are getting expired on 10th day. Any suggestions how can we achieve this case?
You will have to approve the approvalitems using api through interceptor code.
Hi @harishabn ,
You can create a Scheduled Rule that runs daily and performs the following:
- Queries all pending Remove access approval work items.
- Checks if theyâve been open for 10 days (based on
created
timestamp).
- Programmatically executes approval (
WorkItem.setOutcome("Approve")
) and routes completion.
Sample Logic (Rule Skeleton)
import sailpoint.object.Filter;
import sailpoint.object.WorkItem;
import sailpoint.api.Workflower;
import java.util.Date;
import java.util.List;
import java.util.Calendar;
Calendar cal = Calendar.getInstance();
cal.add(Calendar.DAY_OF_YEAR, -10);
Date cutoff = cal.getTime();
// Filter all pending work items older than 10 days
Filter filter = Filter.and(
Filter.eq("state", "Pending"),
Filter.le("created", cutoff)
);
List workItems = context.getObjects(WorkItem.class, filter);
Workflower workflower = new Workflower(context);
for (WorkItem item : workItems) {
if ("Remove".equalsIgnoreCase(item.getType())) {
log.info("Auto-approving stale remove request: " + item.getName());
item.setOutcome("Approve");
workflower.completeWorkItem(item);
}
}
Make sure you add filtering to only process the work items you care about, like LCM Remove Approval, and avoid escalation or exception queues if configured.
Hope this helps!
Let me know if you have any questions.
1 Like