Enabling approvals in Workflow-FrameWork-Wrapper

Which IIQ version are you inquiring about?

[8.4p1]

Please share any images or screenshots, if relevant.

[


]

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.

*[Could someone guide me who to enable approvals if I wanted to call Workflow-FrameWork-Wrapper in using a script/API. I tried setting up requiredApprovalTypes variable in both ways but did not help. Everything works fine when I use OOTB Manage Access quick link to request the access and the same workflow is mapped in my Lifecycle Manager manage Access Request config. Attached the screenshot above. Could you please guide me if I need to pass any other additional variables to enable the approval when called from a script (in a Workflow step)

#Approach 1
List approvalTypes = new ArrayList();
approvalTypes.add(“ManagerOrServiceAccountOwner”);
approvalTypes.add(“ApplicationBusApprovers”);
launchArgsMap.put(“requiredApprovalTypes”,approvalTypes);
launchArgsMap.put(“bypassApprovals”,“false”);

#Approach 2
launchArgsMap.put(“requiredApprovalTypes”,“[ManagerOrServiceAccountOwner, ApplicationBusApprovers]”);
launchArgsMap.put(“bypassApprovals”,“false”);]*

In the past, I have used smth similar and I remember using the approval rule library to get, something like this in your approval workflow,


import sailpoint.rapidapponboarding.rule.ApprovalRuleLibrary;
return ApprovalRuleLibrary.getPossibleApprovalTypes(context, workflow);

and I am passing this variable in the approval workflow.
Let me know if you want me to find out the exact logic

Yes please. I tried to pass requiredApprovalTypes variable but no luck. I am not sure where can I find the definition of this method to understand what am I missing.

ApprovalRuleLibrary.getPossibleApprovalTypes(context, workflow);

Workflow-FrameWork-Wrapper generates approval based on the approval configurations for which request is made i.e. role/entitlement , as long as its configured and you passing the ProvisioningPlan for that then it works properly. something like below ..

ProvisioningPlan plan = new ProvisioningPlan();
String identityName = identity.getName();
AccountRequest accReq = new AccountRequest(AccountRequest.Operation.Modify,"IIQ", null, identityName);
accReq.add(new AttributeRequest("assignedRoles",ProvisioningPlan.Operation.Set,"Rokle Name"));
plan.setArguments(attributes) ;
plan.setIdentity(identity);
plan.add(accReq);
HashMap launchArgsMap = new HashMap();
launchArgsMap.put("identityName", identityName);
launchArgsMap.put("requestor",identityName);
launchArgsMap.put("plan",plan);
launchArgsMap.put("approvalScheme", "manager");
launchArgsMap.put("flow", "AccessRequest");
launchArgsMap.put("optimisticProvisioning", false);
launchArgsMap.put("launcher", identityName);
launchArgsMap.put("policyScheme", "none");
launchArgsMap.put("source", "LCM");

Hi Hemanth,

Thanks for sharing the sample snippet. I am getting below error after with your code snippet. Am I missing anything to enable at my application level?

<List>
  <Message key="err_exception" type="Error">
    <Parameters>
      <Message key="Error in method invocation: Static method redirectAcceleratorPackEnabled(sailpoint.server.InternalContext, sailpoint.integration.ProvisioningPlan, sailpoint.object.Workflow, java.lang.String, java.lang.String, java.lang.String) not found in class&apos;sailpoint.rapidapponboarding.rule.WrapperRuleLibrary&apos; : at Line: 9 " type="Error"/>
    </Parameters>
  </Message>
</List>

Looks like I am using sailpoint.integration.ProvisioningPlan instead of sailpoint.object.ProvisioningPlan