-
Notifications
You must be signed in to change notification settings - Fork 4
Providing Arguments
Info: The complete list of arguments can be found here: KnimeNet --> ArgumentBag
To get the most out of KnimeNet you obviously want to execute workflows with custom Arguments. A standard command line call to KNIME would look like this:
knime -nosplash -application org.knime.product.KNIME_BATCH_APPLICATION -workflowDir="workspace/Knime_project"
A more complex call to KNIME CLI might look like this:
knime -nosplash -application org.knime.product.KNIME_BATCH_APPLICATION -workflowDir="workspace/Knime_project" -workflowDir="workspace/Knime_project" -workflow.variable=my_integer,5,int -workflow.variable2=my_integer,hello,String -workflow.variable3=my_integer,pathtofile,String --launcher.ini "PathToIni" -credential=db;steven
And this might not be the most complex one. Especially the dynamic part of workflow variables might become a mess with procedural shell programming. Might... :) In KnimeNet this is all captured in an ArgumentBag. Knime is a child of Eclipse. This is why you have to major fields that these arguments belong to:
These are native KNIME command line arguments. For example:
var argumentBag = new ArgumentBag();
/* flags */
argumentBag.NoSave = true;
/* workflow variables*/
argumentBag.WorkFlowVariables = new[]
{
new WorkFlowVariable ("var1", "value1", VariableType.Double),
new WorkFlowVariable ("var2", "value2", VariableType.Integer),
new WorkFlowVariable ("var3", "value3", VariableType.String)
}
These are arguments that KNIME inherits from Eclipse.
var argumentBag = new ArgumentBag();
/* flags */
argumentBag.SuppressErrors = false;
/* VM arguments */
argumentBag.VmArguments = new[] { new VmArgument("vm key", "vm value");}
You can create an ArgumentBag from a JSON string like this:
var json = "{ ... JSON string here ... }";
var argumentBag = ArgumentBag.FromJson(json);
You could also use the plain old argument string instead of the one created from the properties.
var argumentBag = new ArgumentBag("-reset -nosplash ...");