use of org.knime.core.node.workflow.WorkflowPersistor.WorkflowLoadResult in project knime-core by knime.
the class BugAP7806_WorkflowSaveHooks method initWorkflowFromTemp.
private WorkflowLoadResult initWorkflowFromTemp() throws Exception {
// will save the workflow in one of the test ...don't write SVN folder
WorkflowLoadResult loadResult = loadWorkflow(m_workflowDir, new ExecutionMonitor());
setManager(loadResult.getWorkflowManager());
NodeID baseID = getManager().getID();
m_jsonInput = new NodeID(baseID, 7);
return loadResult;
}
use of org.knime.core.node.workflow.WorkflowPersistor.WorkflowLoadResult in project knime-core by knime.
the class WorkflowTestCase method loadWorkflow.
protected WorkflowLoadResult loadWorkflow(final File workflowDir, final ExecutionMonitor exec, final WorkflowLoadHelper loadHelper) throws Exception {
WorkflowLoadResult loadResult = WorkflowManager.ROOT.load(workflowDir, exec, loadHelper, false);
WorkflowManager m = loadResult.getWorkflowManager();
if (m == null) {
throw new Exception("Errors reading workflow: " + loadResult.getFilteredError("", LoadResultEntryType.Ok));
} else {
switch(loadResult.getType()) {
case Ok:
break;
default:
m_logger.info("Errors reading workflow (proceeding anyway): ");
dumpLineBreakStringToLog(loadResult.getFilteredError("", LoadResultEntryType.Warning));
}
}
return loadResult;
}
Aggregations