Windows 工作流延迟活动序列化错误
我有一个在 SharePoint 中托管的状态机工作流,其中一种状态有延迟活动。 当计时器触发延迟活动时,我收到序列化错误:“Engine RunWorkflow: System.Runtime.Serialization.SerializationException: Cannot get the member 'SendEmail_MethodInvoking'”。
此错误引用的方法未处于相同状态,并且当工作流正常调用它时工作正常。
有任何想法吗?
I have a state machine workflow hosted in SharePoint with a delay activity in one state. When the timer fires the delay activity, I get a serialization error: "Engine RunWorkflow: System.Runtime.Serialization.SerializationException: Cannot get the member 'SendEmail_MethodInvoking'".
The method this error references is not in the same state, and works fine when the workflow calls it normally.
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
重新启动“Windows SharePoint 计时器服务”。 根本原因是,只要您的工作流程有延迟活动,该事件就会由服务(SPTimerV3)触发,在触发之前,它必须从其 bin 或 GAC 加载程序集,只有一个文件(模块加载)基于在workflow.xml 文件中指定的程序集信息加载。
更改工作流活动后部署新的二进制文件,SPTimerV3 不知道新添加的二进制文件; 除非您重置时间,否则它不会重新加载。 除非进行重置,否则程序集的持久性(序列化或反序列化)或加载将因类型不匹配而失败。
Restart the “windows SharePoint timer service”. Root cause was, whenever you have workflow that has got a delay activity, the event is fired by the service(SPTimerV3), before it fires, it has to load the assembly from its bin or from the GAC, only one file(module loads) based on the assembly information specified in workflow.xml file loads.
Deploying the new binary after changing the workflow activities, the SPTimerV3 is not aware of the newly added binary; it won’t reload it unless you do a time reset. Unless you do a reset, the persistence (serialization or de-serialization) or loading of assembly would fail due to mismatch of types.