private static Process getProcess(FlowElement fe, Definitions defs) { for (Process p : defs.getProcesses()) { for (FlowElement elt : p.getFlowElement()) { if (fe.equals(elt)) { return p; } } } return null; }
Process process = newInstance(Process.class); setDocumentationAndExtensions(process,processBean); process.setId(processBean.getId()); process.setName(processBean.getName()); process.setProcessType(retrieveProcessType(processBean.getType())); process.setIsClosed(processBean.isClosed()); process.setIsExecutable(processBean.isExecutable()); process.setDefinitionalCollaborationRef(getBaseElementRef(processBean.getDefinitionalCollaboration())); process.addSupportedInterfaceRef(getBaseElementRef(itfb)); process.addLaneSet(defaultLS); currentLaneSet.push(defaultLS);
ProcessBean pBean = new ProcessBean(process.getId()); setDocumentationAndExtensions(pBean, process); pBean.setParentDefinitions(def); pBean.setName(process.getName()); pBean.setExecutable(process.isIsExecutable()); pBean.setType(retrieveProcessType(process.getProcessType())); pBean.setIsClosed(process.isIsClosed()); pBean.setIoSpecification(adaptIOSpecifications(process.getIoSpecification(), def)); if(process.hasDefinitionalCollaborationRef()) { parentCollaborationRefs.put(pBean, process.getDefinitionalCollaborationRef()); if(process.hasSupportedInterfaceRef()) { for(QName itfRef : process.getSupportedInterfaceRef()) { pBean.addSupportedInterface(findObjectInDefinitions(def, itfRef, InterfaceBean.class)); if(process.getFlowElement()!=null){ fillProcess(pBean,process,def); if(process.getLaneSets()!=null){ for(LaneSet ls : process.getLaneSets()){ if(process.getFlowElementsByClass(SequenceFlow.class)!=null){ for(SequenceFlow sf : process.getFlowElementsByClass(SequenceFlow.class)){ adaptSequenceFlow(sf, pBean, def); for(InputOutputBinding iobinding : process.getIoBinding()) { InputOutputBindingBean iobb = new InputOutputBindingBean(iobinding.getId()); if(iobinding.hasOperationRef()) {
for(String processId : processIds) { for(Process process : bpmnDefs.getProcesses()) { if(process.getId().equals(processId)) { processNames.add(BPELGeneratorHelper.getBPELProcessName(process)); break;
@Override public void visitIOBinding(IInputOutputBinding iobinding) { InputOutputBinding iob = newInstance(InputOutputBinding.class); iob.setId(iobinding.getId()); if(iobinding.getOperation()!=null) { iob.setOperationRef(getBaseElementRef(iobinding.getOperation())); } if(iobinding.getInputData()!=null) { try { iob.setInputDataRef(DefinitionsHelper.findObjectInDefinitions(defs, iobinding.getId(), DataInput.class)); } catch (BPMNException e) { e.printStackTrace(); throw new UncheckedException(e); } } if(iobinding.getOutputData()!=null) { try { iob.setOutputDataRef(DefinitionsHelper.findObjectInDefinitions(defs, iobinding.getId(), DataOutput.class)); } catch (BPMNException e) { e.printStackTrace(); throw new UncheckedException(e); } } currentProcess.addIoBinding(iob); }