List<ActorRef> embeddedFlowNodes = new ArrayList<ActorRef>();
// extract StartEvents from SubProcess
for (JAXBElement<? extends TFlowElement> flowElementJaxb : ((TSubProcess) flowNodeJaxb).getFlowElement()) {
if (flowElementJaxb.getValue() instanceof TFlowNode) {
TFlowNode embeddedFlowNodeJaxb = (TFlowNode) flowElementJaxb.getValue();
embeddedFlowNodes.add(new ActorReferenceService()
.getActorReference(IdService.getUniqueFlowNodeId(clientId, processJaxb, subProcessesJaxb,
embeddedFlowNodeJaxb)));
}
}