使用XAML/Designer的Windows Workflow 4.5动态更新 [英] Windows Workflow 4.5 Dynamic update using XAML / Designer

查看:58
本文介绍了使用XAML/Designer的Windows Workflow 4.5动态更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我了解Windows Workflow Foundation 4.5支持并排和动态更新Workflow定义.我在互联网上发现很少的示例,但是都描述了用于更新工作流的基于代码的方法.我想制作一个可供开发人员用来更新工作流而无需编写代码的实用程序.(仅使用Xaml操作应该是我们的理想情况)

I understand that Windows Workflow foundation 4.5 supports side by side and dynamic update of Workflow definition. I found few samples on internet, but all describes Code based approach for updating the workflow. I wanted to make a utility which is used by developer to update the workflow without coding. (using only Xaml manipulation should be our ideal case)

我的实用程序执行以下操作,

My Utility does the following things,

  • 我从用户那里获取Base Xaml(我想更新的工作流程定义)文件名和程序集(V1).
  • 我通过调用 prepareForUpdate API来准备进行更新.并将其另存为ForUpdate XAML.
  • 我从Visual Studio项目中删除了Base Xaml.
  • 我将更新的Xaml文件(而不是基本xaml)加载到项目中,并修改工作流程.
  • 修改和重建后,我再次打开我的更新实用程序,并从用户那里获取修改后的Xaml(v2)的输入并创建更新映射.
  • 此后,我尝试更新运行中的实例(使用更新映射),那时我的实用程序显示它们已成功更新.
  • 尽管它们已更新,但在运行时会产生不良影响(我在编译位置'a'}上遇到了类似{ ICompiledExpressionRoot的异常,其中 {'a'} 是我的变量),与表达式解析,根等相关.
  • I take Base Xaml (the workflow definition I wanted to update) File Name and Assembly (V1) from User.
  • I prepare it for update by calling prepareForUpdate API. and save it as a ForUpdate XAML.
  • I remove Base Xaml From visual Studio project.
  • I load that updated Xaml File in project (instead of base xaml) ,and modify the workflow.
  • After modification and rebuilding, I again open my update utility and take input from User the modified Xaml (v2) and Create update map.
  • After that I tried to update the running instance (using update map), At that time my utility show that they are updated successfully.
  • Although they are updated but at run time make undesirable effects (I got exception like {ICompiledExpressionRoot for compiled location 'a'}, where {'a'} is my variable) , related to Expression parsing, Root , etc.

有人在尝试达成相同的目标或有什么主意吗?在基于Visual Basic和基于Visual C#的XAML中,我的错误是一致的.

Is anyone trying to achieve same thing or has some idea. my errors are consistent in both Visual Basic and Visual C# based XAML.

推荐答案

虽然我们还没有遇到您的特定方案,但是我们尝试使用动态更新服务来提供与您所描述的解决方案非常相似的解决方案.

While we have not run into your specific scenario we have attempted to use Dynamic Update services to come to a solution much like you describe.

尽管大多数声明性工作流完全在Visual Studio可视编辑器中设计,我们还是放弃了此工具.在大多数情况下,它无法生成更新映射,有时甚至会引发解析异常.

Despite having mostly declarative workflows designed entirely in the Visual Studio visual editor we abandoned this tool. In most cases this it was unable to generate an update map, sometimes even throwing parsing exceptions.

使用它真的感觉并不像它是一个完整的组件,并且即使它发布后经过了很多时间,也缺少有关它的文档,这让我非常警惕考虑将其用于任何用途.

Using it really did not feel like it was a fully completed component and the lack of documentation around it, even after so much time has passed after its release, makes me very wary of considering it for anything.

这篇关于使用XAML/Designer的Windows Workflow 4.5动态更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆