重新托管 WF4 设计器 - 如何保存和执行通过重新托管的设计器创建的工作流程

发布于 2024-08-18 02:44:40 字数 529 浏览 1 评论 0原文

我正在寻找有关在集成解决方案中使用 Windows Workflow 4 的一些说明 - 特别是关于重新托管设计器和执行由例如创建的工作流程。商业用户。

目的是创建所需的自定义活动并将其编译到 dll 中,然后使用重新托管的设计器进行部署,从而允许业务用户创建/配置使用这些活动的工作流程 - 然后业务用户会将工作流程另存为XAML,可以存储在应用程序已知的位置(数据库、文件系统等),然后当应用程序需要执行工作流时,可以使用 XamlServices.Load 从特定位置加载工作流并将其作为 DynamicActivity 执行?

如何保存工作流程,以便稍后可以使用属性和其他配置值重新序列化?我尝试反序列化从设计器中保存的 Xaml 文件,并使用 XamlServices.save()。

使用书签/持久性是否存在任何潜在问题?

作为一个相关的问题,是否有任何简单的方法可以在工作流程中“返回”,而无需在每个流程图元素上定义返回分支?我正在考虑将工作流程与 UI 集成,以便用户输入响应,wf 将处理该响应,并根据输入做出决策。通过 UI,用户应该能够“返回”到之前的输入。

I'm looking for some clarity with regards to the use of Windows Workflow 4 in an integrated solution - specifically with regards to rehosting the designer and executing workflows created by eg. a business user.

Is the intention that the required custom activities are created and compiled into a dll, which is then deployed with the rehosted designer, allowing the business user to create/configure workflows that make use of these activities - the business user would then save the workflow as XAML, which can be stored in a location known to the application (database, filesystem etc.), and then when it is necessary for the application to execute a workflow, it can use XamlServices.Load to load the workflow from the specific location and execute it as a DynamicActivity?

How is the workflow saved so that it can later be reserialized with properties and other configuration values? I've tried deserializing a Xaml file saved out of the designer, and also using XamlServices.save().

Are there any potential issues here with using bookmarks/persistence?

As a related question, is there any easy way to "Go back" in a workflow, without defining return branches on every flowchart element? I'm looking at integrating a workflow with a UI for a user to enter responses, which the wf will process, and make decisions based on the input. Through the UI, the user should be able to "Go Back" to a previous input.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

情徒 2024-08-25 02:44:40

您可以使用 ActivityXamlServices.Load(path) 加载 XAML 文件。它将返回一个 Activity,实际上是一个 DynamicActivity,您可以使用 WorkflowApplication 来运行它。

请参阅我的博客文章举个例子。

You can use the ActivityXamlServices.Load(path) to load a XAML file. It will return an Activity, actually a DynamicActivity, and you can use a WorkflowApplication to run it.

See my blog post for an exmple.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文