Package org.apache.ode.bpel.iapi

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


            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


        // 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 (_engine.isProcessRegistered(conf.getProcessId())) {
View Full Code Here

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

        try {
            BpelProcess p = null;
            if (_engine != null) {
                p = _engine.unregisterProcess(pid);
                if (p != null)
                {
                  _registeredProcesses.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

                }
            });
        } catch (Exception ex) {
            String errmsg = "DbError";
            __log.error(errmsg, ex);
            throw new BpelEngineException(errmsg, ex);
        }
    }
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.
        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(String externalVariableId, Node reference, Long iid) throws ExternalVariableModuleException{
        EVar evar = _externalVariables.get(externalVariableId);
        if (evar == null) {
            // Should not happen if constructor is working.
            throw new BpelEngineException("InternalError: reference to unknown external variable " + externalVariableId);
        }
       
        Locator locator = new Locator(externalVariableId, _pid,iid, reference);
        Value newval;
        newval = evar._engine.readValue(locator );
View Full Code Here

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

                throw new FaultException(oscope.getOwner().constants.qnUninitializedVariable,
                        "The extenral variable \"" + variable.declaration.name + "\" has not been properly initialized;" +
                                "the following key compoenents were missing:" + ike.getMissing());
            } catch (ExternalVariableModuleException e) {
                __log.error("Unexpected EVM error.", e);
                throw new BpelEngineException(e);
            }

        } else /* not external */ {
            Node data = brc.readVariable(variable.scopeInstance,variable.declaration.name, forWriting);
           
View Full Code Here

                commitChanges(brc,related, vrp.reference);
                return vrp.value;
            } catch (ExternalVariableModuleException e) {
                __log.error("External variable initialization error.", e);
                // TODO: need to report this
                throw new BpelEngineException("External varaible initialization error", e);
            }
                       
        } else /* normal variable */ {
            return brc.writeVariable(lvar,val);
        }
View Full Code Here

        try {
            properties.put(Environment.DIALECT, guessDialect(_ds));
        } catch (Exception ex) {
            String errmsg = __msgs.msgOdeInitHibernateDialectDetectFailed();
            __log.error(errmsg, ex);
            throw new BpelEngineException(errmsg, ex);
        }
       
        if (auto) {
            properties.put(Environment.HBM2DDL_AUTO, "create-drop");
        }
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.