如何恢复:工作流设计器遇到文档问题 [英] How to recover from : Workflow Designer encountered problems with your document

查看:26
本文介绍了如何恢复:工作流设计器遇到文档问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

作为工作流的新手,我创建了一个工作流(在 VS2010 工作流设计器中),其中包含一个我有一个 writeline 活动的序列.我正在尝试为工作流创建参数,因此我在参数窗格中创建了 2 个参数,而无需在活动级别对它们进行任何操作.(值得注意的是,我还没有掌握如何在工作流程中使用参数).但是,我保存了我的工作流程,而工作流程没有显示任何可见的错误(带有感叹号的红色圆圈).下次打开工作流程时出现错误:

As a novice with workflows I create a workflow (in VS2010 workflow designer) with a sequence within which I have a writeline activity. I am experimenting with creating arguments for the workflow so I create 2 arguments in the argument pane w/o doing anything with them at the activity level. (Noteworthy that I dont have a grasp of how to use arguments in the workflow yet). However I save my workflow while the workflow does not show any visible errors( red circles with an excalmation mark). Next time I open the workflow I get the error :

工作流设计器在处理您的文档时遇到问题.请检查文档中的无效内容、命名空间、引用或引用循环.

Workflow Designer encountered problems with your document . Please check the document for invalid content, namespaces,references, or reference loops.

这似乎是最终的结果,因为我无法访问我的原始工作流程来纠正我的错误(无论它们是什么).当我单击详细信息向下箭头时,我看到:Could not find member 'a' in type _8684 .

And that seems so final because there is no way that I can have access to my original workflow to possibly correct my error (whatever they might be). when I click on the detail down arrow I see this: Could not find member 'a' in type _8684 .

a 是我在工作流中使用的两个 int32 参数之一,但我从未在任何活动中使用过.

a is one of the two int32 arguments that I had in the workflow but which I never used in any of the activities.

我将不胜感激.提前致谢.

I would appreciate any help. Thanks in advance.

推荐答案

您似乎正在尝试重新托管您的工作流设计器,但它没有为您生成正确的 XAML.

It seems you're trying to re-host your Workflow Designer and it's not generating correct XAML for you.

错误<代码>找不到成员如果工作流设计器实例直接加载容器活动(序列、流程图等),而不是首先使用 ActivityBuilder,则通常会发生 in type .

如果您已经在使用 ActivityBuilder,那么您可能没有为它提供根活动命名空间.添加System.Activities.Presentation.WorkflowDesigner的正确方法是:

If you're already using an ActivityBuilder then you may have missed giving it the root activity namespace. The correct way to add System.Activities.Presentation.WorkflowDesigner is:

this.workflowDesigner = new WorkflowDesigner();
this.workflowDesigner.Load(new ActivityBuilder { Implementation = new Sequence(),
                                                 Name = "RootNamespace.RootActivity" });

正确设置 Name 后,WF 设计器将停止使用随机类型(如您的案例中的 _8684)并在保存/序列化时生成正确的 XAML.这应该可以帮助您摆脱命名空间错误.

With the Name set properly WF designer would stop using random types (like _8684 in your case) and generate correct XAML on save/serialization. This should help you get rid of the namespace errors.

这篇关于如何恢复:工作流设计器遇到文档问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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