private static CollaborationBean buildCollaboration(DefinitionsBean globalResult) { CollaborationBean result = new CollaborationBean(createUniqueId()); COLLABORATION_ID = result.getId(); result.setName("creatingIdeaCollaboration"); result.addParticipant(buildUpperParticipant(globalResult)); result.addParticipant(buildlowerParticipant(globalResult)); result.setMessageFlows(buildMessageFlows()); return result; }
public void addParticipant(IParticipantBean participant){ if (participants.contains(participant)==false){ participant.setParentCollaborationBean(this); participants.add(participant); if (getParentDefinitions()!=null) getParentDefinitions().addProcess(participant.getProcess()); } }
public DefinitionBuilder() { this.definition = new DefinitionsBean(IdGenerator.createUniqueId()); this.processes = new HashMap<String, ProcessBean>(); this.collaborations = new HashMap<String, CollaborationBean>(); this.pools = new HashMap<String, ParticipantBean>(); this.lanes = new HashMap<String, LaneBean>(); CollaborationBean collaboration = new CollaborationBean(IdGenerator.createUniqueId()); this.collaborations.put(collaboration.getId(), collaboration); }
if(collaboration.getParticipants()!=null) collaboration.getParticipants().clear(); if(collaboration.getParentDefinitions()!=null) { if(collaboration.getParentDefinitions().getProcesses()!=null) collaboration.getParentDefinitions().getProcesses().clear(); collaboration.addParticipant(defaultParticipant); collaboration.addParticipant(p); mf.setSource((IInteractionNodeBean) ((IEdge)di).getSource().getModelElement()); mf.setTarget((IInteractionNodeBean) ((IEdge)di).getTarget().getModelElement()); collaboration.addMessageFlow(mf); collaboration.addMessage(m); collaboration.getArtifacts().clear(); collaboration.addArtifact(a); collaboration.addArtifact(a);
private static void adaptCollaborations(DefinitionsBean def, Collaboration[] collaborations) throws BPMNException { if(collaborations!=null){ for(Collaboration collab : collaborations){ CollaborationBean cBean = new CollaborationBean(collab.getId()); def.addCollaboration(cBean); cBean.setParentDefinitions(def); cBean.setName(collab.getName()); cBean.setClosed(collab.isIsClosed()); setDocumentationAndExtensions(cBean, collab);
CollaborationBean coll = new CollaborationBean(); COLLABORATION_ID = coll.getId(); def.addCollaboration(coll); CollaborationBean collaboration = new CollaborationBean(IdGenerator.createUniqueId()); collaboration.addParticipant(participant);
@Override public void initializeWatchedModel( DefaultParticipantEditorModel watchedModel, CollaborationBean modelToBind) { this.initialized = false; if(!modelToBind.getParticipants().isEmpty()) { for(IParticipantBean p : modelToBind.getParticipants()) { if(p.getProcess()!=null && !p.getProcess().getFlowNodes().isEmpty()) { this.participant = p; break; } } } modelToBind.addParticipant(participant); DefaultParticipants.setDefaultParticipant(modelToBind, participant); watchedModel.setName(participant.getName()); watchedModel.setDocumentation(participant.getDocumentation()); watchedModel.setInterfaces(participant.getInterfaces()); this.initialized = true; }
private static ParticipantBean adaptParticipant(Participant participant, CollaborationBean c, DefinitionsBean defs) { ParticipantBean result = new ParticipantBean(participant.getId()); result.setName(participant.getName()); result.setInterfaces(findInterfaces(defs, participant.getInterfaceRef())); result.setEndPoints(findEndPoints(defs, participant.getEndPointRef())); if(participant.getProcessRef()!=null){ IProcessBean pBean = findProcess(defs, participant.getProcessRef().getLocalPart()); result.setProcess(pBean); pBean.setDefinitionalCollaboration(c); } else { result.setProcess(null); } setDocumentationAndExtensions(result, participant); c.addParticipant(result); elements.put(result.getId(), result); 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 static CollaborationBean buildCollaboration(DefinitionsBean globalResult) { COLLABORATION_ID = createUniqueId(); CollaborationBean result = new CollaborationBean(COLLABORATION_ID); result.setName("DocumentWriting"); result.addParticipant(buildUpperParticipant(globalResult)); result.addParticipant(buildLowerParticipant(globalResult)); result.setMessageFlows(buildMessageFlows()); return result; }
private static CollaborationBean buildCollaboration(DefinitionsBean globalResult) { COLLABORATION_ID = createUniqueId(); CollaborationBean result = new CollaborationBean(COLLABORATION_ID); result.setName("AlertConfirmation"); result.addParticipant(buildUpperParticipant(globalResult)); result.addParticipant(buildlowerParticipant(globalResult)); result.setMessageFlows(buildMessageFlows()); return result; }