public synchronized File getBPELFile() throws IOException { if (bpelFile != null) { String location = implementation.getProcessDefinition().getLocation(); String fileName = implementation.getProcessDefinition().getURI(); File file = new File(workingDir, fileName); if (file.isFile()) { bpelFile = file; return file; } URL url = new URL(location); this.bpelFile = copy(url, workingDir, fileName); } return bpelFile; }
/** * Gets the File containing the BPEL process definition * @return - the File object containing the BPEL process */ private File getBPELFile() { if( theBPELFile != null ) return theBPELFile; try { String location = this.implementation.getProcessDefinition().getLocation(); URI locationURI; if (location.indexOf('%') != -1) { locationURI = URI.create(location); } else { locationURI = new URI(null, location, null); } File theProcess = new File(locationURI); theBPELFile = theProcess; return theProcess; } catch( Exception e ) { if(__log.isDebugEnabled()) { __log.debug("Exception converting BPEL file URL to an URI: " + e ); } } // end try return null; } // end getBPELFile
/** * Gets the File containing the BPEL process definition * @return - the File object containing the BPEL process */ private File getBPELFile() { try { String location = this.implementation.getProcessDefinition().getLocation(); URI locationURI; if (location.indexOf('%') != -1) { locationURI = URI.create(location); } else { locationURI = new URI(null, location, null); } File theProcess = new File(locationURI); return theProcess; } catch( Exception e ) { if(__log.isDebugEnabled()) { __log.debug("Exception converting BPEL file URL to an URI: " + e ); } } // end try return null; } // end getBPELFile
/** * Returns an InputStream containing the Compiled BPEL Process (CBP) */ public InputStream getCBPInputStream() { //System.out.println("getCBPInputStream called"); File cbpFile = getCBPFile(); if( cbpFile == null ) return null; if( cbpFile.exists() ) { // Create an InputStream from the cbp file... try { return new FileInputStream( cbpFile ); } catch ( Exception e ) { if(__log.isDebugEnabled()) { __log.debug("Unable to open the cbp file for BPEL process: " + implementation.getProcessDefinition().getName(), e); } } // end try } else { // Cannot find the cbp file if(__log.isWarnEnabled()){ __log.warn("Cannot find the cbp file for process: " + implementation.getProcessDefinition().getName()); } } // end if // TODO - need better exception handling if we can't open the cbp file for any reason return null; } // end getCBPInputStream
/** * Returns a String containing the (local) name of the file containing the BPEL process */ public String getBpelDocument() { //System.out.println("getBPELDocument called"); try { String location = this.implementation.getProcessDefinition().getLocation(); URI locationURI = new URI(null, location, null); File processFile = new File(locationURI); return getRelativePath( getDirectory(), processFile); } catch (Exception e) { if(__log.isWarnEnabled()) { __log.warn("Unable to resolve relative path of BPEL process" + implementation.getProcessDefinition().getLocation(), e ); } return null; } // end try } // end getBpelDocument
/** * Gets the File object for the CBP file for this BPEL Process * @return - the File object for the CBP file */ private File getCBPFile() { // Find the CBP file - it has the same name as the BPEL process and lives in the same // directory as the process file String cbpFileName = null; try { String fileName = getRelativePath( getDirectory(), getBPELFile() ); cbpFileName = fileName.substring(0, fileName.lastIndexOf(".")) + ".cbp"; } catch (Exception e ) { // IOException trying to fetch the BPEL file name if(__log.isDebugEnabled()) { __log.debug("Unable to calculate the file name for BPEL process: " + implementation.getProcessDefinition().getName(), e); return null; } // end if } // end try File cbpFile = new File( getDirectory(), cbpFileName ); return cbpFile; } // end getCBPFile
String location = this.implementation.getProcessDefinition().getLocation(); URI deployURI = new URI(null, location, null);
/** * Return the WSDL Definition for a given PortType * @param portTypeName - the QName of the PortType */ public Definition getDefinitionForPortType( QName portTypeName ) { //System.out.println("getDefinitionForPortType called for portType: " + portTypeName ); // Find the named PortType in the list of WSDL interfaces associated with this BPEL Process Collection<WSDLInterface> theInterfaces = implementation.getProcessDefinition().getInterfaces(); for( WSDLInterface wsdlInterface : theInterfaces ) { if ( wsdlInterface.getPortType().getQName().equals( portTypeName ) ) { // Extract and return the Definition associated with the WSDLDefinition... return wsdlInterface.getWsdlDefinition().getDefinition(); } // end if } // end for return null; } // end getDefinitionforPortType
BPELProcessDefinition theProcess = impl.getProcessDefinition(); List<BPELPartnerLinkElement> partnerLinks = theProcess.getPartnerLinks();
BPELProcessDefinition theProcess = impl.getProcessDefinition(); List<BPELPartnerLinkElement> partnerLinks = theProcess.getPartnerLinks();