0

I am trying to create a simple sequential workflow using delayactivity. before that i was using hard coded while loop as per : Custom workflow terminates automatically after some time

but now still i am facing issues with delayactivity. if i set it to say 5 minutes , after 5 minutes it still shows in progress . and after around 7 or 8 minutes it breaks saying 'error occured'. the logs are:

01/05/2016 14:55:26.94  OWSTIMER.EXE (0x1D7C)                       0x1EA0  SharePoint Foundation           Legacy Workflow Infrastructure  88xr    Unexpected  WinWF Internal Error, terminating workflow Id# 3b4df44c-371d-40ee-887e-a2a832e0b3ea a139529d-0046-30d1-cd87-54e48628d436
01/05/2016 14:55:26.94  OWSTIMER.EXE (0x1D7C)                       0x1EA0  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.ITPCWorkflow.ITPCWorkflow.codeActivity2_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.Workflo... a139529d-0046-30d1-cd87-54e48628d436
01/05/2016 14:55:26.94* OWSTIMER.EXE (0x1D7C)                       0x1EA0  SharePoint Foundation           Legacy Workflow Infrastructure  98d4    Unexpected  ...w.ComponentModel.ActivityExecutor`1.Execute(T activity, ActivityExecutionContext executionContext)     at System.Workflow.ComponentModel.ActivityExecutorOperation.Run(IWorkflowCoreRuntime workflowCoreRuntime)     at System.Workflow.Runtime.Scheduler.Run()  a139529d-0046-30d1-cd87-54e48628d436
01

I followed some other blogs for the similar issue , i did change the workflow-service timeout as per these blogs : http://the-simple-programmer.blogspot.ae/2012/10/sharepoint-workflow-delay-activity.html https://technet.microsoft.com/en-us/library/cc424946(v=office.12).aspx

it didn't workout . then I followed other blogs and set the cache.ini to 1 removing all of the xml files . still didn't work.

I am using visual studio 2013, workflow manager is installed , 1 front end development server. i am setting the 'delayactivity' time from properties window this way:'00:05:00'.

delayactivity

its just a 3 stage workflow for testing purpose . first activity sends an email to all members , then it should wait for 5 minutes and send another email after 5 minutes .

I am sure its OWSTIMER process issue . but not able to figure out . please suggest something . thanks

2
  • I marked it as a duplicate of the wrong one of your questions. What is the real difference between this question and this one sharepoint.stackexchange.com/questions/166162/… ? Just so it is clear to us all what the difference is Commented Jan 5, 2016 at 16:16
  • 2
    difference is : in the previous post i created a workflow using hard coded "while loop" and workflow was terminating in the middle. so i used "delay activity" in the same workflow to hold the workflow for a specified time . but it is still giving the same errors and breaking before it completes. Commented Jan 5, 2016 at 16:47

1 Answer 1

0

In your codeActivity2, you probably create an instance of class ADCouncilServiceProvider. According to my understanding, this class needs some special configuration in the .config file of the process running the code. In case of a WF, the hosting process may be:

  • W3WP: in that case, the config file is the famous web.config file.
  • OWSTIMER.EXE (aka SharePoint Timer service): OWSTIMER hosts the code after a Delay activity for example. In that case, the config file is C:\Program Files\Common Files\Microsoft Shared\web server extensions\15\BIN\OWSTIMER.EXE.CONFIG as I stated in Custom workflow terminates automatically after some time. Note: you need to restart the SharePoint Timer service after modifiying that OWSTIMER.EXE.CONFIG file.

[EDIT]
To address your comment about the big picture of your WF:

You have to use a state-machine WF. Maybe with only one main state.

In this main state, at the Init phase, you send emails and create the tasks (I don't see how your x members do approve without tasks ; a task is a communication mean from the users to SharePoint ; you can use other means, but the task is the SharePoint built-in one).

In the Event phase of the state, you listen for two events:

  • first the Delay. Once the delay has expired: email to who you want, and transition to the final state.
  • The other event listens to task modifications: each time a user approves, you check whether all users have approved or not. If they've all approved, email to who you want and transition to final state.
4
  • thank you very much frnd . its working fine if i set to 5 minutes . still a long way to go as it has to wait for 5 days as per my requirement . i will set it for some more time and see what it does . will get back to u . thank u very much once again . Commented Jan 6, 2016 at 9:29
  • OK, thank you for your feedback. As usual: feel free to mark the answer as "accepted", if it helped you for good :) –
    – Evariste
    Commented Jan 6, 2016 at 9:34
  • Ok @Evariste: delayactivity seems to be fine , its working fine if i set it to 1 hour . Commented Jan 6, 2016 at 11:32
  • but my requiremnet as i stated last time:1) send email to all(i m not creating any tasks ,just emailing using code activity) (2) check either members approve,(3) if they approve within 5 days , mail to final approver (4) if dont then email to other person .delayactivity will come in handy to hold it for 5 days . but im gonna need to look every one hour maybe , if all members have taken actions or not . my question is if wf is in the delayactivity for 5 days , its not gonna check for the activities done within that time . and i m using sequential wf sorry for confusion. how can i achieve this. Commented Jan 6, 2016 at 11:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.