工作流自定义活动构建工作流参数
假设我有一个具有 2 个依赖属性的工作流程:Prop1、Prop2。
我想创建一个自定义活动,当我拖入工作流程时,它将在设计器的属性网格中显示 Prop1 和 Prop2。
这可能吗?
与 invokeWorkflow 一样,当您选择 TargetWorkflow 时,它会使用工作流的参数填充属性网格,以便您可以绑定。
Let's say I have a Workflow with 2 dependency Property : Prop1, Prop2.
I'd like to create a custom activity that when I drag into the workflow, It will show Prop1 and Prop2 in the property grid in the designer.
Is this possible ?
Like the invokeWorkflow, when you select the TargetWorkflow, it populates the property grid with Parameters of the workflow, so that you can bind.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以尝试这样的操作:
http:// /blogs.microsoft.co.il/blogs/bursteg/archive/2006/10/29/DynamicWorkflowBindingParameters.aspx
我在设计时做了很多深入研究动态创建属性,并且我已经取得了一些成功。
但是,我无法让动态属性显示在实际的属性绑定显示中。因此,您可以在设计器中动态创建属性并设置它们,但您可以设置其他属性以指向动态属性。
这似乎是 Visual Studio 中工作流设计器的限制。我看不出工作流引擎本身无法处理这个问题的原因。
You could try something like this:
http://blogs.microsoft.co.il/blogs/bursteg/archive/2006/10/29/DynamicWorkflowBindingParameters.aspx
I've been doing quite a bit of digging into dynamically creating properties during design time and I've had some success with it.
However, I haven't been able to get dynamic properties to show up in the actual property binding display. So you can create properties dynamically in the designer and set them, but you can set other properties to point to your dynamic properties.
This appears to be a limitation of the workflow designer in visual studio. I can't see a reason why the workflow engine itself can't handle this.
您不需要执行任何操作,默认情况下所有公共属性都显示在属性网格中。
You shouldn't need to do anything, by default all public properties are displayed in the property grid.
如果您像这样定义每个属性,则绑定应该可用:
祝您好运!
If you define each one of your properties like this, the binding should be available:
Good Luck!