本文介绍了Asp.net应用程序的工作流出现错误.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
WorkflowInstance实例= workflowRuntime.CreateWorkflow(type);
遇到错误
堆栈跟踪
WorkflowInstance instance = workflowRuntime.CreateWorkflow(type);
getting an error
Stack trace
[ArgumentException: The input workflow type must be an Activity.
Parameter name: workflowType]
System.Workflow.Runtime.WorkflowRuntime.CreateWorkflow(Type workflowType) +1327127
WorkflowTest._Default.WFInvoke_Click(Object sender, EventArgs e) in F:\WCF\WFLibrary\GuessNumberGameInSequence\WorkflowTest\Default.aspx.cs:50
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +118
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +112
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563
推荐答案
WorkflowInstance instance = workflowRuntime.CreateWorkflow(OBJECT_HERE_OF_ACTIVITY_TYPE); //
我想您只是从这里复制了代码: MSDN:WorkflowInstance [ ^ ],但您需要先定义类型".这里的示例是此处示例的一部分: MSDN:取消工作示例 [ ^ ]
I guess you simply copied code from here: MSDN: WorkflowInstance[^], but you need to first define ''type''. Example here was part of sample present here: MSDN: Cancelling Work sample[^]
这篇关于Asp.net应用程序的工作流出现错误.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!