Hi,
So I think the Tags are stocked in workflow-metadata.xml of each workflows/folders.
and I think a massive change would consist in listing all WF, then edit (or create if it doesn’t exist) each workflow-metadata.xml by injecting those lines in the XML.
Hi @Zarkoff95 , it can probably be achieved, but I first have some questions:
How do you know what tag(s) to give each workflow?
Will you have a data file/table with a list of workflow names which match exactly the name of each workflow, and the tag that is required?
Do you as a first step need to use KNIME to get a list of all your workflows, so you can supply the list of tags?
Do you intend this to be a continual process (e.g. execute it each week), with workflow tags added/updated on regular basis (in which case you need to ensure you don’t double-tag any previously tagged workflows each time), or will they be tagged manually after this “one-off” run.?
btw, as a starting point, if you were to download, disconnect and expand my component “recent workflows” this contains the code that will return you all the workflow folders within your current KNIME workspace.
It searches for the workflow.knime file in each, but it’s only a small step to read the workflow-metadata.xml file from the same folder.
Big warning though: if you are going to attempt to programmatically modify a knime workflow metadata file (e.g. workflow-metadata.xml), please do make sure that you have taken a full backup of your entire workspace first!!
Yes, I already tried to do it. I’ve a list of all “workflow.knime”.
(I have adapted a workflow I found here link)
But I don’t find a solution to check if the file exists (or I didn’t find how to setup the javasnippet).
Also, I’m not an expert in XML Manipulation. But I always happy to learn
Thank you your Knime, I’ll have a look.
Yes, after this massive update, I will tag manually when I create a new WF.
But If I could check where it’s missing time to time it would also help.
Yes, I’ll save everything, and do a first run on a little set of knime WF that became obsolete.