Tivoli: Workload Scheduler
Tivoli: Workload Scheduler
Version 8.5
SC23-9608-00
Note
Before using this information and the product it supports, read the information in “Notices” on page 17.
This edition applies to version 8, release 5, modification 0 of IBM Tivoli Workload Scheduler (program number
5698-WSH) and to all subsequent releases and modifications until otherwise indicated in new editions.
© Copyright International Business Machines Corporation 1991, 2008.
US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract
with IBM Corp.
Contents
About this publication . . . . . . . . v Java API for Tivoli Workload Scheduler . . . . . 4
What is new in this release . . . . . . . . . v Overview . . . . . . . . . . . . . . 4
What is new in this release for application Resources . . . . . . . . . . . . . . 5
programming interfaces . . . . . . . . . . v Naming conventions. . . . . . . . . . . 5
What is new in this publication . . . . . . . . v API specifications and description . . . . . . 5
Who should read this publication . . . . . . . v Examples . . . . . . . . . . . . . . 5
Publications . . . . . . . . . . . . . . vi
Accessibility . . . . . . . . . . . . . . vi Chapter 3. Web services interface . . . 11
Tivoli technical training . . . . . . . . . . vi Further information . . . . . . . . . . . 12
Support information . . . . . . . . . . . vi
Appendix. Java API Resources . . . . 13
Chapter 1. Introduction . . . . . . . . 1
Notices . . . . . . . . . . . . . . 17
Chapter 2. Integration Workbench . . . 3 Trademarks . . . . . . . . . . . . . . 18
Installing Integration Workbench . . . . . . . 3
Using Integration Workbench . . . . . . . . . 3
For information about the APARs that this release addresses, see the Tivoli
Workload Scheduler Download Document.
The major item is the introduction of the new Tivoli Workload Scheduler
Integration Workbench (occasionally referred to as "SDK"). See Chapter 2,
“Integration Workbench,” on page 3.
The reader of this book should be an expert application programmer, who has a
reasonable understanding of the Tivoli Workload Scheduler infrastructure and its
inter-component interactions, or the manager of such a person, who wants to better
understand what you can achieve using the application programming interfaces.
This book also contains information useful to the IT administrator and the Tivoli
Workload Scheduler IT administrator, for planning purposes.
Publications
Full details of Tivoli Workload Scheduler publications can be found in Tivoli
Workload Automation: Publications. This document also contains information on the
conventions used in the publications.
A glossary of terms used in the product can be found in Tivoli Workload Automation:
Glossary.
Accessibility
Accessibility features help users with a physical disability, such as restricted
mobility or limited vision, to use software products successfully. With this product,
you can use assistive technologies to hear and navigate the interface. You can also
use the keyboard instead of the mouse to operate all features of the graphical user
interface.
For full information with respect to the Tivoli Dynamic Workload Console, see the
Accessibility Appendix in the Tivoli Workload Scheduler: User's Guide and Reference,
SC32-1274.
For full information with respect to the Job Scheduling Console, see the
Accessibility Appendix in the Tivoli Workload Scheduler: Job Scheduling Console User’s
Guide.
http://www.ibm.com/software/tivoli/education
Support information
If you have a problem with your IBM software, you want to resolve it quickly. IBM
provides the following ways for you to obtain the support you need:
v Searching knowledge bases: You can search across a large collection of known
problems and workarounds, Technotes, and other information.
v Obtaining fixes: You can locate the latest fixes that are already available for your
product.
v Contacting IBM Software Support: If you still cannot solve your problem, and
you need to work with someone from IBM, you can use a variety of ways to
contact IBM Software Support.
For more information about these three ways of resolving problems, see the
appendix on support information in Tivoli Workload Scheduler: Troubleshooting Guide.
In both cases, at the end of the installation, on the panel where you click Finish,
there is an option to display the file readmefirst.html, which contains information
about the workbench, and how to run it. This information is also given here, in
“Using Integration Workbench.”
Note: The above information can also be read by opening the following document
in a Web browser: <TWS_home>/TWS/IntegrationWorkbench/readmefirst.html
Each function that you can perform in the workbench is fully documented, but it
will help you to understand how to work with the API to read the overview
provided here, in “Java API for Tivoli Workload Scheduler.”
Overview
Tivoli Workload Scheduler is provided with a J2E API that uses Enterprise Java
Beans to interface with the product for many of the most commonly-used tasks.
You can perform the tasks performed by the Job Scheduling Console and the Tivoli
Dynamic Workload Console (both use the API for their tasks). This includes all
tasks performed by the command-line programs composer, conman, and planman.
To find out more about how to program this type of API, see the following IBM
Redbooks®:
IBM Redbooks: EJB 2.0 Development with WebSphere Studio Application Developer,
SG24-6819
This IBM Redbook provides detailed information on how to effectively use
WebSphere® Studio Application Developer for the development of
applications based on the Enterprise JavaBeans™ (EJB) architecture, and
deployment of such applications to a WebSphere Application Server.
To access this publication, follow this link: http://www.redbooks.ibm.com/
abstracts/sg246819.html.
IBM Redbooks: Programming J2EE APIs with WebSphere Advanced, SG24-6124
This IBM Redbook has examples of programming the new J2EE APIs using
VisualAge® for Java and deployment on WebSphere Advanced.
To access this publication, follow this link: http://www.redbooks.ibm.com/
abstracts/sg246819.html.
Naming conventions
The naming conventions for the objects are quite straightforward. The only
important one to remember is that an object in the database is differentiated from
an object in the plan by the suffix "InPlan" to the object class name.
To obtain a description of the use of the different panes of the API panel, click
Help.
Examples
The following examples help you to understand how the beans are used. The
examples are annotated with explanatory comments. They are available in these
groupings:
v “Examples: working with objects in the database”
v “Examples: Working with objects in the plan” on page 6
v “Examples: Working with event rules in the database” on page 7
ConnModel myModel;
//Get an instance of ConnModel interface...
...
Example 4: Submitting a job stream instance into the current plan: This
procedure requires several actions:
1. Obtain the required job stream definition from the database and transform it
into a JobStreamInPlan:
ConnPlan myPlan;
//Get an instance of ConnPlan interface...
...
//Transform it in a JobStreamInPlan.
//TODAY is a variable representing the scheduled time
jsip = myPlan.makeJobStreamInPlan(jsDbID, TODAY, alias, null);
}
catch (ConnException e)
{
//Something went wrong...
}
catch (ConnEngineNotMasterException e)
{
//Since the makeJobStreamInPlan is available also on FTAs
//(it's on the Plan interface), an exception must be thrown
//if it is called on an engine that is not the master
}
2. Add the JobStreamInPlan to the plan:
List idList = new ArrayList();
try
{
Example 5: Making a query on the plan: The following example lists the first
five jobs that begin with the letter "A":
String nameFilter = "A*";
int howMany = 5;
QueryResult qr = null;
try
{
qr = myPlan.queryPlanObject(JobInPlan.class, qf, howMany, null);
}
catch (ConnException e)
{
//...
}
//EventRule definition
Example 7.1: Retrieve an event rule from the database by ID: Follow these steps:
1. Obtain the event rule ID to be retrieved by any means appropriate to your
interface
2. Retrieve the event rule:
EventRule eRuleRead = new EventRule();
try
{
eRuleRead =
(EventRule) myModel.getTWSObject(EventRule.class, erId, false, null);
}
catch (ConnException e)
{
//Do something to recover...
}
Example 7.2: Retrieve an event rule from the database by key (name): Follow these
steps:
1. Obtain the event rule key (name) to be retrieved by any means appropriate to
your interface
2. Retrieve the event rule:
EventRule eRuleRead = new EventRule();
try
{
eRuleRead =
(EventRule) myModel.getTWSObject(EventRule.class,
new EventRuleKey(eventRuleName), false, null);
}
catch (ConnException e)
{
//Do something to recover...
}
Example 8.1: Delete an event rule from the database by ID: Follow these steps:
1. Retrieve by ID the event rule to be deleted, as shown in example 7.1
2. If the event rule has been successfully retrieved, delete it:
{
myModel.removeTWSObject(EventRule.class, eRuleRead.getId(), null);
}
catch (ConnException exc)
{
//Do something to recover...
}
Example 8.2: Delete an event rule from the database by key (name): Follow these steps:
1. Retrieve by key, the event rule to be deleted, as shown in example 7.2
2. If the event rule has been successfully retrieved, delete it:
Whenever you install a Tivoli Workload Scheduler component that includes the
Embedded Version of WebSphere Application Server, the following WSDL files:
SchedulingFactory.wsdl
JobService.wsdl
JobstreamService.wsdl
Open these WSDL files with a Web Services development tool. They provide you
with:
v The server part interfacing the master domain manager to perform the
supported subset of scheduling operations against jobs and job streams in
production.
v A means of creating your own client interface from where service requesters can
request to perform a subset of operations from any system in your environment
by accessing the following location:
https://localhost:31116/PlanServicesWeb/services/<service_name for distributed environment>
where localhost must be replaced manually with the hostname of the master
domain manager, and service_name for xxx environment is the name of the service
you invoke, that is SchedulingFactory, JobService, or JobStreamService.
v Full documentation on how to use the Java methods in the files
You can also modify the port number to use when binding to the master domain
manager, 31116 for distributed environment or 31126 for z/OS® environment.
Service requesters can create job streams and jobs in the plan by submitting actions
(submitJobStream, submitJob, submitJobAdHoc), to monitor the submitted
objects by getting actions (queryJobStreams, queryJobs, getJobsList, getProperties,
getJobOutput), and to manage them by setting actions (setProperties, cancel, kill,
releaseAllDependencies). Neither database actions nor other plan actions can be
implemented and invoked using this interface.
Table 1 on page 12 shows, for each of the three services provided, the messages
implementing the JAVA methods invoked when performing actions and an
explanation of the action you need to perform.
Further information
For more information on how to manage WSDL files to create your own Web
Services-based user interface refer to the IBM redbook IBM Redbooks: WebSphere
Version 5.1 Application Developer 5.1.1 Web Services Handbook, SG24-6891, which has
the following description:
v This IBM Redbook describes the new concept of Web services from various
perspectives. It presents the major building blocks Web services rely on. Here,
well-defined standards and new concepts are presented and discussed.
v Whereas these concepts are described vendor-independent, this book also
presents IBM’s view and illustrates with suitable demonstration applications
how Web services can be implemented using IBM’s product portfolio, especially
WebSphere Application Server Version 5.1 and WebSphere Studio Application
Developer Version 5.1.1.
v This book is a major update to the IBM Redbook Web Services Wizardry with
WebSphere Studio Application Developer, SG24-6292, and to WebSphere Version
5 Web Services Handbook, SG24-6891-00.
IBM may have patents or pending patent applications covering subject matter
described in this publication. The furnishing of this publication does not give you
any license to these patents. You can send license inquiries, in writing, to:
For license inquiries regarding double-byte (DBCS) information, contact the IBM
Intellectual Property Department in your country or send inquiries, in writing, to:
The following paragraph does not apply to the United Kingdom or any other
country where such provisions are inconsistent with local law:
Any references in this information to non-IBM Web sites are provided for
convenience only and do not in any manner serve as an endorsement of those Web
sites. The materials at those Web sites are not part of the materials for this IBM
product and use of those Web sites is at your own risk.
IBM may use or distribute any of the information you supply in any way it
believes appropriate without incurring any obligation to you.
Licensees of this program who wish to have information about it for the purpose
of enabling: (i) the exchange of information between independently created
programs and other programs (including this one) and (ii) the mutual use of the
information which has been exchanged, should contact:
IBM Corporation
2Z4A/101
11400 Burnet Road
Austin, TX 78758 U.S.A.
The licensed program described in this publication and all licensed material
available for it are provided by IBM under terms of the IBM Customer Agreement,
IBM International Program License Agreement or any equivalent agreement
between us.
This information contains examples of data and reports used in daily business
operations. To illustrate them as completely as possible, the examples include the
names of individuals, companies, brands, and products. All of these names are
fictitious and any similarity to the names and addresses used by an actual business
enterprise is entirely coincidental.
Trademarks
IBM, the IBM logo, and ibm.com® are trademarks or registered trademarks of
International Business Machines Corporation in the United States, other countries,
or both. If these and other IBM trademarked terms are marked on their first
occurrence in this information with a trademark symbol (® or ™), these symbols
indicate U.S. registered or common law trademarks owned by IBM at the time this
information was published. Such trademarks may also be registered or common
law trademarks in other countries. A current list of IBM trademarks is available on
the Web at ″Copyright and trademark information″ at http://www.ibm.com/legal/
copytrade.shtml.
UNIX is a registered trademark of The Open Group in the United States and other
countries.
Other company, product, and service names may be trademarks or service marks
of others.
Notices 19
20 IBM Tivoli Workload Scheduler: Application Programming Interfaces
Printed in USA
SC23-9608-00