MuleMessageCollection coll = new DefaultMessageCollection(muleContext);
for (MuleEvent event : nonNullResults)
{
coll.addMessage(event.getMessage());
}
coll.propagateRootId(previous.getMessage());
MuleEvent resultEvent = new DefaultMuleEvent(coll, previous, previous.getSession());
for (String name : previous.getFlowVariableNames())
{
resultEvent.setFlowVariable(name, previous.getFlowVariable(name));
}