Examples of CorrelationKeySet


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

    private Operation getMyRoleOperation(String operationName) {
        return _plinkDef.getMyRoleOperation(operationName);
    }

    private CorrelationKeySet computeCorrelationKeys(MyRoleMessageExchangeImpl mex) {
        CorrelationKeySet keySet = new CorrelationKeySet();

        Operation operation = mex.getOperation();
        Element msg = mex.getRequest().getMessage();
        javax.wsdl.Message msgDescription = operation.getInput().getMessage();

        Set<OScope.CorrelationSet> csets = _plinkDef.getNonInitiatingCorrelationSetsForOperation(operation);
        for (OScope.CorrelationSet cset : csets) {
            CorrelationKey key = computeCorrelationKey(cset,
                    _process.getOProcess().messageTypes.get(msgDescription.getQName()), msg);
            keySet.add(key);
        }

        csets = _plinkDef.getJoinningCorrelationSetsForOperation(operation);
        for (OScope.CorrelationSet cset : csets) {
            CorrelationKey key = computeCorrelationKey(cset,
                    _process.getOProcess().messageTypes.get(msgDescription.getQName()), msg);
            keySet.add(key);
        }

        // Let's creata a key based on the sessionId
        String mySessionId = mex.getProperty(MessageExchange.PROPERTY_SEP_MYROLE_SESSIONID);
        if (mySessionId != null)
            keySet.add(new CorrelationKey("-1", new String[] { mySessionId }));

        return keySet;
    }
View Full Code Here

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

        public CorrelationKey getCorrelationKey() {
            return keySet.iterator().next();
        }

        public void setCorrelationKey(CorrelationKey ckey) {
            keySet = new CorrelationKeySet();
            keySet.add(ckey);
        }
View Full Code Here

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

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

                selector =  new Selector(0,pLinkInstance,_oevent.operation.getName(), _oevent.operation.getOutput() == null, _oevent.messageExchangeId, keySet, _oevent.route);
                getBpelRuntimeContext().select(pickResponseChannel, null, false, new Selector[] { selector} );
                instance(new WAITING(pickResponseChannel));
View Full Code Here

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

    public String getRoute() {
      return _selector.getRoute();
    }

  public CorrelationKeySet getCorrelationKeySet() {
    return new CorrelationKeySet(_selector.getCorrelationKey());
  }
View Full Code Here

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

    }

    public CorrelationKeySet getKeySet() {
        // backward-compatibility; add up keys
        if( _keys.size() > 0 && _keySet == null ) {
            _keySet = new CorrelationKeySet();
        }
        for (CorrelationKey aKey : _keys) {
            if (aKey != null && !_keySet.contains(aKey)) {
                _keySet.add(aKey);
            }
View Full Code Here

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

    public CorrelationKeySet getCorrelationKeySet() {
        // backward compatibility; add up
        if (_correlationKey != null) {
            if( _correlationKeySet == null ) {
                _correlationKeySet = new CorrelationKeySet();
            }
            if(!_correlationKeySet.contains(_correlationKey)) {
                _correlationKeySet.add(_correlationKey);
            }
        }
View Full Code Here

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

    void setCorrelationKeySet(CorrelationKeySet correlationKeySet) {
        _correlationKeys = correlationKeySet.toCanonicalString();
    }

    CorrelationKeySet getCorrelationKeySet() {
        return new CorrelationKeySet(_correlationKeys);
    }
View Full Code Here

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

  public String getRoute() {
    return _routePolicy;
  }
 
  public CorrelationKeySet getCorrelationKeySet() {
    return new CorrelationKeySet(_correlationKey);
  }
View Full Code Here

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

                        // Changing all routes
                        if (corr != null) {
                            for (MessageRouteDAO routeDAO : corr.getAllRoutes()) {
                                CorrelationKey oldKey = routeDAO.getCorrelationKey();
                                if (oldKey != null) {
                                    CorrelationKeySet keySet = new CorrelationKeySet();
                                    keySet.add(oldKey);
                                    routeDAO.setCorrelationKeySet(keySet);
                                }
                            }
                        }
                    }
View Full Code Here

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

                  matchCorrelations.add(cset);
                }
              }

                PartnerLinkInstance pLinkInstance = _scopeFrame.resolve(onMessage.partnerLink);
                CorrelationKeySet keySet = resolveCorrelationKey(pLinkInstance, matchCorrelations);

                selectors[idx] = new Selector(idx, pLinkInstance, onMessage.operation.getName(), onMessage.operation
                        .getOutput() == null, onMessage.messageExchangeId, keySet, onMessage.route);
                idx++;
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.