Project Server 2010工作流程 - 使用PSI更改工作流程状态 [英] Project server 2010 workflows - Change workflow status using PSI

查看:92
本文介绍了Project Server 2010工作流程 - 使用PSI更改工作流程状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,


我们使用动态工作流程解决方案启动器设置项目审批工作流程。工作流程配置为在阶段之间移动之前需要批准。这一切都通过PWA正常运行。


我们希望能够提交项目以供批准而无需进入PWA,因此用户可以从列表中选择项目并单击按钮提交批准。我在按钮后面添加了代码,尝试使用


提交项目以进行审批

 
WebSvcWorkflow.WorkflowDataSet.UpdateProjectWorkflowsRow

解决方案

你好lawes_a,


单击PWA中的"提交"按钮时,焦点将返回到工作流程。在工作流程中,定义了一系列工作流活动需要发生的事情。每个活动定义一个动作,如"发出批准"等。其中一个活动
是SetProjectStage。


在您的情况下,工作流可能类似于:


<工作流获得焦点> - >发出批准 - >等待批准 - >如果获得批准,则SetProjectStage = X - >否则SetProjectStage = Y


如果直接更新ProjectWorkflowRow以将项目置于下一阶段,则会错过所有批准活动(仅在代码中完成SetProjectStage活动)。所以你真的需要用你的自定义按钮来模仿提交操作(或者你需要复制所有工作流程代码,这些代码都是你不推荐的按钮)。但我不确定提交方法是否在PSI中公开。您必须搜索SDK。


为了更好地理解Project Server中的工作流逻辑,您可能希望查看此网络广播:

http://www.microsoft.com/showcase/en/us/详情/ 34f2e816-bec5-4a5a-a7f8-b356dac292fc


请问为什么你不想在PWA中使用Sumit按钮?在PWA中创建项目的人是否也从那里提交了它是不是逻辑?


我希望这有帮助,

Hans


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

解决方案

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


这篇关于Project Server 2010工作流程 - 使用PSI更改工作流程状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆