private static List<IMessageFlowBean> buildMessageFlows() { ArrayList<IMessageFlowBean> result = new ArrayList<IMessageFlowBean>(); MF_1_ID = createUniqueId(); MessageFlowBean messageFlow1 = new MessageFlowBean(MF_1_ID); messageFlow1.setSource((IInteractionNodeBean) MFsource); messageFlow1.setTarget((IInteractionNodeBean) MFtarget); result.add(messageFlow1); return result; }
private static List<IMessageFlowBean> buildMessageFlows() { ArrayList<IMessageFlowBean> result = new ArrayList<IMessageFlowBean>(); MF_1_ID = createUniqueId(); MessageFlowBean messageFlow1 = new MessageFlowBean(MF_1_ID); messageFlow1.setSource((IInteractionNodeBean) upperParticipantNodes.get(0)); messageFlow1.setTarget((IInteractionNodeBean) lowerParticipantNodes.get(0)); MF_2_ID = createUniqueId(); MessageFlowBean messageFlow2 = new MessageFlowBean(MF_2_ID); messageFlow2.setSource((IInteractionNodeBean) lowerParticipantNodes.get(1)); messageFlow2.setTarget((IInteractionNodeBean) upperParticipantNodes.get(1)); MF_3_ID = createUniqueId(); MessageFlowBean messageFlow3 = new MessageFlowBean(MF_3_ID); messageFlow3.setSource((IInteractionNodeBean) lowerParticipantNodes.get(2)); messageFlow3.setTarget((IInteractionNodeBean) upperParticipantNodes.get(1)); result.add(messageFlow1); result.add(messageFlow2); result.add(messageFlow3); return result; }
private static List<IMessageFlowBean> buildMessageFlows() { List<IMessageFlowBean> result = new ArrayList<IMessageFlowBean>(); MessageFlowBean messageFlow1 = new MessageFlowBean(createUniqueId()); MF_1_ID = messageFlow1.getId(); messageFlow1.setSource((IInteractionNodeBean) upperParticipantNodes.get(0)); messageFlow1.setTarget((IInteractionNodeBean) lowerParticipantNodes.get(0)); MessageFlowBean messageFlow2 = new MessageFlowBean(createUniqueId()); MF_2_ID = messageFlow2.getId(); messageFlow2.setSource((IInteractionNodeBean) lowerParticipantNodes.get(1)); messageFlow2.setTarget((IInteractionNodeBean) upperParticipantNodes.get(1)); MessageFlowBean messageFlow3 = new MessageFlowBean(createUniqueId()); MF_3_ID = messageFlow3.getId(); messageFlow3.setSource((IInteractionNodeBean) upperParticipantNodes.get(2)); messageFlow3.setTarget((IInteractionNodeBean) lowerParticipantNodes.get(2)); result.add(messageFlow1); result.add(messageFlow2); result.add(messageFlow3); return result; }
private static MessageFlowBean adaptMessageFlow(MessageFlow mf, CollaborationBean cBean, DefinitionsBean defs) { MessageFlowBean mfBean = new MessageFlowBean(mf.getId()); mfBean.setName(mf.getName()); setDocumentationAndExtensions(mfBean, mf); if(mf.getMessageRef()!=null){ mfBean.setMessage(defs.getMessageById(mf.getMessageRef().getLocalPart())); } if(mf.getSourceRef()!=null){ // mfBean.setSource((IInteractionNodeBean) cBean.getFlowNode(mf.getSourceRef().getLocalPart())); mfBean.setSource((IInteractionNodeBean) elements.get(mf.getSourceRef().getLocalPart())); } if(mf.getTargetRef()!=null){ // mfBean.setTarget((IInteractionNodeBean) cBean.getFlowNode(mf.getTargetRef().getLocalPart())); mfBean.setTarget((IInteractionNodeBean) elements.get(mf.getTargetRef().getLocalPart())); } cBean.addMessageFlow(mfBean); elements.put(mfBean.getId(), mfBean); return mfBean; }
private void process(Set<ChoreographyTaskBean> choreoTasks){ //assign message flow to initiating participant for(ChoreographyTaskBean ct:choreoTasks){ ct.setInitiatingMessageFlow(null); if (ct.getInitiatingParticipant()!=null){ IParticipantBean source = ct.getInitiatingParticipant(); IParticipantBean target = getNonInitiatingParticipant(ct); MessageFlowBean initiatingMessageFlow = new MessageFlowBean("MsgFlow_"+source.getId()+"_"+target.getId()); initiatingMessageFlow.setSource(source); initiatingMessageFlow.setTarget(target); ct.setInitiatingMessageFlow(initiatingMessageFlow); } } }
public void bindSyntaxModel(IModelElement diagramElementSyntaxModel, IEditorModel editorModel, IDiagramElement diagramElement) { MessageFlowBean bean = (MessageFlowBean) diagramElementSyntaxModel; MessageFlowEditorModel eModel = (MessageFlowEditorModel) editorModel; bean.setName(eModel.getName()); bean.setDocumentation(eModel.getDocumentation()); bean.setMessage(eModel.getMessage()); //set target and source IBPMNEdge messageFlowEdge = (IBPMNEdge) diagramElement; IBPMNShape source = (IBPMNShape) messageFlowEdge.getSource(); IBPMNShape target = (IBPMNShape) messageFlowEdge.getTarget(); if (source!=null){ if (source.getModelElement() instanceof IInteractionNodeBean) bean.setSource((IInteractionNodeBean)source.getModelElement()); } if (target!=null){ if (target.getModelElement() instanceof IInteractionNodeBean) bean.setTarget((IInteractionNodeBean)target.getModelElement()); } }
returnMessageFlow.setSource(sourceParticipant); returnMessageFlow.setTarget(choreoTask.getInitiatingParticipant());
for(IDiagramElement di : messageFlows.keySet()){ MessageFlowBean mf = messageFlows.get(di); mf.setSource((IInteractionNodeBean) ((IEdge)di).getSource().getModelElement()); mf.setTarget((IInteractionNodeBean) ((IEdge)di).getTarget().getModelElement()); collaboration.addMessageFlow(mf);