Antoine Meltzheim
Antoine Meltzheim

Reputation: 9934

How to restart or resume an activity after a time out delay with WorkflowServiceHost and AppFabric?

Working on a long running workflow, hosted with WorkflowserviceHost, Win Server 2008 R2. Recently discovered that appFabric is of great help for things like management of workflow instances resumption, idle instances, faileds ones etc.

Got a basic sequence activity : It sends a mail asking for an approval then follows a 'Receive and send' to receive the response. This last activity allows automatic persistence in persistence store. (Which is a great feature !). (This sequence also uses content correlation based on workflow instance Guid.)

Now i'm sort of stuck, because I need to restart sequence (send e-mail) after a few days delay, if approver didn't send the message to the 'receive and send' activity.

My question is : How to implement the delay timer ? Using a pick branch next to the 'receive and send' with a 'while' control-flow in the flowchart ? (Or a parallel activity ? )

Is there something to configure in AppFabric ? Will I find this information going further on AppFabric documentation (r. jacobs videos) ? Have you got a neat example somewhere ?

Upvotes: 3

Views: 1473

Answers (1)

Maurice
Maurice

Reputation: 27632

The basic approach is to use a Pick activity with a branch containing a Delay as a timeout trigger. If the appropriate message is received in the Receieve all is fine. If not the Delay fires, does its work and cycles back to the top of the Pick.

Upvotes: 3

Related Questions