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); if(collab.getParticipant()!=null){ for(Participant p : collab.getParticipant()){ adaptParticipant(p,cBean,def); if(collab.getMessageFlow()!=null){ for(MessageFlow mf : collab.getMessageFlow()){ adaptMessageFlow(mf,cBean,def);
@Override public void visitCollaboration(ICollaborationBean cBean) { Collaboration c = newInstance(Collaboration.class); c.setName(cBean.getName()); c.setId(cBean.getId()); c.setIsClosed(cBean.isClosed()); setDocumentationAndExtensions(c, cBean); defs.addRootElement(c); currentCollaboration = c; currentArtifactContainer.push(c); }
@Override public void visitMessageFlow(IMessageFlowBean msgFlowBean) { MessageFlow msgFlow = newInstance(MessageFlow.class); msgFlow.setId(msgFlowBean.getId()); msgFlow.setName(msgFlowBean.getName()); setDocumentationAndExtensions(msgFlow, msgFlowBean); currentCollaboration.addMessageFlow(msgFlow); currentMessageFlow = msgFlow; }
@Override public void visitParticipant(IParticipantBean participantBean) { Participant participant = newInstance(Participant.class); participant.setId(participantBean.getId()); participant.setName(participantBean.getName()); if(participantBean.getProcess()!=null){ participant.setProcessRef(getBaseElementRef(participantBean.getProcess())); } setDocumentationAndExtensions(participant, participantBean); currentCollaboration.addParticipant(participant); currentParticipant = participant; }