Getting WorkflowStageNameUid in a Project Server workflow RRS feed

  • Question

  • Hi,

    This seems like a big gap, perhaps I'm missing something, I'm trying to get the current Stage name in a Project Server Visual Studio workflow. The following property is defined seemingly for just this:


    Which would be great if it worked! The ReadProjectProperty activity returns:

    readProjectStageName1: Failed to read project property since property to be read is invalid or is not available on Project Server. 
    Error is: GeneralItemDoesNotExist

    The closest hint I have found is on this similar question: 

    However both of the solutions provided don't appeal to me, I don't understand why I have to implement a custom workflow activity in my workflow just so that I can get the properties of my workflow!




    Martin Laukkanen (Project Server Blog -
    Thursday, November 3, 2011 6:21 AM

All replies

  • Martin,

    Firstly, you wouldn't be able to access this by using ReadProjectProperty because it is not a property of a project per se.  You can either read a custom field value or obtain an information about preset number of general project properties (name, % complete, optimizer decision, etc).

    Secondly, after investigating a little bit, looks like what you'e found (Workflow.CustomFields), is some kind of outdated reference class with bunch of pre-defined values.  If you notice, Workflow class has a class called SampleWorkflow underneath it which contains all pre-defined information that they use (read-only) for SampleProposal workflow.  This Workflow class kind of looks like it serves the same purpose.  I tried it, and WorkflowStageNameUid stays the same while stages change.  There are a couple of eumerations in this class that could come handy, but hardly more.  So looks like the Workflow class is not intended for what you need.

    I agree, you shouldn't have to write a custom activity in order to get workflow properties.  Perhaps, this is not available immediately because one is not expected to "tamper" with that information. 



    • Proposed as answer by Rockmus Friday, November 11, 2011 7:56 PM
    Wednesday, November 9, 2011 12:30 AM
  • Hi Rockmus,

    Thanks for the confirmation, I was hoping that I just missed something obvious but I guess not.

    It is a bit weird as to me the first piece of information I look for when receiving an approval request or other notification in a workflow is what the current state of that request is! Strange that it seems so difficult to find that out..



    Martin Laukkanen (Project Server Blog -
    Wednesday, November 9, 2011 1:54 AM