public IEndEventBean getEndEventById(String id){ return searchListById(endEvents,id); }
@Override public void addFlowElement(IFlowElementBean flowElement) { if (flowElement instanceof IEndEventBean){ addEndEvent((IEndEventBean) flowElement); }else if (flowElement instanceof ITaskBean){ addTask((ITaskBean) flowElement); }else if (flowElement instanceof IStartEventBean){ addStartEvent((IStartEventBean) flowElement); }else if (flowElement instanceof IGatewayBean){ addGateway((IGatewayBean) flowElement); }else if (flowElement instanceof IIntermediateCatchEventBean){ addIntermediateCatchEvent((IIntermediateCatchEventBean) flowElement); }else if (flowElement instanceof IIntermediateThrowEventBean){ addIntermediateThrowEvent((IIntermediateThrowEventBean) flowElement); }else if (flowElement instanceof IDataObjectBean){ addDataObject((IDataObjectBean) flowElement); }else if (flowElement instanceof ICallActivityBean){ addCallActivity((ICallActivityBean) flowElement); } }
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 List<? extends IFlowElementBean> getFlowNodes() { List<IFlowElementBean> nodes = null; nodes = new ArrayList<IFlowElementBean>(); nodes.addAll(getEndEvents()); nodes.addAll(getStartEvents()); nodes.addAll(getTasks()); nodes.addAll(getGateways()); nodes.addAll(getIntermediateCatchEvents()); nodes.addAll(getIntermediateThrowEvents()); nodes.addAll(getDataObjects()); if(getChildLaneSet()!=null && getChildLaneSet().getFlowNodes().size()>0){ nodes.addAll(getChildLaneSet().getFlowNodes()); } nodes.addAll(getCallActivities()); return nodes; }
private static LaneBean adaptLane(Lane l, DefinitionsBean defs) { LaneBean lBean = null; if(l!=null){ lBean = new LaneBean(l.getId()); lBean.setName(l.getName()); setDocumentationAndExtensions(lBean, l); lBean.setChildLaneSet(adaptLaneSet(l.getChildLaneSet(),defs)); fillLane(lBean,l,defs); elements.put(lBean.getId(), lBean); } return lBean; }
@Override public Set<IDiagramElement> getChildrenDIModels() { HashSet<IDiagramElement> result = new HashSet<IDiagramElement>(); BPMNShape lane = GWT.create(BPMNShape.class); LaneBean laneBean = new LaneBean(); laneBean.setName("Lane"); lane.setModelElement(laneBean); result.add(lane); return result; }
private static LaneSetBean adaptLaneSet(LaneSet ls, DefinitionsBean defs) { LaneSetBean lsBean = new LaneSetBean(); if(ls!=null){ lsBean = new LaneSetBean(ls.getId()); setDocumentationAndExtensions(lsBean, ls); if(ls.getLanes()!=null){ for(Lane l : ls.getLanes()){ lsBean.addLane(adaptLane(l,defs)); } } } return lsBean; }
public LaneBean(String id){ super(id); startEvents = new ArrayList<IStartEventBean>(); endEvents = new ArrayList<IEndEventBean>(); tasks = new ArrayList<ITaskBean>(); gateways = new ArrayList<IGatewayBean>(); intermediateCatchEvents = new ArrayList<IIntermediateCatchEventBean>(); intermediateThrowEvents = new ArrayList<IIntermediateThrowEventBean>(); dataObjects = new ArrayList<IDataObjectBean>(); subprocesses = new ArrayList<ISubProcessBean>(); callActivities = new ArrayList<ICallActivityBean>(); name = ""; childLaneSet = new LaneSetBean(); }
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); }
public void addParticipant(IParticipantBean participant){ if (participants.contains(participant)==false){ participant.setParentCollaborationBean(this); participants.add(participant); if (getParentDefinitions()!=null) getParentDefinitions().addProcess(participant.getProcess()); } }
public List<? extends IFlowElementBean> getFlowNodes() { List<IFlowElementBean> nodes = new ArrayList<IFlowElementBean>(); List<ILaneBean> lanes =getLanes(); if(lanes!=null && lanes.size()>0){ nodes = new ArrayList<IFlowElementBean>(); for(ILaneBean lane : lanes){ nodes.addAll(lane.getFlowNodes()); } } return nodes; }
public IFlowElementBean getFlowNode(String id){ if(participants!=null && participants.size()!=0){ for(IParticipantBean Participant : participants){ if(Participant.getProcess()!=null){ IFlowElementBean node = searchNodeById(Participant.getProcess().getFlowNodes(),id); if(node!=null){ return node; } } } } return null; }
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; }
public IIntermediateCatchEventBean getIntermediateCatchEventById(String id){ return searchListById(intermediateCatchEvents,id); }
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; }
public IStartEventBean getStartEventById(String id){ return searchListById(startEvents,id); }
public IGatewayBean getGatewayById(String id){ return searchListById(gateways,id); }
public IDataObjectBean getDataObjectById(String id){ return searchListById(dataObjects, id); }
public ITaskBean getTaskById(String id){ return searchListById(tasks,id); }
public IIntermediateThrowEventBean getIntermediateThrowEventById(String id){ return searchListById(intermediateThrowEvents, id); }