Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Any way to push business justification of multiple roles through rest connector

savuser17
New Contributor II
New Contributor II

Hello,

Through rest, we have a connection to service desk. We create incidents/ tickets to give app owners useful information from the form and user table.

Here to push entitlement business justification, I used variable ${businessJustification}. It works for one entitlement. However, when I request two entitlements, it only shows business justification of one.

 

savuser17_0-1712675302955.png

Any way to push all business ents irrespective of the number?

Thanks in advance.

17 REPLIES 17

rushikeshvartak
All-Star
All-Star

Can you share full json


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

TicketStatus and CreateTicket JSON codes attached here.

${task?.comments}


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

It gives null:

Business Justification: null

Probably because the request comments is null. But I jhad separately filled out business justification for both roles and none of those are showing

${request.comments}


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Both ${request.comments} and ${request?.comments} are giving errors

${if(taskIds != null && taskIds.size()>0){String result='';ArrayList arr = new ArrayList(taskIds); arr.eachWithIndex{ val, idx -> com.saviynt.ecm.task.ArsTasks.get(val)?.entitlement_valueKey!=null?result=result.concat(com.saviynt.ecm.task.ArsTasks.get(val)?.tasktype==1?'ADD:: ':com.saviynt.ecm.task.ArsTasks.get(val)?.tasktype==31?'Extend End Date :: ':'REMOVE :: ').concat(com.saviynt.ecm.task.ArsTasks.get(val)?.entitlement_valueKey!=null?com.saviynt.ecm.task.ArsTasks.get(val)?.entitlement_valueKey?.entitlementtypekey.entitlementname+' : ':'').concat(com.saviynt.ecm.task.ArsTasks.get(val)?.entitlement_valueKey?.entitlement_value).concat(' : Access Start Date - ' + com.saviynt.ecm.task.ArsTasks.get(val)?.requestAccessKey?.startdate).concat(' : Access End Date - ' + com.saviynt.ecm.task.ArsTasks.get(val)?.requestAccessKey?.enddate).concat(' : Approved By - ' + com.saviynt.ecm.identitywarehouse.domain.Users.get(com.saviynt.ecm.task.ArsTasks.get(val)?.requestAccessKey?.collect{it.ae.findAll{it.jbpmActivityName.toString().equalsIgnoreCase('OwnerApproval')}}?.collect{it.approveby}.get(0).get(0)).displayname).concat('\\\\n'):'';}; return result}else{return '';}}

Sample to get all taskids change logic as per your requirements 

Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

savuser17
New Contributor II
New Contributor II

Hi,

Can I get clarification on this code? Not seeing which part should give business justification.

Sample to get all taskids change logic as per your requirements 


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

savuser17
New Contributor II
New Contributor II

Hi,

I tried your code plus a simplified version of it in the attached txt doc, but both of them are giving errors. Is the code validated from your end? Or is there something we're missing?

Thank you

[This message has been edited by moderator to mask domain name]

Code is validated  please share logs and code 


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Hi

Attached are logs and the code.

Thank you,

Seemran Biswal

Its seems issue with service account used in connection 

"2024-05-08T11:02:23.382+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-8-6spvw","ERROR","Call response: {"code":"access_denied","message":"You are not authorized to perform this action."}"


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Hi,

If it was an auth error, it wouldn't create tickets at all. But once I remove the code, it does.

I ran the job again and attached are logs. If you look at this part in particular: 

savuser17_0-1715603251658.png

this is the message that shows when there's a syntax error or similar.

Thanks

[This message has been edited by moderator to mask email from attached logs]

Please share all JSONs -

  • Connection
  • Create Ticket
  • Status check

Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Hi,

PFA

Thanks

Just keep code shared in body of ticket and validate


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.