Obtain list of workloads
A consumer such as Tivoli Workload Scheduler (TWS) can obtain a single workload or a list of workloads, filtered by several criteria if necessary, that the service provider, such as Tivoli System Automation for z/OS (SA z/OS) knows and is able to automate. Workloads are Availability Resources that have multiple differing concepts of status, such as “currently observed” and “desired”.
The consumer may use this status information for display in a user interface, but also to test the observed (= current) availability status against the desired availability status. In case of a mismatch between observed and desired availability status, the consumer may decide to act on the workload in order to align them. Existing mechanisms like Core’s or Automation’s Actions might suffice for “acting on” the workload.
Steps
- The consumer is given the service provider to use.
- The consumer requests the list of Availability Resources with their status information from the service provider.
Variations
The consumer may be interested in just a single workload or rather a subset of the workloads that the service provider manages.
- For a single workload, the consumer either knows the URI of the associated Availability Resource or he looks up the URI of interest from the list of Availability Resources registered by the service provider. Once he has a URI, the consumer requests status information about this Availability Resource from the service provider.
- For a list of workloads, the consumer can request a Query Resource using a URI constructed from a Query Capability base URI and Query String. Subsequently, the consumer requests status information for each Availability Resource returned in the collection of resources that match the query criteria.
Example
- TWS has a jobplan that at some point in its execution needs to stop a DB2 database for maintenance reasons.
- TWS looks up the Availability Resource that represents the database.
- TWS requests details for that Availability Resource from SA z/OS.
- The database’s observed status indicates it is available.
- Now, TWS knows that it can (has to) stop the Availability Resource for maintenance purposes.
- TWS finds some way to request the database to stop, and makes the request – the request’s implementation is unimportant, but TWS needs some way to find out when the database has been successfully stopped so that TWS can resume the jobplan’s execution.
- TWS monitors the database’s observed current status until it has stopped, and then resumes its job plan.