Package org.apache.ode.bpel.common

Examples of org.apache.ode.bpel.common.CorrelationKey


         */
        public void run() {
            Selector selector;
            try {
                PickResponseChannel pickResponseChannel = newChannel(PickResponseChannel.class);
                CorrelationKey key;
                PartnerLinkInstance pLinkInstance = _scopeFrame.resolve(_oevent.partnerLink);
                if (_oevent.matchCorrelation == null) {
                    // Adding a route for opaque correlation. In this case correlation is done on "out-of-band" session id.
                    String sessionId = getBpelRuntime().fetchMySessionId(pLinkInstance);
                    key = new CorrelationKey(-1, new String[] {sessionId});
                } else {
                    if (!getBpelRuntime().isCorrelationInitialized(_scopeFrame.resolve(_oevent.matchCorrelation))) {
                        throw new FaultException(_oevent.getOwner().constants.qnCorrelationViolation,"Correlation not initialized.");
                    }
                    key = getBpelRuntime().readCorrelation(_scopeFrame.resolve(_oevent.matchCorrelation));


            propNames[i] = property.name.toString();
            if (__log.isDebugEnabled())
              __log.debug("Setting correlation property " + propNames[i] + "=" + propValues[i]);
        }

        CorrelationKey ckeyVal = new CorrelationKey(cset.declaration.getId(), propValues);
        ckeyVal.setUnique(cset.declaration.isUnique());
        getBpelRuntime().writeCorrelation(cset,ckeyVal);
    }

            propNames[i] = property.name.toString();
            if (__log.isDebugEnabled())
              __log.debug("Setting correlation property " + propNames[i] + "=" + propValues[i]);
        }

        CorrelationKey ckeyVal = new CorrelationKey(cset.declaration.getId(), propValues);
        ckeyVal.setUnique(cset.declaration.isUnique());
        getBpelRuntime().writeCorrelation(cset,ckeyVal);
    }

    getSession().update(_correlationSet);
  }

  public CorrelationKey getValue() {
      entering("CorrelationSetDaoImpl.getValue");
    if (_correlationSet.getValue() != null) return new CorrelationKey(_correlationSet.getValue());
    else return null;
  }

        if (matchCorrelations.isEmpty() && !_opick.createInstanceFlag) {
            // Adding a route for opaque correlation. In this case,
            // correlation is on "out-of-band" session-id
            String sessionId = getBpelRuntimeContext().fetchMySessionId(pLinkInstance);
            keySet.add(new CorrelationKey("-1", new String[] { sessionId }));
        } else if (!matchCorrelations.isEmpty()) {
            for( OScope.CorrelationSet cset : matchCorrelations ) {
                CorrelationKey key = null;

                if(!getBpelRuntimeContext().isCorrelationInitialized(
                    _scopeFrame.resolve(cset))) {
                    if (!_opick.createInstanceFlag) {
                        throw new FaultException(_opick.getOwner().constants.qnCorrelationViolation,

    public Long getId() {
        return _id;
    }

    public CorrelationKey getCorrelationKey() {
        return new CorrelationKey(_correlationKey);
    }

        return _scope;
    }

    public CorrelationKey getValue() {
        if (_correlationKey == null) return null;
        return new CorrelationKey(_correlationKey);
    }

    public void setCorrelationKey(CorrelationKey key) {
         _selector.setCorrelationKey(key.toCanonicalString());
     }

     public CorrelationKey getCorrelationKey() {
         return new CorrelationKey(_selector.getCorrelationKey());
     }

    private ProcessInstanceDAO createProcessInstance(ProcessDAO process, CorrelatorDAO corr) throws SAXException, IOException {
        ProcessInstanceDAO pi = null;
        String[] actions = { "action1","action2" };
        String[] correlationKeys = { "key1", "key2" };
        CorrelationKey key1 = new CorrelationKey("key1",correlationKeys);
        CorrelationKey key2 = new CorrelationKey("key2",correlationKeys);
        CorrelationKey[] corrkeys = {key1,key2};
        QName[] names = { new QName(TEST_NS,"name1"), new QName(TEST_NS,"name2") };

        pi = process.createInstance(corr);

            OProcess.OProperty property = cset.declaration.properties.get(i);
            propValues[i] = readProperty(variable, property);
            propNames[i] = property.name.toString();
        }

        CorrelationKey ckeyVal = new CorrelationKey(cset.declaration.name, propValues);
        writeCorrelation(cset, ckeyVal);
    }

TOP

Related Classes of org.apache.ode.bpel.common.CorrelationKey

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.