6 Replies Latest reply: Apr 10, 2014 12:13 AM by Eric Elzinga RSS

    Bpel if condition xpath expression

    df2c34c2-5c8e-43f8-b04f-6fe73057edb7

      Hi,

       

      I have below problem to discuss :

      My request xml is similar to:


      <ABC>
      <ServiceCharacteristic>
        
      <Code>AAA</Code>
        
      <CharacteristicValue>
        
      <CharacteristicValue>2222</CharacteristicValue>
        
      </CharacteristicValue>
      </ServiceCharacteristic>

      <ServiceCharacteristic>
        
      <Code>BBB</Code>
        
      <CharacteristicValue>
        
      <CharacteristicValue>2223</CharacteristicValue>
        
      </CharacteristicValue>
      </ServiceCharacteristic>

      <ServiceCharacteristic>
        
      <Code>CCC</Code>
        
      <CharacteristicValue>
        
      <CharacteristicValue>2224</CharacteristicValue>
        
      </CharacteristicValue>
        
      </ServiceCharacteristic>
      <Account>
      --------
      </Account>

      </ABC>


      Need to put a BPEL if condition to check if there is ServiceCharacteristic with code "CCC"


      Like:  count($variable name/'*asterisk'[local-name()='ServiceCharacteristic' and   ./'*asterisk'[local-name()='Code']='CCC'] ) > 0


      But throws an error:

      (Error(703): The LocationPath expression "self::node()/child::*[(local-name() = "Code")]" is not allowed in as there is no implicit context node present)


      Please provide some inputs here

      Thanks.