Package org.apche.ode.bpel.evar.ExternalVariableModule

Examples of org.apche.ode.bpel.evar.ExternalVariableModule.Value


        }
    }

  public Node readExtVar(String externalVariableId, Node reference) throws ExternalVariableModuleException {
    Value val = _bpelProcess.getEVM().read(externalVariableId, reference, _iid);
    return val.value;
  }
View Full Code Here


  }

  public ValueReferencePair writeExtVar(String externalVariableId, Node reference, Node value) throws ExternalVariableModuleException {
    ValueReferencePair vrp = new ValueReferencePair();
   
    Value val = _bpelProcess.getEVM().write(externalVariableId, reference, value, _iid);
    vrp.reference = val.locator.reference;
    vrp.value = val.value;
   
    return vrp;
  }
View Full Code Here

            // 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 );
        if (newval == null)
            return null;
        return newval;
    }
View Full Code Here

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

        return newval;
    }
View Full Code Here

    @Test
    public void testInitWriteValue() throws Exception {
        testConfigure();
       
        Locator locator = new Locator("evar1",_pid,_iid);
        Value value = new Value(locator, _el1, null);
        value = _engine.writeValue(value);
        assertNotNull(value);
        assertNotNull(value.locator);
        System.out.println(DOMUtils.domToString(value.locator.reference));
        assertTrue(DOMUtils.domToString((Element)value.locator.reference).indexOf("id1")!=-1);
View Full Code Here

    @Test
    public void testWriteUpdate() throws Exception {
        testConfigure();
       
        Locator locator = new Locator("evar1",_pid,_iid);
        Value value = new Value(locator, _el1, null);
        value = _engine.writeValue(value);
        String domstr = DOMUtils.domToStringLevel2(value.value);
        Value newvalue = new Value(value.locator,DOMUtils.stringToDOM(domstr.replaceAll("<bar>bar</bar>", "<bar>boohoo</bar>")),null);
        _engine.writeValue(newvalue);
        Value reread = _engine.readValue(newvalue.locator);
        domstr = DOMUtils.domToString(reread.value);
        assertTrue(domstr.contains("boohoo"));
        assertFalse(domstr.contains(">bar<"));
    }
View Full Code Here

   
    @Test
    public void testRead() throws Exception {
        testConfigure();
        Locator locator = new Locator("evar1",_pid,_iid);
        Value value = new Value(locator, _el1, null);
        value = _engine.writeValue(value);
       
       
        Value readVal = _engine.readValue(value.locator);
       
        assertEquals(_iid,readVal.locator.iid);
        assertEquals(_pid,readVal.locator.pid);
        assertEquals(2, DOMUtils.countKids((Element)readVal.locator.reference, Node.ELEMENT_NODE));
        assertEquals(DOMUtils.domToString(value.locator.reference), DOMUtils.domToString(readVal.locator.reference));
View Full Code Here

TOP

Related Classes of org.apche.ode.bpel.evar.ExternalVariableModule.Value

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.