持久活动在 wf4 工作流程中失败
我在 wf4 中保留工作流程时遇到问题。
我无法使用保留活动来保留工作流程。 我也无法从已注入工作流的类中包含的方法中保留工作流,然后使用 InvokeMethod 活动从工作流内部调用该工作流
如果我这样做:
workflowApp = new WorkflowApplication(new actBTX(), inParams);
workflowApp.Run();
workflowApp.Persist();
在创建工作流的工厂方法中,我可以看到工作流持续存在。
我已经使用以下命令测试了我的工作流程,看看我是否处于 NoPersistZone 中:
var prop = context.Properties.Find("System.Activities.NoPersistProperty");
IsInNoPersistScope.Set(context, prop != null);
看来我不是。
事实上,当我在工作流程“外部”时,我可以坚持下去,这一事实表明,这不是工作流程中的变量类型的问题。
当持久性失败时,如果我使用 Persist 活动,整个工作流程就会停止。 方法调用抛出异常:
Exception: The operation did not complete within the allotted timeout of 00:02:00
有什么想法吗?
I am having a problem Persisting a workflow in wf4.
I cannot persist the workflow using the Persist Activity.
Nor can I persist the workflow from a method contained in a class I have injected into the workflow which I then call from inside the workflow using an InvokeMethod activity
If I do:
workflowApp = new WorkflowApplication(new actBTX(), inParams);
workflowApp.Run();
workflowApp.Persist();
in the factory method that creates the workflows then I can see the workflow persist.
I have tested my workflows to see if I am in a NoPersistZone using:
var prop = context.Properties.Find("System.Activities.NoPersistProperty");
IsInNoPersistScope.Set(context, prop != null);
and it seems I am not.
The fact that I can persist when I am 'outside' the workflow suggests to me that it is not a problem with the variable types that are in the workflow.
When persistence fails it stops the whole workflow dead if I use the Persist activity.
The method call throws an exception:
Exception: The operation did not complete within the allotted timeout of 00:02:00
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好的,我们解决了。
有一个数据对象不能很好地序列化。
当 Persist 击中它时,它会默默地崩溃(这是一件坏事)。
我们怀疑工作流程App.Persist()有效,因为工作流程在这段时间没有完全初始化
Ok We worked it out.
There is a data object that doesn't serialise nicely.
When Persist hits it it crashes silently (which is a bad thing).
We suspect that workflowApp.Persist() works because the workflow is not fully initialized in the time between