none
start Project Server 2010 workflow in event handler RRS feed

  • Question

  • Hi,

    How can i start workflow with my data within event handler? Please remember this Project Server Workflow and i want to execute this workflow using code.

    thanks


    Hammad Umar
    Saturday, October 29, 2011 11:14 AM

Answers

All replies

  • Hi,

    While you trap a project server workflow, you can call PSI Workflow web service & start the workflow. Methods in the Workflow class can create, read, update, and delete workflows, workflow stages, workflow phases, and enterprise project types (EPTs). Methods in the Workflow class also can clean up workflow stages in a project detail page (PDP), get the workflow proxy user, and read and set workflow status.

    http://msdn.microsoft.com/en-us/library/websvcworkflow_di_pj14mref.aspx
    http://msdn.microsoft.com/en-us/library/websvcworkflow.workflow_di_pj14mref_methods.aspx


    Thanks, Amit Khare |EPM Consultant| Blog: http://amitkhare82.blogspot.com http://www.linkedin.com/in/amitkhare82
    • Marked as answer by Hammad Umar Monday, October 31, 2011 12:46 PM
    Monday, October 31, 2011 6:15 AM
  • Thanks a lot for all this... i have another question i am unable to access PSI web-services. Can you please guide me how can i access them?? One more thing i am also not able to access HTTP://myserver:32843/ which is SharePoint web-services site. Please help on this too. Thanks
    Hammad Umar
    Monday, October 31, 2011 11:11 AM
  • Hi there,

    For example if you want to use project web service in applications, you can use the web service reference,

    Web service reference: http://ServerName/ProjectServerName/_vti_bin/PSI/Project.asmx?wsdl

    Just to make sure, that PSI runs in context of PWA site. If you want to use the PSI in Event handler, You can use the namespace "Microsoft.office.Project.Server.PWA.", You will need to pass the Site guid. Once you have all that, You can use the PJContext which contains all the all Projects erver web services.

    PJContext.Current.PSI.ProjectWebService

    There are lot of sample available in Solution starter which will give you direction to start with. Project 2010 SDK contains the sample of Event handlers which might be useful for you.
    http://archive.msdn.microsoft.com/P2010SolutionStarter
    http://www.microsoft.com/download/en/details.aspx?id=15511


    Thanks, Amit Khare |EPM Consultant| Blog: http://amitkhare82.blogspot.com http://www.linkedin.com/in/amitkhare82
    • Marked as answer by Hammad Umar Monday, October 31, 2011 12:45 PM
    Monday, October 31, 2011 11:29 AM
  • Thanks a lot Amit for your very kind help. Thank again.
    Hammad Umar
    Monday, October 31, 2011 12:46 PM
  • Hello Amit one more question, i a using PJContext.Current but it is returning in an error of Null exception. can you please guide me how can i resolve this error. Thanks
    Hammad Umar
    Tuesday, November 1, 2011 6:19 AM