output3.setType("integer");
output3.setRequired("true");
OutputModel output4 = new OutputModel("literal", "'a literal'");
model.setOutputs(asList(OutputModel.class, output1, output2, output3, output4));
EndStateModel end = new EndStateModel("end");
end.setOutputs(asList(OutputModel.class, new OutputModel("foo", "flowScope.foo")));
EndStateModel notReached = new EndStateModel("notReached");
notReached.setOutputs(asList(OutputModel.class, new OutputModel("notReached", "flowScope.foo")));
model.setStates(asList(AbstractStateModel.class, end, notReached));
Flow flow = getFlow(model);
FlowExecutionImplFactory factory = new FlowExecutionImplFactory();