I have a workflow that schedules our computer build jobs. I now want to add a PCT step in there. Since I have to wait for the PCT Capture and Image deployment jobs to finish before starting the PCT Deploy task, I need to figure out when a job is finished. Currently the Schedule Task API doesn't return the task instance once a task is scheduled. Which is a big PITA. So I have to hunt through the task tables to find the most current running task and match it to the job I scheduled. I think I found the correct tables for this though I can't quite figure out how to link the JOB to the TASK instance.
However... the absolute ideal solution would be to be able to get all the data that is showed in the "Task Instance Details" screen in the console when you drill down to a computer to find out what step it's on. Does anyone know what tables this data is coming from?
In the workflow I know the GUID of the Job, and the GUID of the Computer. What I need is the TaskInstance of the job, what step in the job the computer is currently doing, how many steps are left, and if those steps were successful or not for the subtasks and the overall Job.