ProcessConfDAO processConfDao = duDao.createProcess(pConf.getProcessId(), pConf.getType(), pConf.getVersion()); processConfDao.setState(pConf.getState()); for (Map.Entry<QName, Node> prop : pConf.getProcessProperties().entrySet()) { processConfDao.setProperty(prop.getKey(), DOMUtils.domToString(prop.getValue())); conn.setVersion(pConf.getVersion()); } catch (Exception e) { String errmsg = "Error persisting deployment record for " + pConf.getProcessId() + "; process will not be available after restart!"; log.error(errmsg, e);
/** * Retrives the base URI to use for local resource resolution. * * @return URI - instance representing the absolute file path to the physical location of the process definition folder. */ public URI getBaseResourceURI() { return this._pconf.getBaseURI(); }
String bpelDoc = pConf.getBpelDocument(); List<File> files = pConf.getFiles(); String errMsg = "Process Definition for: " + pConf.getProcessId() + " not found"; log.error(errMsg); throw new ProcessManagementException(errMsg);
if( __log.isDebugEnabled() ) __log.debug("Filling process info for " + pconf.getProcessId()); info.setPid(pconf.getProcessId().toString()); if (pconf.getState() == ProcessState.RETIRED) { info.setStatus(TProcessStatus.RETIRED); } else { info.setStatus(TProcessStatus.ACTIVE); info.setVersion(pconf.getVersion()); definfo.setProcessName(pconf.getType()); depinfo.setPackage(pconf.getPackage()); if( __log.isDebugEnabled() ) __log.debug(" package name: " + depinfo.getPackage()); depinfo.setDocument(pconf.getBpelDocument()); depinfo.setDeployDate(toCalendar(pconf.getDeployDate())); depinfo.setDeployer(pconf.getDeployer()); List<File> files = pconf.getFiles(); if (files != null) genDocumentInfo(docinfo, files.toArray(new File[files.size()]), true); else if (__log.isDebugEnabled()) __log.debug("fillProcessInfo: No files for " + pconf.getProcessId()); for (Map.Entry<QName, Node> propEntry : pconf.getProcessProperties().entrySet()) { TProcessProperties.Property tprocProp = properties.addNewProperty(); tprocProp.setName(new QName(propEntry.getKey().getNamespaceURI(), propEntry.getKey().getLocalPart()));
public static LimitedProcessInfoType createLimitedProcessInfoObject(ProcessConf processConf) { LimitedProcessInfoType processInfoObject = new LimitedProcessInfoType(); processInfoObject.setPid(processConf.getProcessId().toString()); processInfoObject.setDeployedDate(toCalendar(processConf.getDeployDate())); processInfoObject.setVersion(processConf.getVersion()); if (processConf.getState() == ProcessState.RETIRED) { processInfoObject.setStatus(ProcessStatus.RETIRED); } else if (processConf.getState() == ProcessState.DISABLED) { processInfoObject.setStatus(ProcessStatus.DISABLED); } else { processInfoObject.setStatus(ProcessStatus.ACTIVE); } //check and set the olderVersion of the process if (processConf.getState() == ProcessState.RETIRED) { processInfoObject.setStatus(ProcessStatus.RETIRED); processInfoObject.setOlderVersion(isOlderVersion(processConf, getTenantProcessStore())); } else if (processConf.getState() == ProcessState.DISABLED) { processInfoObject.setStatus(ProcessStatus.DISABLED); processInfoObject.setOlderVersion(0); } else { processInfoObject.setStatus(ProcessStatus.ACTIVE); processInfoObject.setOlderVersion(0); } processInfoObject.setPackageName(processConf.getPackage()); return processInfoObject; }
try { ProcessConf pc = _store.getProcessConfiguration(pid); InputStream is = pc.getCBPInputStream(); OProcess compiledProcess = null; try { for (Map.Entry<String, Endpoint> provide : pc.getProvideEndpoints().entrySet()) { if (provide.getValue().equals(endpoint)) { OPartnerLink plink = compiledProcess.getPartnerLink(provide.getKey()); Definition def = pc.getDefinitionForService(endpoint.serviceName); if (def == null) { __log.debug("Could not find definition for service: " + endpoint.serviceName);
removeBPELProcessProxyAndAxisService(processConfiguration.getDeployer(), serviceName, portName); services.put(processConfiguration.getDeployer(), serviceName, portName, processProxy); log.debug("BPELProcessProxy created for process " + processConfiguration.getProcessId()); log.debug("AxisService " + serviceName + " created for BPEL process " + processConfiguration.getProcessId());
private void doHydrate() { markused(); __log.debug("Rehydrating process " + _pconf.getProcessId()); try { InputStream inputStream = _pconf.getCBPInputStream(); try { _oprocess = deserializeCompiledProcess(inputStream); createProcessDAO(_engine._contexts.inMemDao.getConnection(), _pid, _pconf.getVersion(), _oprocess); } else if (_engine._contexts.scheduler.isTransacted()) { createProcessDAO(_engine._contexts.dao.getConnection(), _pid, _pconf.getVersion(), _oprocess); if(__log.isDebugEnabled()) __log.debug("Created new process DAO for " + _pid + " (guid=" + _oprocess.guid + ")."); } else {
private PartnerService createPartnerService(ProcessConf pConf, QName serviceName, String portName) throws ContextException { PartnerService partnerService; Definition def = pConf.getDefinitionForService(serviceName); try { if (log.isDebugEnabled()) { log.debug("Creating external service " + serviceName); } partnerService = new PartnerService(def, serviceName, portName, getConfigurationContextFromProcessConfiguration(pConf), pConf, bpelServer.getHttpConnectionManager()); } catch (Exception ex) { throw new ContextException("Error creating external service! name:" + serviceName + ", port:" + portName, ex); } // if not SOAP nor HTTP binding if (partnerService == null) { throw new ContextException("Only SOAP and HTTP binding supported!"); } if (log.isDebugEnabled()) { log.debug("Created external service " + serviceName); } return partnerService; }
String portName = processProxy.getPort(); ProcessConf pConf = processProxy.getProcessConfiguration(); QName pid = pConf.getProcessId(); InputStream wsdlInStream = null; URI wsdlBaseURI = pConf.getBaseURI() .resolve(wsdlDef.getDocumentBaseURI()); try {
axisService.setClassLoader(axisConfiguration.getServiceClassLoader()); URL wsdlUrl = null; for (File file : pConf.getFiles()) { if (file.getAbsolutePath(). indexOf(processProxy.getWsdlDefinition().getDocumentBaseURI()) > 0) { } catch (MalformedURLException e) { String errorMessage = "Cannot convert File URI to URL."; handleException(pConf.getProcessId(), errorMessage, e); axisService.addParameter(BPELConstants.PROCESS_ID, pConf.getProcessId());
public long getTimeout(OPartnerLink partnerLink, boolean p2p) { // OPartnerLink, PartnerLinkPartnerRoleImpl final PartnerLinkPartnerRoleImpl linkPartnerRole = _partnerRoles.get(partnerLink); long timeout = Properties.DEFAULT_MEX_TIMEOUT; if (linkPartnerRole._initialEPR != null) { String property = null; String value = null; Map<String, String> props = _pconf.getEndpointProperties(linkPartnerRole._initialEPR); if (p2p) { property = Properties.PROP_P2P_MEX_TIMEOUT; value = props.get(property); } if (value == null) { property = Properties.PROP_MEX_TIMEOUT; value = props.get(property); } if (value != null) { try { timeout = Long.parseLong(value); } catch (NumberFormatException e) { if (__log.isWarnEnabled()) __log.warn("Mal-formatted Property: [" + property + "=" + value + "] Default value (" + timeout + ") will be used"); } } } return timeout; }
log.debug("Creating AxisService: Service=" + serviceName + " port=" + portName + " WSDL=" + wsdlDefinition.getDocumentBaseURI() + " BPEL=" + processConfiguration.getBpelDocument());
info.setPid(pconf.getProcessId().toString()); if (pconf.getState() == ProcessState.RETIRED) { info.setStatus(ProcessStatus.RETIRED); info.setOlderVersion(AdminServiceUtils.isOlderVersion(pconf, tenantProcessStore)); } else if (pconf.getState() == ProcessState.DISABLED) { info.setStatus(ProcessStatus.DISABLED); info.setOlderVersion(0); info.setOlderVersion(0); info.setVersion(pconf.getVersion()); defInfo.setProcessName(pconf.getType()); BpelDefinition bpelDefinition = new BpelDefinition(); bpelDefinition.setExtraElement(getProcessDefinition(pconf)); depInfo.setPackageName(pconf.getPackage()); depInfo.setDocument(pconf.getBpelDocument()); depInfo.setDeployDate(AdminServiceUtils.toCalendar(pconf.getDeployDate())); for (Map.Entry<QName, Node> propEntry : pconf.getProcessProperties().entrySet()) { QName key = propEntry.getKey(); if (key != null) {
String msg = "Process ID => " + this.processConfiguration.getProcessId() + " Deployer => " + this.processConfiguration.getDeployer(); log.debug(msg);
public PartnerRoleChannel createPartnerRoleChannel(QName processId, PortType portType, Endpoint initialPartnerEndpoint) { ProcessConf processConfiguration = ((ProcessStore) bpelServer.getMultiTenantProcessStore()) .getProcessConfiguration(processId); Definition wsdl = processConfiguration.getDefinitionForService( initialPartnerEndpoint.serviceName); if (wsdl == null) { throw new ContextException("Cannot find definition for service " + initialPartnerEndpoint.serviceName + " in the context of process " + processId); } return createPartnerService(processConfiguration, initialPartnerEndpoint.serviceName, initialPartnerEndpoint.portName); }
/** * do not store the value so it can be dynamically updated. * * @return Message Exchange Timeout */ private long getTimeout() { String timeout = processConfiguration.getEndpointProperties(serviceReference) .get(Properties.PROP_MEX_TIMEOUT); if (timeout != null) { try { return Long.parseLong(timeout); } catch (NumberFormatException e) { log.warn("Mal-formatted Property: [" + Properties.PROP_MEX_TIMEOUT + "=" + timeout + "] Default value (" + Properties.DEFAULT_MEX_TIMEOUT + ") will be used"); } } // Default value is 120000 milliseconds and if specified in bps.xml configuration file, that value will be // returned. return BPELServerImpl.getInstance().getBpelServerConfiguration().getMexTimeOut(); }