IIQ version 8.3
Getting error for custom report any solution to it
Blockquote
Preformatted text
Please check below code as ref
<Attributes>
<Map>
<entry key="emailFileFormat">
<value>
<List>
<String>CSV</String>
</List>
</value>
</entry>
<entry key="report">
<value>
<LiveReport disablePreview="true" title="Audit Events Live Report">
<DataSource objectType="TaskResult" type="Filter">
<QueryParameters>
<Parameter argument="startDate" operation="ge" property="created"/>
<Parameter argument="endDate" operation="le" property="created"/>
</QueryParameters>
</DataSource>
<Columns>
<QueryScript>
<Source>
import sailpoint.object.AuditEvent;
import sailpoint.api.SailPointContext;
import sailpoint.object.LiveReport;
import sailpoint.object.TaskResult;
import sailpoint.task.Monitor;
import sailpoint.tools.GeneralException;
import sailpoint.tools.General;
import java.util.List;
import java.util.ArrayList;
import java.util.Map
import java.util.HashMap;
List <TaskResult>failedTasks = TaskResult.find("Status == 'FAILED'");
List<Map<String, Object>> reportData = new ArrayList<>();
for(TaskResult task : failedTasks){
Map <String , Object > row = new HashMap<>();
row.put("Task Name", task.getName());
row.put("Status", task.getStatus());
row.put("Error Message", task.getErrorMessage());
row.put("StartTime", task.getStartTime());
row.put("EndTime", task.getEndTime());
row.put("Duration", General.getDuration(task.getStartTime(),
`Preformatted text`task.getEndTime());
reportData.add(row);
for(Map<String, Object>row : reportData){
for(String key : print(key + ":"+ row.get(key)+"|"));
}
System.out.println();
}
</Source>
</QueryScript>
</Columns>
</LiveReport>
</value>
</entry>
</Map>
</Attributes>
<Description>Displays Task Failure Audit Report.</Description>
<Signature>
<Inputs>
<Argument name="startDate" type="date">
<Description>for start date</Description>
</Argument>
<Argument name="endDate" type="date">
<Description>for end date</Description>
</Argument>
</Inputs>
</Signature>
</TaskDefinition>