Additional Workflow Comments RRS feed

  • Question

  • Dear Microsoft Project Server Pro's,

    After each project workflow approval or reject, our Project Managers want to be able to consult the Comment entered in the workflow task. Actually there is a way via Workflow PDP > All Workflow Stages > Additional Workflow Data > Tasks > View the task and look at the Comment. However the button "Additional Workflow Data" is not available to the Group "Project Managers".

    Allowing the Group Permission "Manage Workflow and Project Detail Pages" doesn't solve the issue. When I edit the properties of the Workflow Status Web Part, I have some Display options, but they are all set to true.

    Does anyone know how I can show "Additional Workflow Data" to PMs? Or is there an easier way to display Workflow Approval Comments. Suppose the Approver adds some justification, it should be possible to the PM to review this information one way or the other. If not the workflow approvals are not so useful (at least that's what the end users told me ;-)

    Thanks a lot for help.


    Friday, August 26, 2011 4:01 PM

All replies

  • PatHo,

    That's a good question and a good point (by your end-users).  I guess a not so neat workaround would be for PMs to go to Workflow approvals list.  There you can experiment with different views (i.e. not show only "My Tasks" which comes up by default).  They can either choose "All Tasks" or select a view that could suite their needs.  In case of selecting "All Tasks", a filter can be used to bring back only the tasks they want to look at.  If you don't have necessary columns in the list to filter by, that could be customized, i.e. My Workflow Approval Tasks list can show more columns than it shows by default, like "Workflow Name" is one of them, for instance.  You might have to play with permissions, but I'd imagine a PM grou should be able to view/read all tasks.

    This is the easy way out though.  It got me thinking: what if you want to fetch these comments programmatically?  And send them to PMs in an e-mail or something?  Haven't been able to figure that out yet.  I'm sure there must be a way to read a list item, however you need an item ID.  How do you fetch that Id after a workflow activity creates a task, so you can reference it later? 

    If anyone has an input, please share.


    Saturday, September 10, 2011 12:37 AM
  • Hi PatHo,

    In SharePoint workflow scenarios, workflow status page is only available to the user that started the workflow instance & to all users with "Manage Web" SharePoiont permissions. Since the user that starts the project workflow instances is usually the queue account, not the project owner, if you are not an admin on the pwa site, you will get access denied when trying to access the workflow status page. For this reason, we are hiding the link if we determine that you don't have appropriate permissions.

    As Ilya says below, you can customize the workflow to bring in the approval comments and display them in the wf status page as current wf stage status info. For more info on how to do that, you can consult OfficeTask activity SDK.

    Hope this helps,


    Posting is provided "AS IS" with no warranties, and confers no rights.
    Project Server TechCenter | Project Developer Center | Project Server Help | Project Product Page
    SharePoint - Design and Customization
    Tuesday, September 13, 2011 6:12 PM
  • I've tried accessing the officeTask.Comments in the project server workflow, but for some reason it is always null. I have not customized the content type and am using it out of the box. Any other ideas on how I can retrieve the comments field programmatically (in a workflow) after an approval?


    Thank you!

    Thursday, November 17, 2011 3:14 AM
  • I believe officeTask.Comments is actually a description of the task (I know it's a bit misleading).

    You should be able to extract your comment by accessing TaskHashTable.  You need to add OnTaskPending activity to your office task, becuase that's where the hash table is available. 

    See the SampleProposal2 example in Project 2010 SDK.

    Once you have your TaskHashTable object, you should be able to access the comments like so:


    I haven't tried it, but it should work.


    • Proposed as answer by Rockmus Monday, November 21, 2011 7:13 PM
    • Edited by Rockmus Monday, November 21, 2011 7:13 PM
    Monday, November 21, 2011 7:12 PM
  • Hi Rockmus, thank you for the reply. I haven't tried this method, but I added the OnTaskCompleted activity, and accessed the hashtable there, and it worked. 
    Monday, November 21, 2011 8:49 PM