As part of setting up trigger-based report scheduling,
you must set up the trigger occurrence on a server.
You
link the external occurrence, such as a database refresh or an e-mail,
with a trigger on the server that causes the entry to run. You must
also specify the name of the occurrence.
Trigger occurrences
can also be set up by a Software Development Kit developer using the IBM® Cognos® software
development kit. For more information, see the The IBM Cognos Software
Development Kit Developer Guide.
Using the Microsoft Windows script
named trigger.bat or the shell script named trigger.sh, you can trigger
one or more schedules to run on the server. The script syntax follows
where URL is the IBM Cognos server URL, username is
a valid username in the specified namespace, password is
the password for the username, namespace is the namespace
for the username, and triggerlist is a comma separated
list of trigger names:
trigger.bat URL [username password namespace]
triggerlist
For example, if users want to schedule a report based
on a database refresh and want to schedule a second report based on
receipt of an email, your custom trigger command line may look similar
to this:
trigger.bat http://localhost:9300/p2pd/servlet/dispatch username
password namespace databaserefreshtriggername,emailtriggername
Procedure
- If you are setting up a trigger occurrence on a server
other than an IBM Cognos server, complete the following tasks:
- Ensure that the server has a supported version of either a Java™ Runtime Environment or a Java Development Kit.
- Copy the following files from c10_location/webapps/p2pd/WEB-INF/lib
on an IBM Cognos server to the location on the server
where you are setting up the trigger occurrence:
activation.jar
axis.jar
axisCrnpClient.jar
commons-discovery-0.2.jar
commons-logging-1.1.jar
commons-logging-adapters-1.1.jar
commons-logging-api-1.1.jar
jaxrpc.jar
mail.jar
saaj.jar
serializer.jar wsdl4j-1.5.1.jar
- Copy the following files from c10_location/webapps/utilities/trigger
on an IBM Cognos server, to the location on the server
where you are setting up the trigger occurrence:
trigger.bat
trigger.sh
trigger.class
(a Java utility that can run
on any IBM Cognos-supported
platform)
- Ensure that the command line runs when the external occurrence,
such as a database refresh or email, occurs.
The mechanism
that you use to invoke your custom trigger command depends on the
application that you are working with, such as a database system or
an email application. For information, see the documentation for your
application.
- Inform users that they can now schedule entries based on
the trigger occurrence.
If a user scheduled an entry
based on the occurrence, when the user clicks the schedule button
for a report view, occurrence information replaces frequency information
on the Schedule page.
Results
After the script runs, the trigger method returns an integer
value representing the number of schedules that were run. The following
integers represent errors:
- -1 is a usage error, such as invalid parameter or syntax
- -2 is a communication problem with IBM Cognos server