Workflow Designer Flexibility
I've been testing WWF for very mainstream workflow purposes, but I think a flexible embedded WWF designer in a winform itself could be potentially very useful for, well, many other things as well.
In any case, the example I have in mind is using the WWF designer to create or modify a logical expression (I will need this sort of functionality in the application I'm designing). So here is what I was thinking...
Let me preface all this by saying I realize the WWF designer wasn't probably intended to work this way, but I'm curious as to know exactly what the limits will be for this control.
I thought the benefits of using this would be:
- Because I plan on using the WWF designer in its normal use case (for designing actual workflows on the fly), it might provide a more unified and familiar UI experience to represent it in the same sort of control.
- The expand / collapse part of a logical expression on a node (such as a high level and/or) would be useful in quickly determining the actual meaning of the logical expression
- Easy to parse into a useful data structure for our application
- It might be a intuitive way for users to create such an expression if they did not want to type it directly in, or we determine that for some reason there were syntax pitfalls we could avoid by allowing them to type it in.
For a logical expression such as:
(((a > 10) && (b < 100)) || (c == 0))
you could represent this as a 3-level tree like so:
OR
| \
AND c==0
| \
a>10 b<100
So I'd have a custom "boolean operator" activity node for OR, AND, and NOT. Then I'd have a custom "basic expression" activity node for my "c==0", "a>10", "b<100", etc etc.
Of course, trying to do something like this would take alot of customization to the designer control.
Of the things I think I could do right now (correct me if I'm wrong), I would need to:
- Provide custom designer functionality for each of my activities.
- Have a toolbox of sorts to allow dropping of my custom activies.
Of the things I am unsure I could do but would need or like to do:
- Only view the "SequentialWorkflow" tab (not Exceptions, Events, Compensation).
- Preferable to not have the "begin / start image" (that green button at the top)
- Strongly prefer not have the "terminate / end image" (that red button at the bottom), which means that there would be no lines going to the terminate. This would successfully present the workflow as a tree instead of a start/terminate linear design.
- Change that default drop message in the UI from "Drop Activies Here" and "Drop Activies to create a Sequential Workflow" to be something of my choosing. For instance "Drop Expresion Here".
So am I insane for considering trying something like this? How (im)possible is this to do? Would you highly recommend not doing this or have an alternate suggestion?
Any help or comments appreciated. Thanks an advance.
Mark Doughty

