让品高工作流牛起来

做一个徘徊在牛A和牛C之间的产品也不错啊

导航

XML参与者的XML格式

Posted on 2010-08-26 15:05  Brian.KFC  阅读(465)  评论(0编辑  收藏  举报

XML参与者所用XML格式如下:

<Participant><User ID="GUID" Name="KFC"/><User ID="GUID2" Name="KFC2"/></Participant>

 

这份XML生成完后如何使用呢?

 

可以通过WorkflowHelper.SetParameter函数把这份XML作为XMLDocument传入,参数名要跟XML参与者中的Parameter属性相对应。这样XML参与者就可以从这份XML中求解出所需的参与者了。

例如,参数名为ActorData,则XML参与者中的设置为:

Attribute: ID

Parameter: ActorData

Prefix: 留空

XPath: //Participant

 

示例代码如下:

string xml = "<Participant><User ID='GUID' Name='KFC'/><User ID='GUID2' Name='KFC2'/></Participant>";

XmlDocument xmlDoc = new XmlDocument();

xmlDoc.loadXml(xml);

WorkflowHelper helper = new WorkflowHelper();

helper.SetParameter("ActorData", xmlDoc);

helper.Save();