I currently know of two ways to run Knime Workflows: Completely interactive or from the command line, completely in the background.
But what I'm looking for is a third way in between: Basically the Workflow should run in the background, but with a GUI to set variables before starting, and to show visualisations after finishing.
Is there any way to achive this? The first part I could work around with a custom GUI that starts Knime in the background - but why start one VM from another one. And for the second part I don't see any other way than to manualy duplicate a Node in a standalone version. There's got to be another way...
If this feature doesn't exist yet - which is what I suspect - do you think it would be useful enough to implement it? If yes, I might be willing to contribute.
This sounds a bit like quickform execution? Right click on the workflow in the knime explorer view, and select "Quickform execution..." - then the workflow variables and any other quickforms will be presented in a dialog.
That doesn't seem to be exactly what I searched for, but I guess that's as good as it gets. And now I also see why I didn't find it in my cheapo version. But thanks for the tip anyway.
the problem with a standalone UI for KNIME, which runs in the same VM is, that KNIME lives in the OSGI world, i.e. the complete OSGI envorinment needs to be started from your standalone app. Technically this is doable, however the tricky part is to get data from your non-OSGi UI into your KNIME workflow (ClassLoaders etc).
In short: Technically doable, but practially it's often easier to call KNIME headless.
Set up variables and execute workflows in the background is possible with the batch mode http://tech.knime.org/faq#q12
The problem (at least for me) is the “visualization part”.
For example some plot nodes e.g. the scatter plot have the option to export the actual plot as a png image. However, this doesn`t work in batch mode, because the headless mode doesn’t support actually “seeing” the View Modes from the Nodes and you don’t have something like an automatically “save this plot …” possibility.
Though I think the JFreeChart or the RPlot nodes (and probably others in community contributions too) can generate the images headless too.
Well, Knime is a plugin for Eclipse, and the nodes are, too. And Eclipse loads plugins lazyly, including the gui. So it seems there might be a way to just switch off the normal eclipse gui at startup (maybe that's what the standalone version does?), and replace it by something that uses the existing node-guis in, say, a wizard. That way, everything can still live in Java/Eclipse/OSGI, with all the benefits (and drawbacks), without extra infrastructure, and without having to reinvent everything. That's what the Eclipse architecture is all about, after all. The Knime architecture on the other hand, I don't know. This way, the gui would probably be extremely heavy, but I for one am happy as long as I can hide the details of my workflow.
Additional benefit: by reusing said wizard, maybe quickform nodes would finally be useable in meta nodes, too!
you are completely right, but then you have to start your UI also inside the OSGi framework. As already mentoined, sometimes it is just easier to run KNIME headless in another VM (batchmode or headless means starting KNIME without any UI, see links above), as sharing objects between the workflow and your UI in the same memory is tricky anyway (how to inject your ref objects into arbitary nodes?!).
PS: Quickform nodes are already usable in metanodes (expose configuration dialog in metanode UI).
If sharing objects between nodes and the UI is so complicated, how does the Knime UI do it? To be clear: I don't want to inject arbitrary objects. I want to inject the same objects I can "inject" now via the Knime UI and via the injector-nodes already present. I want the same UI I have, just reduced to something smaller.
And ok, yes, you can do 'something' with the quickform nodes. So far I have only been able to expose inputs, not outputs or pause-dummies, but that could be just my lack of knowledge and/or a lack of documentation. Can I in theory run a meta node completely via wizard, including visualization? Or can I do that with a workflow, without using some web-thingy? All I've read so far points to no. I mean you didn't call it a "configuration-dialog" for nothing, instead of, say, "interface". And even if I can, I can't seem to loose the eclipse around it. So close, yet so far...
Which is why I agree that it's easier for us to run a workflow headless (or via the web-thingy) for now until someone digs into the Knime sources and figures something out...
ok got you. I thought your main interest is to run KNIME in the same VM as your _own_ GUI runs to share some big objects in memory (e.g. contents of tables or something). This is tricky (I was doing that...). But if I got you right, you just want to have something smaller to present to the user, for example a simple "workflow" app which steps through the workflow and the user does not need to care about the workflow details, correct? Then you are right, technically it's possible (as they do it with the Web Interface). I think the Subnodes (Labs) will in the future more powerful than the Metanodes. But here I don't know any details, sorry!
That's exactly what I want. I simply want to stay in "our" world of Knime while not bombarding my colleagues (especially the ones higher up) with all the possibilities and options.
I wish you good luck with your objects... Sounds way trickier than my little games here...
And thanks for the help!