实现执行异步操作的自定义 Windows 工作流活动
我在弄清楚如何最好地实现这一点时遇到了一些概念上的问题...我想为 Windows 工作流创建一个自定义活动类。 该活动必须调用第三方库方法,该方法本身异步运行另一个进程,并且可能需要几秒钟到几个小时才能完成。 该库使我能够轮询方法结果或订阅指示其完成的事件。 在我的非工作流应用程序中,我通常只订阅该事件,但这在工作流情况下似乎不合理。 我也不确定如何最好地实施轮询方案。 有人可以推荐一些类似问题的指示吗?
I'm having some conceptual trouble on figuring out how to best implement this... I want to create a custom Activity class for Windows Workflow. The activity has to call out to a third party library method that itself runs another process asynchronously and may take anywhere from seconds to many hours to complete. This library offers the ability for me to either poll for the method result or to subscribe to an event that indicates its completion. In my non-workflow apps, I typically just subscribe to that event, but that doesn't seem to be reasonable in the workflow case. I'm also not sure exactly how to best implement a polling scheme. Can someone recommend some pointers to similar problems?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Kirk Allen Evans 写了一篇有趣的
Kirk Allen Evans wrote an interesting blog about this with some pretty good code examples.