Manually Re-Trigger Access Request Workflow For The Corrupted Access Request

Hi Everyone,
We are facing some issues for Access request, So sometimes when the user submit the access request it gets corrupted like it doesnt go for approval at all and end there itself or sometimes it goes for approval then it corrupts.

Any idea, if I can re-trigger the access request workflow via the rule for the corrupted request?
We are using IIQ version 8.3P3.

Any help would be highly appreciated.

Hi Saloni,

What exactly do you mean by corrupts? Also can you check the logs and see some details for the objects in debug page for those access requests?

1 Like

Hi @saloniGupta ,

Ideally you should not be creating identity request by yourself. If it is failing, then you should re-request for the same. Also, if possible, please let us know the reason or share the logs which is causing request corruption.

But for the sake of use-case please find the below sample snippet by which you can create a new request from rule.

import sailpoint.api.RequestManager;
import sailpoint.object.Attributes;
import sailpoint.object.Identity;
import sailpoint.object.Request;
import sailpoint.object.RequestDefinition;
import sailpoint.object.Workflow;
import sailpont.tools.Util;
...

Map argsMap = new HashMap();
argsMap.put("identityName",identityName);
argsMap.put("plan", plan);
argsMap.put("launcher", "spadmin");
argsMap.put("notificationScheme", "none");
argsMap.put("approvalScheme", "none");

Workflow wf = (Workflow) context.getObjectByName(Workflow.class, "My WF");
					
RequestDefinition reqDef = context.getObjectByName(RequestDefinition.class, "Workflow Request");
Request req = new Request();
req.setDefinition(reqDef);
Attributes allArgs = new Attributes();
allArgs.put("workflow", "My WF");
allArgs.put("requestName", "Launched WF From Rule");
allArgs.putAll(argsMap);
req.setAttributes(reqDef, allArgs);

//Delay the launch by 5 minutes
Date launchDate = Util.incrementDateByMinutes(new Date(), 5);				
req.setEventDate(launchDate);
Identity id = context.getObjectByName(Identity.class, "spadmin");
req.setOwner(id);
req.setName("Launched WF From Rule");
					
//Launch the workflow
RequestManager.addRequest(context, req);
context.decache(reqDef);
context.decache(id);

Thanks

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.