将活动的InArgument添加到根活动

时间:2011-03-04 20:38:27

标签: workflow workflow-foundation workflow-foundation-4 workflow-activity

我有工作流设计师,我用它来创作工作流程;现在,当我向Designer中删除任何活动时,我在ModelChanged事件中捕获它并且可以获得该类型的所有InArguemnt,我现在也想将这些Argument添加到WorkFlow中;就像在Visual Studio中我可以定义Arguments,我希望在创作工作流程时自动添加。

我该怎么做?

由于 海洋

1 个答案:

答案 0 :(得分:0)

走上模型树(ModelItem.Parent.Parent.Parent ....,添加新参数:

activityBuilderModelItem.Properties [“Properties”]。Collection.Add(new DynamicActivityProperty {     Name =“argumentName”,Type = typeof(InArgument)     });