在设计时设置复合 WF4 活动的内部属性
我想创建一个复合 Windows 工作流活动(在 .NET 4 下),其中包含预定义的 ReceiveAndSendReply 活动。有些属性是预定义的,但其他属性(特别是 ServiceContractName)需要在设计器中设置。
我可以将其实现为活动模板(与实现 ReceiveAndSendReply 的方式相同),但我宁愿不这样做。如果我稍后更改模板,我必须手动更新所有以前创建的工作流程。模板还允许其他开发人员更改应修复的属性。
有没有办法从 Xaml 活动中执行此操作?我还没有找到将参数值分配给嵌入活动的属性的方法。如果没有,您会建议什么技术?
I want to create a composite Windows Workflow Activity (under .NET 4) that contains a predefined ReceiveAndSendReply Activity. Some of the properties are predefined, but others (particularly ServiceContractName) need to be set in the designer.
I could implement this as an Activity Template (the same way ReceiveAndSendReply is implemented), but would rather not. If I later change the template, I'd have to update all previously created workflows manually. A template would also permit other developers to change properties that should be fixed.
Is there a way to do this from a Xaml Activity? I have not found a way to assign an Argument value to a property of an embedded Activity. If not, what technique would you suggest?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我还没有使用复合 XAML 活动来完成此操作,并且在尝试时遇到一些错误,但通过 NativeActivity 这样做是没有问题的。请参阅下面的示例代码。
I haven't done this using a composite XAML activity and am getting some errors when I try but doing so through a NativeActivity is no problem. See the example code below.