none
QueueLockDownTasks Method of Statusing Web Service MOPS 2010 RRS feed

  • Question

  • Hello,

    I am calling the QueueLockDownTasks method of the Statusing web service located at https://server/project/_vti_bin/PSI/Statusing.asmx?wsdl, but I need help with determining the parameters to pass.  The site http://msdn.microsoft.com/en-us/library/websvcstatusing.statusing.queuelockdowntasks(v=office.12).aspx shows that the method takes three paramenters:

    jobUid (Guid): Unique ID of the queue job.
    projguid (Guid): Unique ID of the project.
    delta (ProjectDataSet): A ProjectDataSet object with the tasks to lock down.

    How do I retrieve this information from my Project Server 2010 instance?  I tried looking through the web services to see whether there were some get methods, but I was unable to find anything!

    Thank you in advance for support!

    Best regards,

    Andrew


    Monday, April 16, 2012 2:24 PM

Answers

  • Thanks Jan,

    I have now read project data into a ProjectWebSvc.ProjectDataSet object, but the StatusingWebSvc.QueueLockDownTasks method takes a parameter of type StatusingWebSvc.ProjectDataSet.  I created a new object of type StatusingWebSvc.ProjectDataSet and have managed to read the desired ProjectWebSvc.ProjectDataSet.ProjectRow objects using the StatusingWebSvc.ProjectDataSet.Task.ImportRow method.

    When I pass the StatusingWebSvc.ProjectDataSet to the StatusingWebSvc.QueueLockDownTasks method, nothing seems to happen.  I cannot pass the ProjectWebSvc.ProjectDataSet because it is a type mismatch.  I have tried cloning, casting, and copying, but with no luck.

    Is the right approach to create a new StatusingWebSvc.ProjectDataSet object and somehow read the tasks into it?  Is there something I'm missing?

    I appreciate your help very much!

    Best regards,

    Andrew

    EDIT: I have created a StatusingWebSvc.ProjectDataSet and read the ProjectWebSrc.ProjectDataSet.Project into it using the Project.ImportRow method.  I did the same thing with Task.ImportRow method to read ProjectWebSrc.ProjectDataSet.Task objects into the StatusingWebSvc.ProjectDataSet.  I have verified and the data is the same.  When I call the StatusingWebSvc.QueueLockDownTasks method, I see that the project queue performs two jobs: Project Checkin and Project Workflow Check-in.  The tasks that I am trying to lock, however, remain unlocked!  When i perform a task lock manually via web, along with the two jobs I just mentioned, there is a third job: Project Update from PSI.  I am so close, but I cannot get this to work!

    EDIT2: OK, I solved!  The Task has an attribute TASK_LOCKDOWN_BY_MANAGER that has to be set to true.  If that is true, then it will work!  I hope somebody can find this thread useful!

    • Edited by spriteburn Friday, April 20, 2012 12:55 PM
    • Marked as answer by spriteburn Friday, April 20, 2012 12:55 PM
    Thursday, April 19, 2012 2:05 PM

All replies

  • Take a look at the Project SDK - it contains various samples that should help you to understand the basics. The QueueLockDownTasks method is indeed what you need - and the delta must contain the PROJ_UID and TASK_UID for each task to be locked. One way to obtain these is to read the project first.

    Jan Cirpka

    Tuesday, April 17, 2012 8:10 AM
  • Thanks Jan!

    What do you mean by "read the project first"?

    Regards,

    Andrew

    Tuesday, April 17, 2012 8:14 AM
  • Check ReadProjectStatus (http://msdn.microsoft.com/en-us/library/gg210536.aspx) or ReadProject (http://msdn.microsoft.com/en-us/library/gg209668.aspx). The latter one includes a sample that calls ReadProjectStatus first.


    Jan Cirpka

    Tuesday, April 17, 2012 1:26 PM
  • Thanks again Jan, this was really helpful.

    I'm still stuck with determining the JobUID.  I have tried calling the QueueLockDownTasks method by passing a new Guid, as in "Dim tempID As New Guid()" but that doesn't seem to work.

    Do you know where I can get the right UID?

    Regards,

    Andrew

    Wednesday, April 18, 2012 12:28 PM
  • A new guid should be fine

    Jan Cirpka

    • Marked as answer by spriteburn Thursday, April 19, 2012 1:59 PM
    • Unmarked as answer by spriteburn Thursday, April 19, 2012 1:59 PM
    Thursday, April 19, 2012 11:43 AM
  • Thanks Jan,

    I have now read project data into a ProjectWebSvc.ProjectDataSet object, but the StatusingWebSvc.QueueLockDownTasks method takes a parameter of type StatusingWebSvc.ProjectDataSet.  I created a new object of type StatusingWebSvc.ProjectDataSet and have managed to read the desired ProjectWebSvc.ProjectDataSet.ProjectRow objects using the StatusingWebSvc.ProjectDataSet.Task.ImportRow method.

    When I pass the StatusingWebSvc.ProjectDataSet to the StatusingWebSvc.QueueLockDownTasks method, nothing seems to happen.  I cannot pass the ProjectWebSvc.ProjectDataSet because it is a type mismatch.  I have tried cloning, casting, and copying, but with no luck.

    Is the right approach to create a new StatusingWebSvc.ProjectDataSet object and somehow read the tasks into it?  Is there something I'm missing?

    I appreciate your help very much!

    Best regards,

    Andrew

    EDIT: I have created a StatusingWebSvc.ProjectDataSet and read the ProjectWebSrc.ProjectDataSet.Project into it using the Project.ImportRow method.  I did the same thing with Task.ImportRow method to read ProjectWebSrc.ProjectDataSet.Task objects into the StatusingWebSvc.ProjectDataSet.  I have verified and the data is the same.  When I call the StatusingWebSvc.QueueLockDownTasks method, I see that the project queue performs two jobs: Project Checkin and Project Workflow Check-in.  The tasks that I am trying to lock, however, remain unlocked!  When i perform a task lock manually via web, along with the two jobs I just mentioned, there is a third job: Project Update from PSI.  I am so close, but I cannot get this to work!

    EDIT2: OK, I solved!  The Task has an attribute TASK_LOCKDOWN_BY_MANAGER that has to be set to true.  If that is true, then it will work!  I hope somebody can find this thread useful!

    • Edited by spriteburn Friday, April 20, 2012 12:55 PM
    • Marked as answer by spriteburn Friday, April 20, 2012 12:55 PM
    Thursday, April 19, 2012 2:05 PM