miho / VWorkflows

Flow Visualization Library for JavaFX and VRL-Studio
http://vworkflows.mihosoft.eu
Other
294 stars 67 forks source link

Implementation question #45

Closed mainrs closed 8 years ago

mainrs commented 8 years ago

I had an idea for an application that could be visualized using VWorkflows. The idea is to have events that trigger specific actions (for example a scheduled task or watching a directory for a new file). The trigger will then provide the specific file or a start signal to the next node that will be process the file in a specific manner. The goal is to create a tool that can be used to automate tasks (like sorting files, triggering backups etc.). All actions (like moving, copying, renaming files, deleting) could be visualized as a node with an input of accepts a file and an output that provides the new file or nothing. I couldn't really figure out how to pass information from one node to another via a connection. I created two nodes with the same type of output and input, connected them and tried to pass data over via the value object property but that doesn't seem to work out that well. Could you help me out please? Any help is appreciated. I tried to look into vrlstudio but couldn't find the part where data is transmitted/received via the node's connections.

miho commented 8 years ago

Hi @SirWindfield,

the way we do this is by directly visualizing the actual API that performs the tasks via a powerful Groovy compiler plugin. This allows us to do the data transfer between nodes by the API itself. We add a model based instrumentation to the original code that handles the UI communication. But this would require you to use our language model which you can find in the VRL development branches for version 0.5.

If you'd rather like to use plain VWorkflows without VRL, you have to manage the data transfer yourself. VNodes trigger events whenever a connection is established or changed.

Let me know if you need additional help.

For further questions please use the forum: https://groups.google.com/forum/#!forum/vrl-developers

mainrs commented 8 years ago

As far as I understood your model is optimized for Java, am I right? So it naturally tries to transfer data based on Java code that the user creates right?

In theory I just need to listen to those events and save them somehow to know how the graph looks like. Or is there a method that allows me to traverse the workflow at any time? I am thinking of some sort of Visitor.

miho commented 8 years ago

For further questions and discussion let's use the forum: https://groups.google.com/forum/#!forum/vrl-developers since your question is not directly related to a bug.

Our development version of VRL synchronizes the flow (nodes and connections) and the actual source code. No need to do that manually.

mainrs commented 8 years ago

Posted a question on the developer forums. Thanks again for your help :smile:

miho commented 8 years ago

Moved to forum.