targets.getChildren().add(target);
}
}
}
if (flowActivity.sources().length > 0){
Sources sources = BPELFactory.eINSTANCE.createSources();
activity.setSources(sources);
for(int i=0; i < flowActivity.sources().length; i++){
FlowLinkSource linkSource = flowActivity.sources()[i];
Link link = linkMap.get(linkSource.name());
if (link == null){
link = BPELFactory.eINSTANCE.createLink();
link.setName(linkSource.name());
linkMap.put(linkSource.name(), link);
flow.getLinks().getChildren().add(link);
}
Source source = BPELFactory.eINSTANCE.createSource();
source.setLink(link);
source.setActivity(activity);
Condition cond = BPELFactory.eINSTANCE.createCondition();
cond.setBody(linkSource.transitionCondition());
source.setTransitionCondition(cond);
sources.getChildren().add(source);
}
}
}
}