在Project Server工作流中获取WorkflowStageNameUid [英] Getting WorkflowStageNameUid in a Project Server workflow
问题描述
这似乎是一个很大的差距,也许我错过了一些东西,我试图在Project Server Visual Studio工作流程中获取当前的舞台名称。以下属性似乎就是这样定义的:
This seems like a big gap, perhaps I'm missing something, I'm trying to get the current Stage name in a Project Server Visual Studio workflow. The following property is defined seemingly for just this:
Microsoft.Office.Project.Server.Library.Workflow.CustomFields.WorkflowStageNameUid
如果有效的话哪个会好的! ReadProjectProperty活动返回:
Which would be great if it worked! The ReadProjectProperty activity returns:
readProjectStageName1: Failed to read project property since property to be read is invalid or is not available on Project Server.
Error is: GeneralItemDoesNotExist
我找到的最接近的提示就是这个类似的问题:  ; http:// social .technet.microsoft.com /论坛/ zh-CN / project2010custprog / thread / 56c17645-5fce-4305-bed1-58ae091e36df /
The closest hint I have found is on this similar question: http://social.technet.microsoft.com/Forums/en-US/project2010custprog/thread/56c17645-5fce-4305-bed1-58ae091e36df/
但是提供了两种解决方案不要诉诸我,我不明白为什么我必须在我的工作流程中实现自定义工作流程活动,以便我可以获得
我的工作流程的属性!
However both of the solutions provided don't appeal to me, I don't understand why I have to implement a custom workflow activity in my workflow just so that I can get the properties of my workflow!
任何人?
推荐答案
Martin,
Martin,
首先,您将无法使用ReadProjectProperty访问它,因为它不是项目本身的财产。 您可以读取自定义字段值或获取有关预设数量的常规项目属性的信息(名称,%
完成,优化程序决策等)。
Firstly, you wouldn't be able to access this by using ReadProjectProperty because it is not a property of a project per se. You can either read a custom field value or obtain an information about preset number of general project properties (name, % complete, optimizer decision, etc).
其次,调查后一点点,看起来像你发现的那样( Workflow.CustomFields),是某种过时的引用类,带有一堆预定义的值。 如果您注意到,Workflow类下面有一个名为SampleWorkflow
的类,其中包含他们为SampleProposal工作流使用的所有预定义信息(只读)。 此Workflow类看起来有同样的目的。 我尝试过,当
阶段发生变化时,WorkflowStageNameUid保持不变。 这堂课中有几个可以派上用场,但几乎不多。 所以看起来Workflow类并不适合您所需要的。
Secondly, after investigating a little bit, looks like what you'e found (Workflow.CustomFields), is some kind of outdated reference class with bunch of pre-defined values. If you notice, Workflow class has a class called SampleWorkflow underneath it which contains all pre-defined information that they use (read-only) for SampleProposal workflow. This Workflow class kind of looks like it serves the same purpose. I tried it, and WorkflowStageNameUid stays the same while stages change. There are a couple of eumerations in this class that could come handy, but hardly more. So looks like the Workflow class is not intended for what you need.
我同意,您不必编写自定义活动以获取工作流属性。 也许,这不是立即可用的,因为预计不会"篡改"其中一个。有这些信息。
I agree, you shouldn't have to write a custom activity in order to get workflow properties. Perhaps, this is not available immediately because one is not expected to "tamper" with that information.
Ilya
这篇关于在Project Server工作流中获取WorkflowStageNameUid的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!