none
Project Server Workflow, how to get current stage UID RRS feed

  • Question

  • Hi,

    I am coding workflow for project server and require to query/read current project stage to do next set of activities. Is there any way I can read this value? Below is what I want to do.

    1. Read current stage & Project Field
          if Project Field is == on Hold. 
          Set current stage = Execution On Hold
    2. Else
          if Proejct Field is == in Execution
          Set current stage = in Execution.

    Major reason to read this value is because my understanding is that you cannot set a stage twice, e.g. if I am already in "In execution" stage and in a while loop to check for project completion. If I try to set the stage again to "execution stage" the workflow will terminate.

    Let me know if there is any other way to set a stage twice without breaking the workflow.

    Thanks

    Tuesday, October 12, 2010 7:37 AM

Answers

All replies

  • Unfortunetly I couldnt find such fuction, so my workaround was to use my own variable of GUID type and after every setStage update it, using code activity. It worked perfectly!
    Wednesday, October 20, 2010 8:48 AM
  • You can use the ReadWorkflowStatus method from Workflow Service.

    It will give the list of stages associated to the project through Workflow.

    The stage with STAGE_STATUS equal with 1 is the current stage.

    Friday, January 14, 2011 1:04 PM