My little side project is finally ready for others to poke around with:
TextFlow - www.codeplex.com/TextFlow
The main idea behind TextFlow is to allowing authoring of WF programs (workflows) via a language syntax, as opposed to (or, eventually, in addition to) using the drag-and-drop designer. The designer is great for many users, but there are times when a terse language syntax would be useful too.
Here's a (mostly) simple Hello World in TextFlow syntax:
SET x = 10
INPARALLEL
START IF x > 100 THEN [HelloWorld] ENDIF END START IF x < 100 THEN [GoodbyeWorld] ENDIF END
START IF x > 100 THEN [HelloWorld] ENDIF END
START IF x < 100 THEN [GoodbyeWorld] ENDIF END
ENDPARALLEL
This is a slightly gratuitous example that executes a WF ParallelActivity with two IfElseActivity children; the square bracket syntax allows execution of configured external activities (in this case, ones that simply display messages of some sort). You get the idea. The actual generated workflow looks like this:
The project includes an authoring tool that let's you toggle between syntax view and workflow view; workflow view is read-only at this point, but I hope to enable bi-directional updating eventually.
The code is a definite work in progress... it's not much more than prototype quality at this point. So don't expect to launch the space shuttle with it anytime soon, but if you have an interest in any of the following, you might find something worth your trouble:
- using ANTLR-generated lexers and parsers in C# (if you've only ever used lex and yacc, you need to see ANTLRWorks)
- hosting the WF designer in a WinForms app (not sure my code should be reference material for this )
- a real-world use for .NET 3.5 expression trees (very cool stuff)
I'll be blogging more on this in the coming weeks, as I continue to work on the code. For further details, visit www.codeplex.com/TextFlow.
Feedback is welcome and appreciated!
Don't blame my employer(s)... all of this is my fault.