Get comment in a web service before operation rule

Hello all,

I’ve created a Web Service Connector for GLPi and wants to use it to create tickets for some request (badge, workstation, manual access request…)

I was not able to use the ITSM integration in SailPoint ISC as GLPi authentication is custom.

To have those different types of ticket, I needed to create a Before Operation Rule.
I need to access the comment field filled during the access request in the rule but was not able to do so even though I tried:

  • provisioningPlan.getComments()
  • accountRequest.getComments()
  • accountRequest.getArguments()

But nothing provided me with this comment field. Have anyone faced the same situation and which solution were the best?

Another point, I’m attaching this rule to Add Entitlement operation

Thank you for your help.

Hello,

I am fetching comments in our ITSM-integration using this logic:

#foreach($req in $plan.requests)
  #if($req.arguments.comments)
    #foreach($reqComment in $req.arguments.comments)
      $reqComment
    #end
  #end

  #if($req.items)
    #foreach($item in $req.items)
      #if($item.arguments.comments)
        $item.arguments.comments
      #end
    #end
  #end
#end

Maybe it can be helpful for you!

You can also try to send the entire provisioning plan and check if the VA’s give you some signs on what the comment operation syntax is (requires VA connector though)

Best regards,

Seb

1 Like

Hello Sebastien,

Thanks for your answer.
I would love to use the ITSM integration in SailPoint but GLPi auth doesn’t work with any of the ones proposed by SailPoint…

I think you can stil use similar syntax to get what you want,

Try for example the $plan.requests and $request.arguments to see what you are fetching

Try something like this:

for (AccountRequest req : plan.getAccountRequests()){

String reqComments= req.getArgument("comments");
}

Please refer this,
for (AccountRequest accountRequest : plan.getAccountRequests()){
if(accountRequest.getAttributeRequest(“<ent attribute name like memberOf in AD>”)!=null){
AttributeRequest attributeRequest = accountRequest.getAttributeRequest(“<ent attribute name like memberOf in AD>”);
if(attributeRequest.getArguments()!=null){
Attributes attr = attributeRequest.getArguments();
return attr.getString(“comments”);
}
else if(accountRequest.getComments()!=null){
return accountRequest.getComments();
}
}
}