WF4 - 在 asp.net 中显示工作流程图像并突出显示活动
我需要在 ASP.NET 网页中显示文档审批工作流任务的当前状态,并突出显示特定活动。
我已经看到了可视化工作流跟踪器示例(在 wf 和 wcf 示例中),但我有两个问题,
我必须在 asp.net 中而不是在 WPF 应用程序中渲染工作流。
我不需要显示工作流运行的当前状态,所有需要突出显示的活动都是需要用户输入的活动。例如“等待部门主管批准”等。
如果我可以在通过活动 id 突出显示特定活动“创建书签并等待恢复书签”后将工作流程 XAML 转换为 JPG,那么它就可以完成工作。
检查附件中要在 ASP.NET 页面上呈现的所需工作流图像:
I need to display current status of a document approval workflow task in asp.net web page with a specific activity highlighted.
I have seen the Visual workflow tracker example (in wf & wcf samples) but I have two issues,
I have to render workflow in asp.net not in a WPF app.
I don't need to display current status with workflow running, all activities that need to be highlighted are the ones that require user input. e.g. "waiting for approval from department head" etc.
If I could just convert the workflow XAML to JPG after highlighting a specific activity by activity id "that created a bookmark and waiting for resumption the bookmark" it would do the work.
check the attached file for required workflow image to be rendered on asp.net page:
Workflow with current activity highlighted (that is waiting to be resumed)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
首先将工作流程加载到设计器中。
您应该已经知道您想要突出显示的“活动”。工作流程中有选择服务,您可以使用它来选择适当的模型项。此示例显示了单个选择,但也有多个选择。
在工作流程设计器上有一个按钮可以将工作流程复制为图像或类似的内容。此链接将向您展示如何从 WorkflowDesigner.View 获取 jpg。
http://social.msdn .microsoft.com/Forums/en-US/wfprerelease/thread/b781c8df-608a-485a-80e3-a795d800f08d
作为补充说明,您应该查看 Kushals 示例:
http://blogs.msdn.com /b/kushals/archive/2009/12/22/visualworkflowtracking-aka-workflowsimulator.aspx
First load the workflow into the designer.
You should already know the 'activity' you want highlighted. There is selection service in the workflow you can use to select the appropriate model items. This example shows single selection, but there is multiple.
On the workflow designer there is a button to copy workflow as image or something along those lines. This link will show you how to get the jpg from the WorkflowDesigner.View.
http://social.msdn.microsoft.com/Forums/en-US/wfprerelease/thread/b781c8df-608a-485a-80e3-a795d800f08d
As an added note you should check out Kushals example:
http://blogs.msdn.com/b/kushals/archive/2009/12/22/visualworkflowtracking-aka-workflowsimulator.aspx