List<ModuleBean> modules = new ArrayList<ModuleBean>();
modules.add(module1);
modules.add(module2);
WorkflowBean wf = new WorkflowBean(null, "TestWorkflow");
wf.setModules(modules);
Yaml ym = new Yaml();
System.out.println(ym.dump(wf));
String dumpedString = ym.dump(wf);
WorkflowBean loadedBean = (WorkflowBean)ym.load(dumpedString);
int val = 1000;
for(ModuleBean m : loadedBean.getModules()){
List<InputBean> inputBeans = m.getInputs();
inputBeans.get(0).setValue(val++);
}
for(ModuleBean m : loadedBean.getModules()){
List<InputBean> inputBeans = m.getInputs();
System.out.println("Check " + inputBeans.get(0).getValue());
}
}