Is there an interface to access the PDM Task List? Or do I need to access the PDM database directly?
The task list can be found in the administration app.
Understood. I'm trying to access it programmatically within a custom Add-In.
You can look inside the PDM Programmers guide.
Search for tasks, hope that helps.
Yes, I've used both IEdmTaskProperties & IEdmTaskInstance, but both of these interfaces are used to setup & manipulate your own custom task within a Task Add-In. I need something like an IEdmTaskManager to query the larger set of tasks running..
I just don't think it exists. Have to query DB
I'm not aware of a way to enumerate the configured tasks using the API.
Hope this helps,
Believe in The Q!
I believe you're correct, Tim, in that it isn't possible using the PDM API, but couldn't it be possible to open an SQL connection and query the TaskInstance table an retrieve the task info there? The InitUserID field could then be used to retrieve the user name from the Users table. I'm just spit balling here, but it seems like that should be possible. What say you?
Yes Jeff Borland, you are correct!
Greg could create an SQLConnection that queries the following and bind the results to a DataGrid to show the tasks by name:
SELECT T.TaskName [Task Name],
WHEN 1 THEN 'Waiting for Host'
WHEN 2 THEN 'Starting Up'
WHEN 3 THEN 'In Process'
WHEN 4 THEN 'Retrying'
WHEN 5 THEN 'Suspended'
WHEN 6 THEN 'Cancelling'
WHEN 7 THEN 'OK'
WHEN 8 THEN 'Cancelled'
WHEN 9 THEN 'Failed'
WHEN 10 THEN 'Suspending'
WHEN 11 THEN 'Resuming'
END [Task Status],
U.Username [Initiated by User], H.Hostname [Initiated on Computer], TI.StartTime [Start Time], TI.EndTime [End Time], TI.DocString [Task Results]
FROM TaskInstances TI
INNER JOIN Users U on U.UserID = TI.InitUserID
INNER JOIN Tasks T on T.TaskID = TI.TaskID
INNER JOIN Hosts H on H.HostID = TI.HostID
Here are my results:
Retrieving data ...