Dear experts,
I'm working on SharePoint 2013 with Workflow manager 1.0. I developed a workflow and customized its initialization form. When I click the 'Start' button try to start the workflow, I got an error like below picture.
It looks like a timeout problem, because after about 3 minutes I could receive the email from this workflow and see tasks created, in most cases. After investigated the log file, I found the error message below:
System.TimeoutException: The HTTP request has timed out after 20000 milliseconds. --->
System.Net.WebException: The request was aborted: The request was canceled.
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at Microsoft.Workflow.Client.HttpGetResponseAsyncResult`1.OnGotResponse(IAsyncResult result) --- End of inner exception stack trace ---
at Microsoft.Workflow.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
at Microsoft.Workflow.Client.HttpGetResponseAsyncResult`1.End(IAsyncResult result)
at Microsoft.Workflow.Client.ClientHelpers.SendRequest[T](HttpWebRequest request, T content)
at Microsoft.Workflow.Client.WorkflowManager.StartInternal(String workflowName, WorkflowStartParameters startParameters)
at Microsoft.SharePoint.WorkflowServices.FabricWorkflowManagementClient.StartInstance(String serviceGroupName, String workflowName, String monitoringParam, String activationKey, IDictionary`2 payload)
at Microsoft.SharePoint.WorkflowServices.FabricWorkflowInstanceProvider.StartWorkflow(WorkflowSubscription subscription, IDictionary`2 payload)
at Microsoft.SharePoint.WorkflowServices.FabricWorkflowInstanceProvider.StartWorkflowOnListItem(WorkflowSubscription subscription, Int32 itemId, IDictionary`2 payload)
at Microsoft.SharePoint.WorkflowServices.WorkflowInstanceServiceServerStub.StartWorkflowOnListItem_MethodProxy(WorkflowInstanceService target, XmlNodeList xmlargs, ProxyContext proxyContext)
at Microsoft.SharePoint.WorkflowServices.WorkflowInstanceServiceServerStub.InvokeMethod(Object target,String methodName, XmlNodeList xmlargs, ProxyContext proxyContext, Boolean& isVoid)
at Microsoft.SharePoint.Client.ServerStub.InvokeMethodWithMonitoredScope(Object target, String methodName, XmlNodeList args, ProxyContext proxyContext, Boolean& isVoid)
at Microsoft.SharePoint.Client.ClientMethodsProcessor.InvokeMethod(Object obj, String methodName, XmlNodeList xmlargs, Boolean& isVoid)
at Microsoft.SharePoint.Client.ClientMethodsProcessor.ProcessMethod(XmlElement xe)
at Microsoft.SharePoint.Client.ClientMethodsProcessor.ProcessOne(XmlElement xe)
at Microsoft.SharePoint.Client.ClientMethodsProcessor.ProcessStatements(XmlNode xe)
at Microsoft.SharePoint.Client.ClientMethodsProcessor.Process() cd74089d-dccf-00d5-5477-49b5118fe560
RequestMessage:
<Request xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009" SchemaVersion="15.0.0.0" LibraryVersion="15.0.0.0" ApplicationName="Javascript Library">
<Actions>
<Method Name="GetExternalVariable" Id="16" ObjectPathId="12">
<Parameters>
<Parameter Type="String">Approvers</Parameter>
</Parameters>
</Method>
<Method Name="GetExternalVariable" Id="17" ObjectPathId="12">
<Parameters>
<Parameter Type="String">Days</Parameter>
</Parameters>
</Method>
<ObjectPath Id="19" ObjectPathId="18" />
<Method Name="StartWorkflowOnListItem" Id="20" ObjectPathId="18">
<Parameters>
<Parameter ObjectPathId="12" />
<Parameter Type="String">22</Parameter>
<Parameter Type="Dictionary">
<Property Name="Approvers" Type="String">i:0#.w|nnitcorp\xrdu</Property>
<Property Name="Microsoft.SharePoint.ExternalVariable.Approvers" Type="String">i:0#.w|nnitcorp\xrdu</Property>
<Property Name="Days" Type="String">5</Property>
<Property Name="Microsoft.SharePoint.ExternalVariable.Days" Type="String">5</Property>
</Parameter>
</Parameters>
</Method>
</Actions>
<ObjectPaths>
<Identity Id="12" Name="50e607f0-ceab-4a8c-90c5-81e2f2ba78d9:aa3d1bb1-680e-413a-8dc1-281746512b32" />
<Method Id="18" ParentId="8" Name="GetWorkflowInstanceService" />
<Constructor Id="8" TypeId="{4ccc7f0e-bf7e-4477-999c-6458a73d0039}">
<Parameters>
<Parameter ObjectPathId="6" />
</Parameters>
</Constructor>
<Property Id="6" ParentId="4" Name="Web" />
<StaticProperty Id="4" TypeId="{3747adcd-a3c3-41b9-bfab-4a64dd2f1e0a}" Name="Current" />
</ObjectPaths>
</Request>
This confirms that this error is a timeout error. But I didn't find any document stating where to adjust this timeout setting. Does anyone know about it?
Further, I found if I repeat starting the workflow for 2 or 3 times, it becames very fast. I guess it is related with some cache setting or IIS host setting. The setting contols after a while if no request to the workflow manager, the cache of this service will be released.
If no way to adjust the timeout of workflow start request, nor adjust the cache duration of workflow manager, is ther anyway to simulate a request to the workflow manager and I could use a PowerShell script to 'activate' it, for instance every 10 minutes?
Thank you very much.