SDK: How to cancel reports that are currently executing/pending in the Schedule Management activity tab

Technote (troubleshooting)


Problem(Abstract)

How do you cancel reports that are currently executing in the Schedule Management activity tab?

Resolving the problem

The attached sample will cancel all executing reports. This sample does not account for security and assumes Anonymous logon is enabled in Cognos Connection.

1. Download the attached java class.

2. Modify the endpoint url to suit your environment.

3. Compile and run the sample. All reports that are a status of Executing in the Activity tab in Schedule Management will be cancelled. Check the Activity tab to see the results of the termination.

For CRN, you can modify this program to go after one particular report by changing the following line to a valid Search Path. + "/reportHistory".

et.queryReportHistory("//reportHistory"); // can also be "//jobHistory"

By default monitor and event management service only allows a default 10 objects to be displayed at a time. Use the pagingOption to allow all objects to be displayed by setting maximumObjects to 0.

In your SDK app, change this line...

          AsynchReply res = this.getMonitorService(true, "").runSpecification( monitorServiceSpecification, new ParameterValue[] {}, new Option[] {});

To this

          AsynchReply res = this.getMonitorService(true, "").runSpecification( monitorServiceSpecification, new ParameterValue[] {}, new Option[] {new PagingOptionInt(PagingOptionEnum.maximumObjects, 0)});

Also, change this line...
          res = this.getMonitorService(false, "").wait(res.getPrimaryRequest(),new ParameterValue[] {}, new Option[] {});

To this
          res = this.getMonitorService(false, "").wait(res.getPrimaryRequest(),new ParameterValue[] {}, new Option[] {new PagingOptionInt(PagingOptionEnum.maximumObjects,0)});



To Cancel pending reports

Change the sXML string status filter from executing to pending
String sXML =
"<monitorServiceSpecification xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" "
+ "xmlns:xts=\"http://developer.cognos.com/schemas/xts/\" xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\""
+ " xmlns:bus=\"http://developer.cognos.com/schemas/bibus/3/\""
+ " xmlns:async=\"http://developer.cognos.com/schemas/xts/cogadmin/iAsyncRequest/1/\">"
+ "<filters>"
+ "<status>"
+ "pending"
+ "</status>"
+ "</filters>"
+ "</monitorServiceSpecification>";




VERSIONS:
/cognos8Compatible = CRN deprecated methods compatible with Cognos8.1 & 8.2, NOT 8.3
/cognos8 = Cognos 8.1 and Cognos 8.2
/cognos8_3 = Cognos8.3 (tested with Java 1.4.x)
/cognos10_1 = Cognos 10.1


Cross reference information
Segment Product Component Platform Version Edition
Business Analytics Cognos 8 Business Intelligence Cognos Connection
Business Analytics Cognos 8 Business Intelligence Report Studio
Business Analytics Cognos 8 Business Intelligence Software Development Kit
Business Analytics Cognos ReportNet ReportNet

Historical Number

1003478

Rate this page:

(0 users)Average rating

Add comments

Document information


More support for:

Cognos Business Intelligence
Software Development Kit

Software version:

8.3, 8.4, 8.4.1, 10.1

Operating system(s):

AIX, HP Itanium, HP-UX, Linux, Solaris, Windows

Reference #:

1343836

Modified date:

2014-08-26

Translate my page

Machine Translation

Content navigation