/** * Get the {@link DebuggerSupport} object for the given process identifier. * Debugger support is required for operations that resume execution in some * way or manipulate the breakpoints. * * @param procid * process identifier * @return associated debugger support object * @throws ManagementException */ protected final DebuggerSupport getDebugger(QName procid) throws ManagementException { BpelProcess process = _server._engine._activeProcesses.get(procid); if (process == null) throw new ProcessNotFoundException("The process \"" + procid + "\" does not exist."); return process._debugger; }
public void setPackageRetired(String packageName, boolean retired) throws ManagementException { try { _store.setRetiredPackage(packageName, retired); } catch (BpelEngineException e) { __log.error("Exception while setting process as retired", e); throw new ProcessNotFoundException("PackageNotFound:" + packageName); } }
public ProcessInfoDocument setRetired(QName pid, boolean retired) throws ManagementException { try { _store.setState(pid, retired ? ProcessState.RETIRED : ProcessState.ACTIVE); } catch (BpelEngineException e) { __log.error("Exception while setting process as retired", e); throw new ProcessNotFoundException("ProcessNotFound:" + pid); } return getProcessInfoCustom(pid, ProcessInfoCustomizer.NONE); }
/** * Get the {@link DebuggerSupport} object for the given process identifier. * Debugger support is required for operations that resume execution in some * way or manipulate the breakpoints. * * @param processId process identifier * @return associated debugger support object */ protected final DebuggerSupport getDebugger(QName processId) { BpelProcess process = ((BpelEngineImpl) bpelServer.getODEBPELServer(). getEngineUnsecured())._activeProcesses.get(processId); if (process == null) { String errMsg = "The process \"" + processId + "\" does not exist."; throw new ProcessNotFoundException(errMsg); } return process.getDebuggerSupport(); }
public ActivityExtInfoListDocument getExtensibilityElements(QName pid, Integer[] aids) { ActivityExtInfoListDocument aeild = ActivityExtInfoListDocument.Factory.newInstance(); TActivitytExtInfoList taeil = aeild.addNewActivityExtInfoList(); OProcess oprocess = _server._engine.getOProcess(pid); if (oprocess == null) throw new ProcessNotFoundException("The process \"" + pid + "\" does not exist."); for (int aid : aids) { OBase obase = oprocess.getChild(aid); if (obase != null && obase.debugInfo != null && obase.debugInfo.extensibilityElements != null) { for (Map.Entry<QName, Object> entry : obase.debugInfo.extensibilityElements.entrySet()) { TActivityExtInfo taei = taeil.addNewActivityExtInfo(); taei.setAiid("" + aid); Object extValue = entry.getValue(); if (extValue instanceof Element) taei.getDomNode().appendChild( taei.getDomNode().getOwnerDocument().importNode((Element) extValue, true)); else if (extValue instanceof String) { Element valueElmt = taei.getDomNode().getOwnerDocument().createElementNS( entry.getKey().getNamespaceURI(), entry.getKey().getLocalPart()); valueElmt.appendChild(taei.getDomNode().getOwnerDocument().createTextNode((String) extValue)); taei.getDomNode().appendChild(valueElmt); } } } } return aeild; }
private ProcessInfoDocument genProcessInfoDocument(BpelDAOConnection conn, QName procid, ProcessInfoCustomizer custom) throws ManagementException { if (procid == null) { throw new InvalidRequestException("Valid QName as process id expected."); } ProcessInfoDocument ret = ProcessInfoDocument.Factory.newInstance(); TProcessInfo pi = ret.addNewProcessInfo(); try { ProcessConf pconf = _store.getProcessConfiguration(procid); if (pconf == null) throw new ProcessNotFoundException("ProcessNotFound:" + procid); fillProcessInfo(pi, pconf, custom); fillProcessInfoSummary(conn, Collections.singletonList(pi), custom); } catch (ManagementException me) { throw me; } catch (Exception e) { __log.error("Exception while retrieving process information", e); throw new ProcessingException("Exception while retrieving process information: " + e.toString()); } return ret; }