Package org.apache.ode.bpel.common

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


    return _scope;
  }

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


        if (__log.isDebugEnabled()) {
            __log.debug("INPUTMSG: " + correlatorId + ": MSG RCVD keys=" + CollectionUtils.makeCollection(HashSet.class, processKeys)
                    + " mySessionId=" + mySessionId + " partnerSessionId=" + partnerSessionId);
        }

        CorrelationKey matchedKey = null;

        // Try to find a route for one of our keys.
        for (CorrelationKey key : processKeys) {
            messageRoute = correlator.findRoute(key);
            if (messageRoute != null) {

        javax.wsdl.Message msgDescription = operation.getInput().getMessage();
        List<CorrelationKey> keys = new ArrayList<CorrelationKey>();

        Set<CorrelationSetModel> csets = _plinkDef.getCorrelationSetsForOperation(operation);
        for (CorrelationSetModel cset : csets) {
            CorrelationKey key = computeCorrelationKey(cset, msgDescription.getQName(), msg);
            keys.add(key);
        }

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

        return keys.toArray(new CorrelationKey[keys.size()]);
    }

        javax.wsdl.Message msgDescription = operation.getInput().getMessage();
        List<CorrelationKey> keys = new ArrayList<CorrelationKey>();

        Set<CorrelationSetModel> csets = _plinkDef.getUniqueCorrelationSetsForOperation(operation);
        for (CorrelationSetModel cset : csets) {
            CorrelationKey key = computeCorrelationKey(cset, msgDescription.getQName(), msg);
            keys.add(key);
        }

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

        return keys.toArray(new CorrelationKey[keys.size()]);
    }

                    throw new InvalidMessageException(emsg, e);
                }
            }
        }

        CorrelationKey key = new CorrelationKey(cset.getId(), values);
        key.setUnique(cset.isUnique());
        return key;
    }

        try {
            selectors = new Selector[_opick.onMessages.size()];
            int idx = 0;
            for (OPickReceive.OnMessage onMessage : _opick.onMessages) {
                CorrelationKey key = null; // this will be the case for the
                // createInstance activity

                PartnerLinkInstance pLinkInstance = _scopeFrame.resolve(onMessage.partnerLink);
                if (onMessage.matchCorrelation == null && !_opick.createInstanceFlag) {
                    // Adding a route for opaque correlation. In this case,
                    // correlation is on "out-of-band" session-id
                    String sessionId = getBpelRuntime().fetchMySessionId(pLinkInstance);
                    key = new CorrelationKey(-1, new String[] { sessionId });
                } else if (onMessage.matchCorrelation != null) {
                    if (!getBpelRuntime().isCorrelationInitialized(
                            _scopeFrame.resolve(onMessage.matchCorrelation))) {
                        // the following should really test if this is a "join"
                        // type correlation...

        Node ret;
        if (variable.type instanceof OConstantVarType) {
            ret = ((OConstantVarType) variable.type).getValue();
        } else if (variable.type instanceof OPropertyVarType) {
            CorrelationSetInstance set = _scopeInstance.resolve(variable.name);
            CorrelationKey key = _native.readCorrelation(set);
            if (key == null) return null;
            String keyValue = key.getValues()[0];
            Document doc = DOMUtils.newDocument();
            ret = doc.createTextNode(keyValue);
        } else {
            VariableInstance varInstance = _scopeInstance.resolve(variable);
            if (varInstance == null)

        try {
            selectors = new Selector[_opick.onMessages.size()];
            int idx = 0;
            for (OPickReceive.OnMessage onMessage : _opick.onMessages) {
                CorrelationKey key = null; // this will be the case for the
                // createInstance activity

                PartnerLinkInstance pLinkInstance = _scopeFrame.resolve(onMessage.partnerLink);
                if (onMessage.matchCorrelation == null && !_opick.createInstanceFlag) {
                    // Adding a route for opaque correlation. In this case,
                    // correlation is on "out-of-band" session-id
                    String sessionId = getBpelRuntime().fetchMySessionId(pLinkInstance);
                    key = new CorrelationKey(-1, new String[] { sessionId });
                } else if (onMessage.matchCorrelation != null) {
                    if (!getBpelRuntime().isCorrelationInitialized(
                            _scopeFrame.resolve(onMessage.matchCorrelation))) {
                        // the following should really test if this is a "join"
                        // type correlation...

                se = new PartnerLinkModificationEvent(((OAssign.PartnerLinkRef) ocopy.to).partnerLink.getName());
            } else if (ocopy.to.getVariable().type instanceof OPropertyVarType) {
                // For poperty assignment, the property, the variable that points to it and the correlation set
                // all have the same name
                CorrelationSetInstance csetInstance = _scopeFrame.resolve(ocopy.to.getVariable().name);
                CorrelationKey ckey = new CorrelationKey(csetInstance.declaration.getId(), new String[] { rvalue.getTextContent() });
                if (__log.isDebugEnabled()) __log.debug("Writing correlation " + csetInstance.getName()
                        + " using value " + rvalue.getTextContent());
                getBpelRuntime().writeCorrelation(csetInstance, ckey);
                se = new CorrelationSetWriteEvent(csetInstance.declaration.name, ckey);
            } else {

         */
        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));

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.