I've had a bit of time this week to dive into WF (formerly WWF... he he). I'm very interested in utilizing this both professionally and personally. In my experience, a HUGE amount of the software I interact with and write deals with workflow. I need more than one hand to count the pieces of software I deal with at work that attempt to give the user a design surface to create workflow on. Most of them fail pretty miserably. That's why I was delighted that the WF designer was so extensible and reusable.
After orienting myself with the concepts of WF, I set out to extend the base SequentialWorkflow to wrap some custom behavior around the execution of the workflow. I immediately ran into problems. It seems that if you inherit from SequentialWorkflow, the project immediately thinks you are going to use the designer to create a workflow, rather than build a base type that will be used to build workflows in other projects. It immediately starts throwing around validation messages like:
Activity 'BlahBlahBlah' validation failed: Property 'ID' not set.
Well, of course it's not set, I'm not even remotely trying to create one yet. So, I add the following brain-dead code in the constructor:
if (this.DesignMode) { this.ID = "FakeID"; }
if (this.DesignMode) {
this.ID = "FakeID";
}
This gets rid of the validation error, but now it gripes that my class is not partial, so I slap a partial modifier on it and let it go. Finally, it compiles.
Once I figure that out, I'm golden and things run fairly smoothly.
Remember Me
Page rendered at Thursday, August 28, 2008 9:45:44 PM (Pacific Standard Time, UTC-08:00)
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.