@Override public void visitSubProcess(ISubProcessBean spBean){ SubProcess sp = newInstance(SubProcess.class); sp.setId(spBean.getId()); sp.setName(sp.getName()); setDocumentationAndExtensions(sp, spBean); currentFlowElementContainer.peek().addFlowElement(sp); currentFlowElementContainer.push(sp); currentLaneSetContainer.push(sp); currentArtifactContainer.push(sp); currentIOSpecOwner.push(sp); }
private void adaptSimpleTask(TaskBean taskBean, Task t) { setDocumentationAndExtensions(t, taskBean); t.setId(taskBean.getId()); t.setName(taskBean.getName()); if(taskBean.getDefaultSequenceFlow()!=null) { defaultFlows.put(taskBean.getDefaultSequenceFlow().getId(), t); } currentFlowElementContainer.peek().addFlowElement(t); currentDataInputAssociationOwner = t; currentDataOutputAssociationOwner = t; currentIOSpecOwner.push(t); }
private void adaptParallelGateway(ParallelGatewayBean gatewayBean) { ParallelGateway pg = newInstance(ParallelGateway.class); setDocumentationAndExtensions(pg, gatewayBean); pg.setId(gatewayBean.getId()); pg.setName(gatewayBean.getName()); currentFlowElementContainer.peek().addFlowElement(pg); }
private void adaptExclusiveGateway(ExclusiveGatewayBean gatewayBean) { ExclusiveGateway eg = newInstance(ExclusiveGateway.class); setDocumentationAndExtensions(eg, gatewayBean); eg.setId(gatewayBean.getId()); eg.setName(gatewayBean.getName()); if(gatewayBean.getDefaultSequenceFlow()!=null){ defaultFlows.put(gatewayBean.getDefaultSequenceFlow().getId(), eg); } currentFlowElementContainer.peek().addFlowElement(eg); }
@Override public void visitCallActivity(ICallActivityBean cab){ CallActivity ca = newInstance(CallActivity.class); ca.setId(cab.getId()); setDocumentationAndExtensions(ca, cab); ca.setName(cab.getName()); if(cab.getCalledElement()!=null){ ca.setCalledElement(getBaseElementRef(cab.getCalledElement())); } currentFlowElementContainer.peek().addFlowElement(ca); currentDataInputAssociationOwner = ca; currentDataOutputAssociationOwner = ca; currentIOSpecOwner.push(ca); }
@Override public void visitSubChoreography(ISubChoreographyBean subChor){ SubChoreography sc = newInstance(SubChoreography.class); sc.setId(subChor.getId()); setDocumentationAndExtensions(sc, subChor); sc.setLoopType(retrieveChoreographyLoopType(subChor.getChoreographyLoopType())); sc.setInitiatingParticipantRef(new QName(subChor.getInitiatingParticipant().getId())); sc.setName(subChor.getName()); if(subChor.getParticipants()!=null){ for(IParticipantBean p : subChor.getParticipants()){ sc.addParticipantRef(new QName(p.getId())); } } currentFlowElementContainer.peek().addFlowElement(sc); currentFlowElementContainer.push(sc); currentArtifactContainer.push(sc); }
@Override public void visitDataObject(IDataObjectBean dobj) { DataObject result = newInstance(DataObject.class); setDocumentationAndExtensions(result, dobj); result.setId(dobj.getId()); result.setIsCollection(dobj.isCollection()); result.setName(dobj.getName()); if(dobj.getItemSubject()!=null){ result.setItemSubjectRef(getBaseElementRef(dobj.getItemSubject())); } currentFlowElementContainer.peek().addFlowElement(result); itemAwareElements.put(dobj, result); }
private void adaptEventBasedGateway(EventBasedGatewayBean gb) { EventBasedGateway eg = newInstance(EventBasedGateway.class); setDocumentationAndExtensions(eg, gb); eg.setId(gb.getId()); eg.setName(gb.getName()); eg.setInstantiate(gb.isInstantiate()); eg.setEventGatewayType(retrieveEventGatewayType(gb.getType())); currentFlowElementContainer.peek().addFlowElement(eg); }
@Override public void visitEndEvent(IEndEventBean endEventBean) { EndEvent endEvent = newInstance(EndEvent.class); setDocumentationAndExtensions(endEvent, endEventBean); endEvent.setName(endEventBean.getName()); endEvent.setId(endEventBean.getId()); if(endEventBean.getResults()!=null){ for(IEventDefinitionBean edb : endEventBean.getResults()){ endEvent.addEventDefinitionRef(adaptEventDefinitionRef(edb)); } } currentFlowElementContainer.peek().addFlowElement(endEvent); currentDataInputAssociationOwner = endEvent; currentWithDataInput = endEvent; if(endEventBean.getDataInputs()!=null && !endEventBean.getDataInputs().isEmpty()) { InputSet is = newInstance(InputSet.class); endEvent.setInputSet(is); currentInputSet = is; } }
@Override public void visitStartEvent(IStartEventBean seb) { StartEvent startEvent = newInstance(StartEvent.class); setDocumentationAndExtensions(startEvent, seb); startEvent.setId(seb.getId()); startEvent.setName(seb.getName()); if(seb.getTriggers()!=null){ for(IEventDefinitionBean edb : seb.getTriggers()){ startEvent.addEventDefinitionRef(adaptEventDefinitionRef(edb)); } } currentFlowElementContainer.peek().addFlowElement(startEvent); currentDataOutputAssociationOwner = startEvent; currentWithDataOutput = startEvent; if(seb.getDataOutputs()!=null && !seb.getDataOutputs().isEmpty()){ OutputSet os = newInstance(OutputSet.class); startEvent.setOutputSet(os); currentOutputSet = os; } }
@Override public void visitIntermediateThrowEvent(IIntermediateThrowEventBean e) { IntermediateThrowEvent ie = newInstance(IntermediateThrowEvent.class); setDocumentationAndExtensions(ie, e); ie.setId(e.getId()); ie.setName(e.getName()); if(e.getResults()!=null){ for(IEventDefinitionBean edb : e.getResults()){ ie.addEventDefinitionRef(adaptEventDefinitionRef(edb)); } } currentFlowElementContainer.peek().addFlowElement(ie); currentDataInputAssociationOwner = ie; currentWithDataInput = ie; if(e.getDataInputs()!=null && !e.getDataInputs().isEmpty()){ InputSet is = newInstance(InputSet.class); ie.setInputSet(is); currentInputSet = is; } }
@Override public void visitIntermediateCatchEvent(IIntermediateCatchEventBean e) { IntermediateCatchEvent ie = newInstance(IntermediateCatchEvent.class); setDocumentationAndExtensions(ie, e); ie.setId(e.getId()); ie.setName(e.getName()); if(e.getTriggers()!=null){ for(IEventDefinitionBean edb : e.getTriggers()){ ie.addEventDefinitionRef(adaptEventDefinitionRef(edb)); } } currentFlowElementContainer.peek().addFlowElement(ie); currentDataOutputAssociationOwner = ie; currentWithDataOutput = ie; if(e.getDataOutputs()!=null && !e.getDataOutputs().isEmpty()){ OutputSet os = newInstance(OutputSet.class); ie.setOutputSet(os); currentOutputSet = os; } }
@Override public void visitChoreographyTask(IChoreographyTaskBean cTask){ ChoreographyTask ct = newInstance(ChoreographyTask.class); ct.setId(cTask.getId()); ct.setName(cTask.getName()); setDocumentationAndExtensions(ct, cTask); ct.setLoopType(retrieveChoreographyLoopType(cTask.getChoreographyLoopType())); ct.setInitiatingParticipantRef(new QName(cTask.getInitiatingParticipant().getId())); if(cTask.getParticipants()!=null){ for(IParticipantBean p : cTask.getParticipants()){ ct.addParticipantRef(new QName(p.getId())); } } if(cTask.getInitiatingMessageFlow()!=null){ ct.addMessageFlowRef(new QName(cTask.getInitiatingMessageFlow().getId())); } if(cTask.getReturnMessageFlow()!=null){ ct.addMessageFlowRef(new QName(cTask.getReturnMessageFlow().getId())); } currentFlowElementContainer.peek().addFlowElement(ct); }
sequenceFlow.setTargetRef(target); currentFlowElementContainer.peek().addFlowElement(sequenceFlow);