Workflow exception

Posted by Community Admin on 04-Aug-2018 18:14

Workflow exception

All Replies

Posted by Community Admin on 23-Mar-2015 00:00

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=, 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.

Posted by Community Admin on 26-Mar-2015 00:00


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);
           var bag = new Dictionary<string, string>();
           bag.Add("ContentType", typeof(Event).FullName);
           WorkflowManager.MessageWorkflow(temp.Id, typeof(Event), eventsManager.Provider.ToString(), "SendForApproval", false, bag);

First, create a temp item by checking out the master and then use it to message the workflow. And for the workflow call itself the operation should be "SendForApproval".

Atanas Valchev
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items

This thread is closed