Search code examples
persistenceworkflow-foundation-4delayresume

How to Resume the Persisted Workflow with Delay Activity without Reloading into memory


How to Resume the Persisted Workflow with Delay Activity without Reloading into memory:

I am creating a workflow for leave application. My requirement is if any participant is not responded in the specified time, then the request needs to pass to next level participant approval.

Suppose a requester submitted a Leave Request and the Team Lead needs to approve it within 7 days. If the Team Lead is not responded in 7 days, then automatically it has to go to Manager Approval. In general to achieve this, we will write a Windows service which is checking periodically and send the notifications once the period is elapsed.

But I want to achieve without writing the Windows service. Is there any possibility in WF4.0.

I am trying like this, once the requester is submitted the request then I am showing the request in the participant mail box and persisting the workflow. Once the participant responded I am resuming the workflow (because I am saving the workflow instance ID) and passing the participant response for further workflow execution.

In this if the participant is not responded, how to escalate / send the request to manager without using windows service.

Is it possible to do with anything with the Delay Activity?


Solution

  • If you create a workflow service it is hosted in the WoskflowServiceHost and this periodically checks is there are expired timers and resumes those.