Workflow exception
I am getting the following error when a custom app hits an event workflow:
Error in the application.Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ServiceModel.FaultException`1[[System.ServiceModel.ExceptionDetail, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]: Error in the application.
Source Error:
Line 62: var bag = new Dictionary<string, string>();
Line 63: bag.Add("ContentType", typeof(Event).FullName);
Line 64: WorkflowManager.MessageWorkflow(eventItem.Id, typeof(Event), null, "Draft", false, bag);
[FaultException`1: Error in the application.]
System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) +14799942
System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) +622
Telerik.Sitefinity.ContentWorkflows.IService.SendMessage(String operationName, Boolean isCheckedOut, Guid workflowDefinitionId, Guid contentId, String providerName, Dictionary`2 contextBag) +0
Telerik.Sitefinity.ContentWorkflows.ServiceClient.SendMessage(String operationName, Boolean isCheckedOut, Guid workflowDefinitionId, Guid contentId, String providerName, Dictionary`2 contextBag) +135
Telerik.Sitefinity.Workflow.WorkflowManager.MessageWorkflow(String wokflowUrl, String operationName, WorkflowDefinition workflowDefinition, Guid contentId, String providerName, Boolean isCheckedOut, Dictionary`2 contextBag) +2788
Telerik.Sitefinity.Workflow.WorkflowManager.MessageWorkflow(Guid itemId, Type itemType, String providerName, String operationName, Boolean isCheckedOut, Dictionary`2 contextBag) +297
SitefinityWebApp.Widgets.CreateEvent.CreateEvent.CreateEventDraft() in c:\inetpub\test\Widgets\SubmitEvents\CreateEvent.ascx.cs:64
SitefinityWebApp.Widgets.CreateEvent.CreateEvent.btnSubmit_Click(Object sender, EventArgs e) in c:\inetpub\test\Widgets\SubmitEvents\CreateEvent.ascx.cs:86
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +155
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3804
Any help is appreciated.
Hi,
As mentioned in the ticket, you need to take a slightly different approach to send the items through the workflow for approval:
var temp = eventsManager.Lifecycle.CheckOut(eventItem);
eventsManager.SaveChanges();
var bag =
new
Dictionary<
string
,
string
>();
bag.Add(
"ContentType"
,
typeof
(Event).FullName);
WorkflowManager.MessageWorkflow(temp.Id,
typeof
(Event), eventsManager.Provider.ToString(),
"SendForApproval"
,
false
, bag);