Adding notes to batch AddRole requests

Which IIQ version are you inquiring about?

Version 8.3

Share all details related to your problem, including any error messages you may have received.

Hello,

I’m interested in finding a way to add notes to the requests generated from batch ‘Add’ or ‘Remove’ operations in ARC. After reviewing the IdentityIQ User Guide, it seems this might not be a readily available feature.

I came across a similar query (Add comments in Batch Request) marked as solved, but I couldn’t discern the solution implemented.

I’ve tried adding an extra ‘message’ field to a batch ‘AddRole’ CSV (operation, roles, identityName, message). While the request was processed successfully, no message was displayed.

I would greatly appreciate any guidance or suggestions on this matter.

@acgsneddon
It’s not possible to achieve it through OOB batch request process (that means adding an extra column to the csv won’t help).

Let’s wait for any ideas.

1 Like

Hi @acgsneddon

In our case we added a new custom step in WF Approve and Provision Subprocess with the following code:

  <Step icon="Task" name="Add comments Batch request" posX="103" posY="21">
    <Arg name="source" value="ref:source"/>
    <Arg name="plan" value="ref:plan"/>
    <Arg name="identityName" value="ref:identityName"/>
    <Script>
      <Source>

        import sailpoint.object.ProvisioningPlan.AccountRequest;
        import sailpoint.object.ProvisioningPlan.AttributeRequest;
        
        import sailpoint.object.Attributes;
        import sailpoint.object.ProvisioningPlan.Operation;
        import sailpoint.object.Bundle;
  		import sailpoint.object.Profile;
  		import sailpoint.object.Identity;
        import sailpoint.object.Application;     
        import sailpoint.object.BatchRequestItem;
  
        
        String source = plan.getSource();

        if(source.equals("Batch")){


          String comments = null;
          if (batchRequestItemId != null){
              BatchRequestItem batchReqItem = context.getObjectById(BatchRequestItem.class, batchRequestItemId);

              if(batchReqItem != null){      
        
                  String[] result = batchReqItem.getRequestData().split(",");

                  if (result[0].equals("RemoveRole") || result[0].equals("AddRole")){
						if (result.length == 4){
        					comments = result[3];
        				}
                  }
              }
          }
        
        	if(comments != null){	
        		AccountRequest accReq = plan.getAccountRequests().get(0);
				AttributeRequest attReq = accReq.getAttributeRequests().get(0);
				Attributes atts = new Attributes(new HashMap());
				atts.put("comments", comments);
        		attReq.setArguments(atts);
          } 

        }
              
       
      </Source>
    </Script>
    <Transition to="print plan"/>
  </Step>

In our case, we need add comments when roles are removed or assigned.
The format of cvs file is the following:

operation,roles,identityName,comments
AddRole|RemoveRole,RoleTest,TestUser,Tets comments

5 Likes

Thanks @ismaelmoreno1. Just wanted to let you know that the script you suggested worked like a charm! There’s just one thing to keep in mind for anyone else who might use it - don’t forget to link the transition steps. It’s a small detail but pretty crucial for the script to function correctly.

Also, I’ve added this step right before the provisioning steps. Thought it would be good to give you a heads up.

1 Like

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