About
I’m a software architect at Microsoft. I live in Pacific Northwest with my wife and our two daughters.
I love to read and write both – code and music.
I love to play guitar, especially the Blues. I love to listen to music, especially the Blues. I like Clapton, Jeff Beck, BB, and Steve Vai, among others.
Recently, I’ve developed love for long distance running — and it has already begun to influence my perspective on life.
Essential Windows Workflow Foundation
Hello!
I want to thank you for your great job. It was a great pleasure to read Essential Windows Workflow Foundation, especially the first chapter. Do you have any source code for the book?
Maxim
7 Feb 10 at 10:04 pm
Hi Dharma,
First of all I would like to thank you for writing an excellent text “Essential Windows Workflow Foundation” (and of course for your contribution in the framework itself).
I wanted to point you to a little correction that you may consider making in the text. I have been writing custom activities using the bookmark scheme you have explained in the text. Up until now everything was working perfectly fine, till I decided to use ReplicatorActivity. I tried to add one of my custom activity to replicator activity. It caused queue management problem because as per text’s example queue is created in Initialize method with the name of activity and destroyed in Uninitialize method. Now with multiple iteration of same activity (with same name), this scheme fell apart. I suggest that you may include the correction in the next version and tell readers, the importance of having a unique id for the queue name. Following is a corrected version
class MyCustomActivity : Activity
{
private IComparable queueName = null;
protected override void Initialize(IServiceProvider
provider)
{
base.Initialize(provider);
WorkflowQueuingService queueService =
provider.GetService(typeof(WorkflowQueuingService))
as WorkflowQueuingService;
queueName = Guid.NewGuid();
queueService.CreateWorkflowQueue(queueName, true);
}
protected override void Uninitialize(IServiceProvider
provider)
{
base.Uninitialize(provider);
WorkflowQueuingService queueService =
provider.GetService(typeof(WorkflowQueuingService))
as WorkflowQueuingService;
queueService.DeleteWorkflowQueue(queueName);
}
}
Prakash
16 Jun 10 at 12:36 am