IBM Support

Is there a way to retrieve output by eventID

Question & Answer


Question

User A schedules a report X to run asynchronously and a few seconds later user B schedules the same report but with different parameters. Using the runAt method to run the reports at a later time, two event IDs are created, one for user A and one for user B. How can the SDK be used to get the saved report output for user A based on her event ID and the saved report output for user B based on his eventID?

Answer

The key to linking the history with the resultant reportVersion and the output can be found in the history's child historyDetailReportService.

Here are some extracts from the SDK Developer Guide:

history
Provides information about the running of a task.
The object that was run is the parent of the bibus » history
...
eventID
Specifies the unique ID for the task that created this history object.
This property
o is of type string is encoded as type tns:stringProp
o must contain exactly 45 characters
o must contain exactly 45 ASCII letters or digits; the letters can be uppercase or lowercase
o is searchable
...

Therefore you can find the history for a specific eventID using a searchpath like this:

<object_path>/history[@eventID='<eventID from the response>']
or alternatively
//history[@eventID='<eventID from the response>']

Once you have the history for the event, retrieve the history's child object of type historyDetailReportService

historyDetailReportService
Provides the location of the report output created in the content store during the running of a report.
Instances of this class are created by the reportService and batchReportService.
...
Properties
This class has the following properties.
output
Contains a reference to the reportVersion object produced during the run.
This property refers to other objects in the content store using an id-based search path
has items that must be of class reportVersion
Class: baseClassArrayProp
...

The output property contains a searchPath which will direct you to the
correct reportVersion for that eventID. The report output(s) are child
objects of the reportVersion.

The document in the Related information section below shows how to use a HistoryDetailReportService.

For more details on Search Path Syntax, see the section in the Developer Guide.

[{"Product":{"code":"SSEP7J","label":"Cognos Business Intelligence"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"--","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"10.1;10.1.1;10.2;10.2.1","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
15 June 2018

UID

swg21651993