ID 为“xxxxx”的工作流程 在状态持久存储中找不到
我有一个工作流应用程序,当我尝试使用ExternalDataExchangeService 调用事件时,它会引发错误。
在状态持久性存储中找不到 ID 为“866568ab-ca1b-4404-a2f1-2c8704539ef4”的工作流。
无法传递实例 ID“866568ab-ca1b-4404-a2f1-2c8704539ef4”的接口类型“RecipeChangeService.IRecipeChangeService”上的事件“QAEngOrTLReject”。
这是我的实现代码 - 请帮助我被困:(
下面是接口和数据交换事件参数 -
public class RecipeChangeService : IRecipeChangeService{
#region IRecipeChangeService Members
public event EventHandler QAEngOrTLApprove;
public event EventHandler QAEngOrTLReject;
public bool QAEngOrTLApproved(Guid instanceId, ResponseDataObject rdo) {
if (QAEngOrTLApprove != null) {
QAEngOrTLApprove(this, new XMESWFRecipeResponseDataEventArgs(rdo, instanceId));
return true;
}return false;
}
public bool QAEngOrTLRejected(Guid instanceId, ResponseDataObject rdo) {
if (QAEngOrTLReject != null) {
QAEngOrTLReject(this, new XMESWFRecipeResponseDataEventArgs(rdo,instanceId));
return true;
} return false;
}
}
[Serializable]
public class XMESWFRecipeResponseDataEventArgs : ExternalDataEventArgs {
public readonly ResponseDataObject rdo = null;
public XMESWFRecipeResponseDataEventArgs(ResponseDataObject rdo, Guid instanceId)
: base(instanceId)
{
this.rdo = rdo;
}
}
该事件是使用引发的 -
IRecipeChangeService s =
ExceptionServices.GetExceptionService(WorkflowExceptionType.RecipeChange)
as IRecipeChangeService;
s.QAEngOrTLApproved(new Guid(instanceId), rdo);
谢谢。
I have a workflow application which throws error when i try to invoke a event using ExternalDataExchangeService.
Workflow with id "866568ab-ca1b-4404-a2f1-2c8704539ef4" not found in state persistence store.
Event "QAEngOrTLReject" on interface type "RecipeChangeService.IRecipeChangeService" for instance id "866568ab-ca1b-4404-a2f1-2c8704539ef4" cannot be delivered.
Here is my implementation code for it - Please help I am stuck :(
Below is the interface and data exchange event args -
public class RecipeChangeService : IRecipeChangeService{
#region IRecipeChangeService Members
public event EventHandler QAEngOrTLApprove;
public event EventHandler QAEngOrTLReject;
public bool QAEngOrTLApproved(Guid instanceId, ResponseDataObject rdo) {
if (QAEngOrTLApprove != null) {
QAEngOrTLApprove(this, new XMESWFRecipeResponseDataEventArgs(rdo, instanceId));
return true;
}return false;
}
public bool QAEngOrTLRejected(Guid instanceId, ResponseDataObject rdo) {
if (QAEngOrTLReject != null) {
QAEngOrTLReject(this, new XMESWFRecipeResponseDataEventArgs(rdo,instanceId));
return true;
} return false;
}
}
[Serializable]
public class XMESWFRecipeResponseDataEventArgs : ExternalDataEventArgs {
public readonly ResponseDataObject rdo = null;
public XMESWFRecipeResponseDataEventArgs(ResponseDataObject rdo, Guid instanceId)
: base(instanceId)
{
this.rdo = rdo;
}
}
The event is raised using -
IRecipeChangeService s =
ExceptionServices.GetExceptionService(WorkflowExceptionType.RecipeChange)
as IRecipeChangeService;
s.QAEngOrTLApproved(new Guid(instanceId), rdo);
Thanks .
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
帮我们一个忙,请确保代码可读。
找不到工作流程的原因可能有多种。 首先,如果没有持久性服务并且工作流程不在内存中,您也会看到此错误。 另一件要检查的事情是工作流程是否尚未完成。 这可能是由于某些其他事件或未处理的错误造成的。
Do us a favour and please make sure the code is readable.
There can be a number of reasons the workflow cannot be found. First of all you will also see this error if there is no persistence service and the workflow isn't in memory. Another thing to check is if the workflow hasn't completed yet. This can be either as the result of some other event or because of an unhandled error.