Since there are many questions about a state machine automata in VL and the recent prototype patched in VL, I was looking into which options the C#/.NET world has to offer and found a crazy system that everyone seems to have on their windows pc already. Its’s called Windows Workflow Foundation and is usually used to model enterprise workflows that run on servers and connect to data bases.
Turns out they implemented some kind of visual programming environment and a state machine workflow and it is also a common scenario to host the workflow designer in an application. I’ve customized such a sample project to the needs of using the state machine and it works very good so far. Most time was spent on understanding the system and finalize the nodes, but it shows how software systems can be integrated and used in VL without much effort:
So now the question, does it run on other computers? Would be nice if you can give it a testing round. Donwload and unzip this file, open the file vvvv\Demo.v4p with vvvv beta38.1 and see what happens:
Gamma: VL.WorkflowFoundation_gamma.zip (773.9 KB)
Just place the content of the zip into your project folder and reference the VL.WorkflowFoundation.vl file in the document that uses the state machine. There is also a help patch included.
seems to work fine here (b38.1x64 on a win10 system). i also added some states/messages and all that went fine (once you get used to the editor).
seems to be supercool and quite powerful with c# expressions etc.
really intereting stuff!
one thing that is missing imho is the possibility to interactively edit the machine (i.e. not save/reload the definition file on every change). not having that breaks the workflow we are used to in VVVV/VL a little.
question, where was the urgent need for a VL automata editor discussed. wasn‘t aware of it. i was planing to rewrite/port automata ui for .net / VL for the standalone version anyway. just didn‘t see the urgency since nobody talked about it in the obvious channels.
It’s true that the discussion on riot have an exclusive character and that a lot of the insights found there never make it to the forum. These solutions are lost for the community and the aftermath.
I would also appreciate if the forum could keep it’s role as a growing compendium of community solutions.
Like the shout box, I think the riot chat should be visible on vvvv.org to logged-in users.
ok, riot then. i follow riot but sometimes its like 200 messages after a day. not the best format.
still don‘t understand why reinvent the wheel and don‘t talk to me. fair enough if one doesn‘t like the automata ui workflow but maybe we can contribute to something everybody likes to use instead of doing the same thing over and over again, solve the same problems.
you always need a state machine, some just don’t know it. :)
to understand why i picked this and invested time into it, here is a bit of story behind it:
since the old qfsm days, it is clear that you should start most of your projects with a state machine. it solves high-level application logic and is better to understand and design as doing the same in a vvvv/vl patch.
since the early days of vl we are talking about ways of integrating a state machine into the vl workflow and i was looking now and then into other tools like ventuz, unity etc. to see what they have come up with. one day i watched this video a bit and saw the concept of state machine hierarchies and all the events like enter, leave etc., which made total sense and i wanted to have that for the future vl state machine workflow.
as said in the original post, i was looking into it recently again and saw this funny workflow thing which exactly has all those features (and much more) and is tested since years. pulling it out of everyone’s pc and making a glue for vl looked easy enough to try it. and it was literally just 3 evenings of coding. compare that to developing a whole system from scratch, it would take weeks and would need testing. this is available now!
it was not trying to re-inventing it, just gluing it to vl until there is something better/more appealing. till then this is a working solution with minimal effort, problem solved for now -> more time for other things. so it was a quite pragmatic decision and i certainly don’t want to proclaim this as the final solution, just good enough for now.
since the interface to vl is very slim, you could implement the same interface @u7angel. then it can be replaced later and the same nodes would still work, just with another ui/editor. so please go ahead whenever you have time. would love to see a better looking state machine in the near future.
this is absolutely understandable and great you worked on that. my criticism was about communication channels. i‘m really interested in a discussion like that and i‘m an avid reader of the forum and riot. but still this question slipped through.
there are just too many ways for discussions i guess.
anyway, back to the topic and something i like to add. are you planing to introduce some interface for VL to add additional editors to the UI. so rather placing a editor node somewhere in the patch, with view/close bangs but integrating better in VL aka dropdown menu, dockable window etc.
when we talk about something like workflow foundation, it would be nice to have something like that.
its not easy to catch up in the chat sometimes and not all topics get a forums thread to discuss in more detail. but i agree that embedding it into the website would be good for everyone.
yes, we have that as high priority on our list. and the big challenge is to find a windowing framework that works cross platform. currently we are using windows forms (windows, menu and context menu) which needs to get replaced. then we need to figure out how the integration and user extensions should work. since there isn’t the perfect solution right now, we are waiting for the winner of the the ui framework wars in 2019 on .net core 3.0. let’s see.
btw. the EditorWindow node is only there for convenience (e.g. close on startup of finished project), you don’t need to put it somewhere. if you place a StateMachine node in the patch it opens the editor automatically, just like renderers. you can also place a StateMachine in a loop and dynamically create 100 of them.
@u7angel there is a general system in the VL API that gives you the selected node on selection changed. with that, you can patch such a system. however, it doesn’t differentiate between left or right-click.
but a strategy for gamma user interface extensions would be of value. if i recall right, we were talking about this at the vvvv summer camp…including the whole automata/timeline discussion. beta had a straight forward way of handling such things which is still missing in gamma/VL.
when we think about something like that, being able to have multiple windows and the ability to tab them, touches this topic.