7 Replies Latest reply on May 3, 2017 12:43 PM by Tim Webb

    PDM Task List

    Greg Thomson

      Is there an interface to access the PDM Task List?  Or do I need to access the PDM database directly?



      PDM 2016

        • Re: PDM Task List
          Jason Kerns

          Hi Greg,

          The task list can be found in the administration app.

          • Re: PDM Task List
            Tim Webb

            Hey Greg,


            I'm not aware of a way to enumerate the configured tasks using the API.


            Hope this helps,

            Tim CEPA

            Believe in The Q!

              • Re: PDM Task List
                Jeff Borland

                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?

                  • Re: PDM Task List
                    Tim Webb

                    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], 
                      CASE TI.TaskStatus
                      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:



                    Tim CEPA

                    Believe in The Q!