Oracle® Business Intelligence Scheduler Guide > Using Oracle BI Scheduler Job Scripts > Oracle BI Scheduler Script Object Methods and Events >

RegisterCancelCommand Method

This topic is part of Oracle BI Scheduler Script Object Methods and Events.

Registers a method to be called when the script is canceled.

Usage: Occasionally, an object's method takes a long time to complete. If the job is canceled before the call returns, the script engine still must wait until the call returns. This could potentially take hours and limit resources. This method solves the problem by registering a method that is asynchronously called by the script engine if the script gets canceled.

Cancel methods should be registered before calling the method that executes a long operation. When the method returns, the cancel method should be deregistered by calling DeregisterCancelCommand().

A good practice is to hide implementation details of a COM object from the caller, having the COM object itself handle all registration and deregistration of cancel commands. Pass an instance of the Script object to the COM object, then call the RegisterCancelCommand() and DeregisterCancelCommand() methods because the Script object implements the IDispatch interface.

Syntax: RegisterCancelCommand source, methodName [, arguments]...

Arguments: Refer to Table 28 for RegisterCancelCommand method arguments.

Table 28. RegisterCancelCommand Method Arguments


An object whose method is being registered.


A string that specifies the method name.


Optional arguments to be passed into the method.

Oracle® Business Intelligence Scheduler Guide Copyright © 2007, Oracle. All rights reserved.