Package org.apache.ode.bpel.iapi

Examples of org.apache.ode.bpel.iapi.BpelEngineException


            }
        } catch (BpelEngineException ex) {
            throw ex;
        } catch (Exception dce) {
            __log.error("DbError", dce);
            throw new BpelEngineException("DbError", dce);
        }
    }
View Full Code Here


                }
            });
        } catch (Exception ex) {
            String errmsg = "DbError";
            __log.error(errmsg, ex);
            throw new BpelEngineException(errmsg, ex);
        }
    }
View Full Code Here

                    }
                });
            } catch (Exception ex) {
                String errmsg = "DbError";
                __log.error(errmsg, ex);
                throw new BpelEngineException(errmsg, ex);
            }
        }

        synchronized (_runningProcesses) {
            _runningProcesses.add(process);
View Full Code Here

            if (process == null) {
                String errmsg = __msgs.msgProcessNotActive(pdao.getProcessId());
                __log.error(errmsg);
                // TODO: Perhaps we should define a checked exception for this
                // condition.
                throw new BpelEngineException(errmsg);
            }
            {
                OPartnerLink plink = (OPartnerLink) process.getOProcess().getChild(mexdao.getPartnerLinkModelId());
                PortType ptype = plink.partnerRolePortType;
                Operation op = plink.getPartnerRoleOperation(mexdao.getOperation());
                // TODO: recover Partner's EPR
                mex = new PartnerRoleMessageExchangeImpl(this, mexdao, ptype, op, null, plink.hasMyRole() ? process
                        .getInitialMyRoleEPR(plink) : null, process.getPartnerRoleChannel(plink));
            }
            break;
        case MessageExchangeDAO.DIR_PARTNER_INVOKES_MYROLE:
            mex = new MyRoleMessageExchangeImpl(this, mexdao);
            if (process != null) {
                OPartnerLink plink = (OPartnerLink) process.getOProcess().getChild(mexdao.getPartnerLinkModelId());
                PortType ptype = plink.myRolePortType;
                Operation op = plink.getMyRoleOperation(mexdao.getOperation());
                mex.setPortOp(ptype, op);
            }
            break;
        default:
            String errmsg = "BpelEngineImpl: internal error, invalid MexDAO direction: " + mexId;
            __log.fatal(errmsg);
            throw new BpelEngineException(errmsg);
        }

        return mex;
    }
View Full Code Here

    public ExternalVariableConf(List<Element> els) {
       
        for (Element el : els) {
            String varId = el.getAttribute("id");
            if (varId == null || "".equals(varId))
                throw new BpelEngineException("Invalid external variable configuration; id not specified.");
            if (_vars.containsKey(varId))
                throw new BpelEngineException("Invalid external variable configuration; duplicate id \""+  varId + " \".");


            Element child = DOMUtils.getFirstChildElement(el);
            if (child == null)
                throw new BpelEngineException("Invalid external variable configuration for id \"" + varId + "\"; no engine configuration!");
           
            QName engineQName = new QName(child.getNamespaceURI(), child.getLocalName());
           
            Variable var = new Variable(varId, engineQName, child);
            _vars.put(varId,var);
View Full Code Here

           
            try {
                evar._engine.configure(_pid, evar._extVarId, evar._config);
            } catch (ExternalVariableModuleException eve) {
                __log.error("External variable subsystem configuration error.", eve);
                throw new BpelEngineException("External variable subsystem configuration error.",eve);
            }
            if (_externalVariables.containsKey(var.extVariableId)) {
                __log.warn("Duplicate external variable configuration for \"" + var.extVariableId + "\" will be ignored!");
            }
            _externalVariables.put(var.extVariableId, evar);
        }

        // Walk down the process definition looking for any external variables.
        // TODO move this to deployment
//        for (OBase child : oprocess.getChildren()) {
//            if (!(child instanceof OScope))
//                continue;
//            OScope oscope = (OScope) child;
//            for (OScope.Variable var : oscope.variables.values()) {
//                if (var.extVar == null)
//                    continue;
//
//                EVar evar = _externalVariables.get(var.extVar.externalVariableId);
//                if (evar == null) {
//                    __log.error("The \"" + oscope.name + "\" scope declared an unknown external variable \""
//                            + var.extVar.externalVariableId + "\"; check the deployment descriptor.");
//                    fatal = true;
//                    continue;
//                }
//            }
//        }

        if (fatal) {
            String errmsg = "Error initializing external variables. See log for details.";
            __log.error(errmsg);
            throw new BpelEngineException(errmsg);
        }

    }
View Full Code Here

     */
    public Value read(Variable variable, Node reference, Long iid) throws ExternalVariableModuleException{
        EVar evar = _externalVariables.get(variable.getExternalId());
        if (evar == null) {
            // Should not happen if constructor is working.
            throw new BpelEngineException("InternalError: reference to unknown external variable " + variable.getExternalId());
        }
       
        Locator locator = new Locator(variable.getExternalId(), _pid,iid, reference);
        Value newval;
        newval = evar._engine.readValue(variable.getElementType(), locator );
View Full Code Here

   
    public Value write(Variable variable, Node reference, Node val, Long iid) throws ExternalVariableModuleException  {
        EVar evar = _externalVariables.get(variable.getExternalId());
        if (evar == null) {
            // Should not happen if constructor is working.
            throw new BpelEngineException("InternalError: reference to unknown external variable " + variable.getExternalId());
        }
       
        Locator locator = new Locator(variable.getExternalId(),_pid,iid,reference);
        Value newval = new Value(locator,val,null);
        newval = evar._engine.writeValue(variable.getElementType(), newval);
View Full Code Here

        // lock.
        try {
            _mngmtLock.writeLock().lockInterruptibly();
        } catch (InterruptedException ie) {
            __log.debug("register(...) interrupted.", ie);
            throw new BpelEngineException(__msgs.msgOperationInterrupted());
        }

        try {
            // If the process is already active, do nothing.
            if (_registeredProcesses.containsKey(conf.getProcessId())) {
View Full Code Here

        try {
            _mngmtLock.writeLock().lockInterruptibly();
        } catch (InterruptedException ie) {
            __log.debug("unregister() interrupted.", ie);
            throw new BpelEngineException(__msgs.msgOperationInterrupted());
        }

        try {
            ODEProcess p = _registeredProcesses.remove(pid);
            if (p == null)
                return;

            // TODO Looks like there are some possible bugs here, if a new version of a process gets
            // deployed, the service will be removed.
            p.deactivate();
           
            // Remove the process from any services that might reference it.
            // However, don't remove the service itself from the map.
            for (List<ODEProcess> processes : _serviceMap.values()) {
                __log.debug("removing process " + pid + "; handle " + p + "; exists " + processes.contains(p));
                processes.remove(p);
            }

            __log.info(__msgs.msgProcessUnregistered(pid));

        } catch (Exception ex) {
            __log.error(__msgs.msgProcessUnregisterFailed(pid), ex);
            throw new BpelEngineException(ex);
        } finally {
            _mngmtLock.writeLock().unlock();
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.ode.bpel.iapi.BpelEngineException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.