none
Publish a project automatically in a workflow RRS feed

  • Question

  • Hello, all!

    I have a complex Project Server 2013 workflow. The workflow is created using SPD2013.

    On some stages the workflow sets Custom project fields value. This value stays Draft until user hasn't publushed Project manually using PDP or Project Prof.

    How I can autopublish a project in the workflow?

    I've spend some time trying to use "Call HTTP Web Service" activity (REST endpoint /pwa/_api/ProjectServer/Projects('projectid')/Draft/publish) by I cannot make it work.

    I've created a console application which publishes a project but how I can use it in a workflow?

    Maybe I have overlooked some obvious solution.

    Any help will be greatly appriciated.

    Thanks!

    Thursday, December 4, 2014 11:48 AM

All replies

  • Hi Ildar,

    See the reply in this similar thread by Alexander Burton.

    And here to publish a project programmatically.


    Hope this helps,


    Guillaume Rouyre, MBA, MVP, P-Seller |

    Thursday, December 4, 2014 2:02 PM
    Moderator
  • Hi, Guillaume!

    Thanks for your reply.

    I've already created a PSI Console Application which is capable of publishing a project programmaticaly.

    But when I try to implement the same code in a Custom Code Activity - I get tjhis error from server via Fiddler:

    <general><class name="Project"><error id="20010" name="GeneralSecurityAccessDenied" uid="1f01f20d-c67e-e411-9414-0050568711e5"/></class>

    I think there is a problem with permissions.

    I've installed Workflow Manager 1.0 using the Farm Account (for example "Prj13Farm". When I try to the value of "Workflow Proxy Account" to Prj13Farm - the CA says that this account doesn't exist. Although Prj13farm added to Managed Accounts.

    Monday, December 8, 2014 11:16 AM
  • Hi, in order to be able to publish the Project with your Workflow Action, you have first to check it out calling the /pwa/_api/ProjectServer/Projects('projectid')/checkout. Of course, for this to work, the project must be checked in. If the publish happens while moving from one stage to another, you can set the stage as "Require checkin" and you should not have any problem.

    Regards.

    Wednesday, December 10, 2014 10:53 AM
  • Hi,

    I am working on a similar issue and the checkout is working fine with a response code OK. However the publish response is BadRequest.

    Any idea why this would be the case???

    Regards,

    Tony

    Wednesday, September 27, 2017 5:39 AM