none
Project server 2010 workflows - Change workflow status using PSI RRS feed

  • Question

  • Hi,

    We have a project approval workflow setup using the dynamic workflow solution starter. The workflow is configured to require approval before moving between stages. This is all working fine through PWA.

    We want to be able to submit a project for approval without going into PWA, so a user can select a project from a list and click a button to submit it for approval. I have added code behind the button to try and submit the project for approval using

    WebSvcWorkflow.WorkflowDataSet.UpdateProjectWorkflowsRow
    


    But this seems to move the project directly to the next stage and misses out the approval.

    Does anyone know how i could just submit it to the next stage? or even how to find out what code is running behind the 'submit' button in PWA.

    Thanks

    Wednesday, July 20, 2011 1:55 PM

All replies

  • Hi lawes_a,

    When you click the submit button in PWA, the focus is returned to the workflow. Within the workflow it is defined what need to happen by a sequence of workflow activities. Each activity defines one action, like 'send out approval', etc. One of the activities is SetProjectStage.

    In your case, the workflow might look something like:

    <workflow gets focus> -> Send out approval -> wait for approval -> If approved then SetProjectStage = X -> else SetProjectStage = Y

    If update the ProjectWorkflowRow directly to put the project in the next stage, you miss all approval activities (only the SetProjectStage activity is done in your code). So you really need to mimick a Submit operation with your custom button (or you would need to duplicate all workflow code behing your button which I do not recommend). I'm not sure however if the Submit method is exposed in the PSI. You will have to search the SDK.

    To better understand the workflow logic in Project Server, you might want to view this webcast:
    http://www.microsoft.com/showcase/en/us/details/34f2e816-bec5-4a5a-a7f8-b356dac292fc

    May I ask why you don't want to use the Sumit button in PWA? Isn't it logic that the person who creates the project in PWA also submits it from there?

    I hope this helps,
    Hans


    My EPM blog: Projectopolis
    Thursday, July 21, 2011 9:58 AM
    Moderator
  • Hi;

    I need more information:

    a. is a project created and published?

    b. is a workflow associated with an EPT based on which project was created?

    c. is workflow launched?

    Regards 


    Bartosz
    Friday, July 22, 2011 7:47 AM
  • Monday, July 25, 2011 5:38 PM