I have created a state machine workflow in Visual Studio 2013.
- initial stage: it sends an email to some members.
- second stage : it should wait for 5 days until all of the users take actions.
- third stage : an email should go to final approver once all of the members approve/ take action on the item.
If the workflow is set for 10 minutes or 20 minutes, it works fine and sends an email to next person. But when I increase the time to like 30 minutes or an hour it breaks.
I am using a hard coded while loop to hold the workflow for certain time ,
duedate = datetime.now.addminutes(30.0);
while(ispending == false)
{
if(datetime.now > duedata)
{
ispending = true;
}
}
the logs that I am getting:
system account : an error has occured.
01/03/2016 19:45:49.11 OWSTIMER.EXE (0x3D84) 0x6238 SharePoint
Foundation Monitoring aeh57 Medium Sql Ring buffer status eventsPerSec
= ,processingTime=0,totalEventsProcessed=0,eventCount=0,droppedCount=0,memoryUsed=0
01/03/2016 19:45:49.23 OWSTIMER.EXE (0x3D84) 0x2514 SharePoint
Foundation Legacy Workflow Infrastructure 88xr Unexpected WinWF
Internal Error, terminating workflow Id#
e4e4d4d4-3606-418e-8403-399de7225f44
74a5519d-d047-30d1-cd87-5ff3ad9c69b8 01/03/2016 19:45:49.24
OWSTIMER.EXE (0x3D84) 0x2514 SharePoint Foundation Legacy Workflow
Infrastructure 98d4 Unexpected System.TypeInitializationException: The
type initializer for 'ADCouncil.Core.ADCouncilServiceProvider' threw
an exception. ---> System.Exception: Failed to Open ADCouncil
configuration section. nsure that your configuration is properly set.
at ADCouncil.Core.ADCouncilServiceProvider.LoadConfig() at
ADCouncil.Core.ADCouncilServiceProvider..ctor() at
ADCouncil.Core.ADCouncilServiceProvider..cctor() --- End of inner
exception stack trace --- at
ITPCWorkFlow_ITPC.ITPCWorkflow.ITPCWorkflow.codeActivity1_ExecuteCode(Object
sender, EventArgs e) at
System.Workflow.ComponentModel.Activity.RaiseEvent(DependencyProperty
dependencyEvent, Object sender, EventArgs e) at
System.Workflow.Activities.CodeActivity.Execute(ActivityExecutionContext
executionContext) at System.Wo... 74a5519d-d047-30d1-cd87-5ff3ad9c69b8
01/03/2016 19:45:49.24* OWSTIMER.EXE (0x3D84) 0x2514 SharePoint
Foundation Legacy Workflow Infrastructure 98d4 Unexpected
...rkflow.ComponentModel.ActivityExecutor`1.Execute(T activity,
ActivityExecutionContext executionContext) at
System.Workflow.ComponentModel.ActivityExecutorOperation.Run(IWorkflowCoreRuntime
workflowCoreRuntime) at System.Workflow.Runtime.Scheduler.Run()
74a5519d-d047-30d1-cd87-5ff3ad9c69b8 01/03/2016 19:45:49.25
OWSTIMER.EXE (0x3D84) 0x2514 SharePoint Foundation Upgrade ajyw6 High
01/03/2016 19:45:49.25 OWSTIMER (0x3D84) 0x2514 SharePoint Foundation
Upgrade SPHierarchyManager ajyw6 DEBUG [SPTree Value=SPSite
Url=http://srumos08/departments/ITPC] added to dependency cache by
lookup 74a5519d-d047-30d1-cd87-5ff3ad9c69b8
74a5519d-d047-30d1-cd87-5ff3ad9c69b8 01/03/2016 19:45:49.26
OWSTIMER.EXE (0x3D84) 0x2514 SharePoint Foundation Upgrade ajyw6 High
01/03/2016 19:45:49.26 OWSTIMER (0x3D84) 0x2514 SharePoint Foundation
Upgrade SPHierarchyManager ajyw6 DEBUG [SPTree Value=SPSite
Url=http://srumos08 added to dependency cache by lookup
74a5519d-d047-30d1-cd87-5ff3ad9c69b8
74a5519d-d047-30d1-cd87-5ff3ad9c69b8 01/03/2016 19:45:49.32
OWSTIMER.EXE (0x3D84) 0x2514 SharePoint Foundation Monitoring b4ly
Medium Leaving Monitored Scope (WorkflowTelemetryScope). Execution
Time=1186.82702689867 74a5519d-d047-30d1-cd87-5ff3ad9c69b8 01/03/2016
19:45:49.33 OWSTIMER.EXE (0x3D84) 0x2514 SharePoint Foundation
It is pointing to one DLL which I am using to retrieve the users from Active directory. But the same DLL works if I set it for 5 to 20 minutes but not more than that.
- Is there any service which is trying to restart the workflow?
- Is there something I am missing?
- Is the hard coded while loop the reason that it is not holding the workflow for that amount of time?