MarkMcDowell
MarkMcDowell

Reputation: 181

Delay not firing when trigger of a pickbranch or in a parallel sequence

I have a workflow, hosted in a workflow service host, that can have one of three paths through a particular section of it. I have created it with a Pick activity that contains three PickBranch activities. Two of the three have a ReceiveSendReply as the trigger, while one has a Delay.

At this point, I can make the workflow continue by calling either of the receives, but if I attempt to let the delay timeout, it never does. I have also tried it in a vanilla parallel activity - again, either of the receives will move the workflow forward, but the delay never times out / triggers.

Everything I've read suggests that it SHOULD work, but it is not. I have looked at the workflow trace logs and I can see that the delay is executing, but it never comes back.

146: Activity [160] "Delay Sequence" scheduled child activity [201] "Delay"
147: Activity [201] "Delay" is Executing
{
    Arguments
        Duration: 00:10:00
}

Is there any other way I can model this. It seems that the Pick should do what I need, but I cannot make it work. For completeness, I have created a very simple application where I modeled this with two receives as triggers of a pick branch, and a delay as the trigger for another, and it WORKS there...

Any help/ideas would be most appreciated. Thanks!

Upvotes: 1

Views: 774

Answers (2)

MarkMcDowell
MarkMcDowell

Reputation: 181

What I found was that I had placed a CorrelationInitializer in the wrong spot, and it appears that it interfered with the Delay's callback mechanism. Once I moved the initializer into the correct spot for what I was doing, the delay started working. Thanks for your input and assistance!

Upvotes: 1

Philip Nelson
Philip Nelson

Reputation: 995

Has the workflow persisted and unloaded? A delay activity would have triggered that, but if you are not running in a service you may have to handle the loading of the workflow on your own because, well it's unloaded.

Upvotes: 0

Related Questions