Share all details related to your problem, including any error messages you may have received.
How can we retrieve the identity name for the triggered workflow using hql .
I have triggered a joiner event and i am creating a custom report using datasource Hql with columns identityName, Joiner Event name, status . I need to get the name of the identity , joiner event name for which the identity is triggered and completion status of the task (i.e. Success or Fail).
the Query i used is :
from name,completionStatus from Taskresult where name LIKE ‘D%’
I am getting the name of the task and the status . how can we get name of the identity for which it is triggered.
I am getting the above result for that i need to get name of the Identity.
TaskResult have the traget_name and traget_id which is identity name and identity id but target name is not mapped so you need to join TraskResult and Identity table on id and targetId and then get the identity name from the identity table. see the HQL below whihc should work for your requirement.
select i.name,r.name,r.completionStatus from TaskResult r, Identity i where r.targetId = i.id and r.name like 'JOINER FEATURE FOR%'
Exactly this is the xml of the task i have written , but here the name of the identity is not coming . the result csv file i have provided. samplereport.csv (1.9 KB)
in that i need to get the name of the identity in sperate column along with name of the event and completionStatus.
Sorry, for the confusion. The query which I shared earlier will give the launcher of the workflow/task not the identity for it triggered.
In the spt_task_result table, we have couple of columns target_name and target_id which you can query to get the target users. But for Joiner events these values will will be null. In this case you can extract the identity name from task name using render script like below.
sailpoint.tools.GeneralException: sailpoint.tools.GeneralException: The application script threw an exception: java.lang.StringIndexOutOfBoundsException: begin 27, end 24, length 24 BSF info: script at line: 0 column: columnNo
at sailpoint.api.DynamicValuator.evaluate(DynamicValuator.java:404)
at sailpoint.reporting.datasource.DataSourceColumnHelper.runColumnRenderer(DataSourceColumnHelper.java:57)
at sailpoint.reporting.datasource.BaseProjectionDataSource.getFieldValue(BaseProjectionDataSource.java:250)
at sailpoint.reporting.JasperCsvWriter.write(JasperCsvWriter.java:118)
at sailpoint.reporting.LiveReportExecutor.execute(LiveReportExecutor.java:275)
at sailpoint.api.TaskManager.runSync(TaskManager.java:909)
at sailpoint.api.TaskManager.runSync(TaskManager.java:724)
at sailpoint.scheduler.JobAdapter.execute(JobAdapter.java:128)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
The code below does the substring from 27th position to end of the string what happens if value is null or void or its less than 27 characters and these are cases where the below code will through exception