Package org.apache.ode.bpel.dao

Examples of org.apache.ode.bpel.dao.ScopeDAO


    public Long createScopeInstance(Long parentScopeId, String name, int modelId) {
        if (ODEProcess.__log.isTraceEnabled())
            ODEProcess.__log.trace(ObjectPrinter.stringifyMethodEnter("createScopeInstance", new Object[] { "parentScopeId",
                    parentScopeId, "name", name }));

        ScopeDAO parent = null;

        if (parentScopeId != null) {
            parent = _dao.getScope(parentScopeId);
        }

        ScopeDAO scopeDao = _dao.createScope(parent, name, modelId);
        return scopeDao.getScopeInstanceId();
    }
View Full Code Here


    public void initializePartnerLinks(Long parentScopeId, Collection<? extends PartnerLinkModel> partnerLinks) {
        if (ODEProcess.__log.isTraceEnabled())
            ODEProcess.__log.trace(ObjectPrinter.stringifyMethodEnter("initializeEndpointReferences", new Object[] {
                    "parentScopeId", parentScopeId, "partnerLinks", partnerLinks }));

        ScopeDAO parent = _dao.getScope(parentScopeId);
        for (PartnerLinkModel partnerLink : partnerLinks) {
            PartnerLinkDAO pdao = parent.createPartnerLink(partnerLink.getId(), partnerLink.getName(),
                    partnerLink.getMyRoleName(), partnerLink.getPartnerRoleName());
            // If there is a myrole on the link, initialize the session id so it is always
            // available for opaque correlations. The myrole session id should never be changed.
            if (partnerLink.hasMyRole()) pdao.setMySessionId(new GUID().toString());
        }
View Full Code Here

            }
        }
    }

    public CorrelationKey readCorrelation(CorrelationSet cset) {
        ScopeDAO scopeDAO = _dao.getScope(cset.getScopeId());
        CorrelationSetDAO cs = scopeDAO.getCorrelationSet(cset.getName());
        return cs.getValue();
    }
View Full Code Here

    public Element fetchMyRoleEndpointReferenceData(PartnerLink pLink) {
        return _bpelProcess.getInitialMyRoleEPR(pLink.getModel()).toXML().getDocumentElement();
    }

    private PartnerLinkDAO fetchPartnerLinkDAO(PartnerLink pLink) {
        ScopeDAO scopeDAO = _dao.getScope(pLink.getScopeId());
        return scopeDAO.getPartnerLink(pLink.getModel().getId());
    }
View Full Code Here

     * @return value of property for variable, in String form
     * @throws org.apache.ode.bpel.common.FaultException
     *             in case of selection or other fault
     */
    public String readVariableProperty(Variable variable, QName property) throws UninitializedVariableException {
        ScopeDAO scopeDAO = _dao.getScope(variable.getScopeId());
        XmlDataDAO dataDAO = scopeDAO.getVariable(variable.getName());
        if (dataDAO.isNull()) throw new UninitializedVariableException();
        return dataDAO.getProperty(QNameUtils.fromQName(property));
    }
View Full Code Here

        if (dataDAO.isNull()) throw new UninitializedVariableException();
        return dataDAO.getProperty(QNameUtils.fromQName(property));
    }

    public Node fetchVariableData(Variable variable, boolean forWriting) {
        ScopeDAO scopeDAO = _dao.getScope(variable.getScopeId());
        XmlDataDAO dataDAO = scopeDAO.getVariable(variable.getName());
        if (dataDAO.isNull()) return null;
        return dataDAO.get();
    }
View Full Code Here

        }
        return _contexts.eprContext.convertEndpoint(nodeQName, sourceNode).toXML();
    }

    public void commitChanges(Variable variable, Node changes) {
        ScopeDAO scopeDAO = _dao.getScope(variable.getScopeId());
        XmlDataDAO dataDAO = scopeDAO.getVariable(variable.getName());
        dataDAO.set(changes);
    }
View Full Code Here

        XmlDataDAO dataDAO = scopeDAO.getVariable(variable.getName());
        dataDAO.set(changes);
    }

    public void writeVariableProperty(Variable variable, QName property, String value) throws UninitializedVariableException {
        ScopeDAO scopeDAO = _dao.getScope(variable.getScopeId());
        XmlDataDAO dataDAO = scopeDAO.getVariable(variable.getName());
        if (dataDAO.isNull()) throw new UninitializedVariableException();
        dataDAO.setProperty(QNameUtils.fromQName(property), value);
    }
View Full Code Here

                __log.debug("Not creating a new instance for process " + processDAO.getProcessId() + "; unique correlation constraint would be violated!");
                throw new FaultException(cset.getOwner().getConstantsModel().getDuplicateInstance());
            }
        }         
       
        ScopeDAO scopeDAO = _dao.getScope(cset.getScopeId());
        CorrelationSetDAO cs = scopeDAO.getCorrelationSet(cset.getName());
        cs.setValue(propNames, correlation);

        CorrelationSetWriteEvent cswe = new CorrelationSetWriteEvent(cset.getName(), correlation);
        cswe.setScopeId(cset.getScopeId());
        sendEvent(cswe);
View Full Code Here

        VariableInfoDocument ret = VariableInfoDocument.Factory.newInstance();
        final TVariableInfo vinf = ret.addNewVariableInfo();
        final TVariableRef sref = vinf.addNewSelf();
        dbexec(new BpelDatabase.Callable<Object>() {
            public Object run(BpelDAOConnection session) throws Exception {
                ScopeDAO scope = session.getScope(new Long(scopeId));
                if (scope == null) {
                    throw new InvalidRequestException("ScopeNotFound:" + scopeId);
                }

                sref.setSiid(scopeId);
                sref.setIid(scope.getProcessInstance().getInstanceId().toString());
                sref.setName(varName);

                XmlDataDAO var = scope.getVariable(varName);
                if (var == null) {
                    throw new InvalidRequestException("VarNotFound:" + varName);
                }

                Node nval = var.get();
View Full Code Here

TOP

Related Classes of org.apache.ode.bpel.dao.ScopeDAO

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.