Forum Discussion
SharePoint Workflows: Extend Timeout
- Jun 06, 2018
Craig Lamb SharePoint 2016 uses new workflow engine. You can check the blog post http://www.andrewconnell.com/blog/publishing-custom-events-to-sharepoint-2013-workflowson how to use Custom Events for Long Running External Processes.
Currently our workflows are quite minimal. They are essentially just a queue of Actions to be performed in a desired order.
So, is the idea to...
1. Create the event and wrap all the Action processing in it.
2. Then call it from the workflow so that it all this processes is executed outside of WF.
3. Then once completed WF advances to the next step.
Is the difference in that this will move the processing from the WF to the Service or site?
Craig Lamb If you look at the code published by Andrew Connell https://code.msdn.microsoft.com/officeapps/SharePoint-2013-Route-25a25d87, all your questions will be cleared. I am adding a couple of screenshots for your reference. Please let me know if you still have questions. Thanks.
- Craig LambJun 07, 2018Copper Contributor
Thanks. I'll take a look.
- Craig LambJun 08, 2018Copper Contributor
I went through and looked at this yesterday. I am struggling with a few things.
The example doesn't have any CS files so I am unable to following in the code.
Our workflow is fully from Visual Studio so we don't use SharePoint designer for much.
I have also looked at the following link...
https://roykim.ca/2013/08/17/sharepoint-2013-workflow-integration-with-the-waitforcustomevent-activity/
I was able to create 'Workflow Custom Activity' and add a wait action; however, I was unable to determine how to call from Visual Studio or integrate with my existing SharePoint workflow in Visual Studio. I was able to determine that though the following is provided...
stsadm -o setproperty -pn workflow-eventdelivery-timeout -pv "30"
It's not honored. I changed the value to 60 and it only allowed the WF to run for about 20 minutes.
I am currently thinking that I need to create a 'Workflow Custom Activity' but I don't see how to tie it to my existing workflows. If I can't, and it's something I call from my client that's fine. However, that will result in some hefty code changes. Currently trying to just create the 'Workflow Custom Activity' place the WaitEvent on it and then call and see if it hits the break points I desire.
- Devendra VelegandlaJun 09, 2018Brass Contributor
SharePoint 2013 or SharePoint 2016 Workflows are declarative but you can make web service calls from these workflows to execute the code.
You need to double-click on each state in the workflow to know more it. This app user association form. I am adding few screenshots for your reference.
Here you can see how the delay activity was added. The last screenshot you can see how the HTTP activity used to make a call to external web service.
You can create a custom workflow activity using visual studio and it will be available automatically in the toolbox as part of the solution. Please let me know if you still have questions. Thanks.