Click HERE to see how Saviynt Intelligence is transforming the industry. |
07/02/2024 04:44 AM
Hi Team,
We are trying to send businessjustifcation in the SNOW body and the below is the used code.The code works fine for enterprise role Manual or Autoapproval scenario as expected. In case of emergency roles no issue identified for manual approval request but when the request is autoapproved the requestor businesjustification is going as blank in SRQ.
Ideally businessjustifcation is only present on requestor page and it should not have anything to do with auto approval or manual approver but still facing this issue for emergency role alone. Could you please provide some insights if this can be fixed
\\\\n\\\\n\\\\n${String str='BusinessJustification'; return str;}:${businessJustification.contains('<br')? businessJustification.substring(0,businessJustification.indexOf('<')) : businessJustification} \\\\n\\\\n\\\\
There is no error as such in the logs but the value goes blank
Solved! Go to Solution.
07/02/2024 04:56 AM - edited 07/02/2024 04:58 AM
@Anu try below
${task.requestKey==null?'':task.requestKey?.comments?.replaceAll('<.*?>','').replaceAll('\\n','').replaceAll('\\r','').replaceAll('[^ -~À-ÿ]+','').replaceAll(new String('XFw='.decodeBase64()),new String('XFxcXA=='.decodeBase64()))}
or
${businessJustification}
07/02/2024 05:06 AM
Hi @Raghu , we have already tried the above code ,but it still fails for autoapproval requests only for emergency roles.
07/30/2024 05:56 AM
Hi @Anu ,
You can try below which captures both entitlement and the corresponding business justification of each task.
${if(taskIds != null && taskIds.size()>0){String result=''; String result2=''; 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)?.entitlement_valueKey?.entitlement_value+' : '+com.saviynt.ecm.task.ArsTasks.get(val)?.requestAccessKey?.comments.split(']')[1].split('<br')[0].toString().replaceAll('<.*?>','').replaceAll('\\n','').replaceAll('\\r','').replaceAll('[^ -~À-ÿ]+','').concat('###').trim()):'';}; result2=result.substring(0,result.length()-4); result2=result2.replaceAll('###','\\\\\\\\n');return result2;}else{return '';}}
Thanks,
Anush