views:

27

answers:

2

I'm evaluating whether WF would be a good fit for a design I'm working on. I'm in that chicken-and-egg conundrum where I don't want to invest too much time in learning all the details until I have a good idea that it's going to be suitable.

The one thing that I can't seem to find much on that could be significant is scheduling. And by that I mean scheduling of activities to start at a certain time.

E.g. I have a workflow that, on starting, executes the first two activities - but then must wait until, say, 9am the next day before continuing.

I realise I could achieve the same effect by splitting this into two workflows - with the second triggered by, say, a scheduled task. But that would lose much of the benefits of having workflows in the first place - such as seamless persistence of state between activities and guaranteed ordering.

So is there a way to achieve this in a single workflow? Preferably built in to WF (e.g. a WaitUntil activity) - but an alternative might be that the workflow sleeps until recieving an external prod.

+1  A: 

A Delay activity where you calculate the duration will do that just fine.

Maurice
I had been thinking about that. So can that be used to work the workflow up at the right time?
Phil Nash
Yes, but it depends a bit on your hosting scenario as well. Using a workflow service hosted in the AppFabric makes things easiest. Using the WorkflowApplication you are responsible to make sure it is loaded and ready to run.
Maurice
We would be hosting it ourselves. Thanks for your help.
Phil Nash
With Appfabric I was referring to Windows Server AppFabric not the Azure version which doesn't include workflow at the moment. So you still need to host it yourself.
Maurice