ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.
TaskStatistics functions get unexpected return codes for running jobs
book
Article ID: 103996
calendar_today
Updated On:
Products
CA Automic Workload Automation - Automation Engine
Issue/Introduction
When evaluating a running job, the functions for the TaskStatistics class returns null-results instead of the expected values.
Sample code (where "result" is a StatisticSearchItem object):
Return Code: 0 Status Code: 1550 Status Text: Still Active State: state_active (or something similar)
Actual Result:
Return Code: 0 Status Code: -1 Status Text: null State: state_unknown
Cause
It is by design that the "get" functions deliver unknown results for objects that are currently active. The functions will only return meaningful results after the statistic values are available (after the run finishes).