Forum Discussion

kymilfab's avatar
15 years ago

complex usage of Property Transfer

Hello,

I'd like to perform a conditional Property Transfer from one response to a subsequent request.

Here is an example to try to make it clear:
<Books>
<ns2:Quotation>
<deliveryModes>
<ns3:DeliveryMode>
<code>mail</code>
</ns3:DeliveryMode>
<ns3:DeliveryMode>
<code>pickup</code>
</ns3:DeliveryMode>
</deliveryModes>
<id>1</id>
<coverType>PT00AD</coverType>
<price>40.0</price>
<inventories>
<inventory>
<availability>36</availability>
<class>AZ</class>
<rowId>1</rowId>
<segmentId>1</segmentId>
</inventory>
</inventories>
<orderId>1</orderId>
</ns2:Quotation>
<ns2:Quotation>
<deliveryModes>
<id>2</id>
<coverType>PT00AD</coverType>
<price>49.5</price>
<inventories>
<inventory>
<availability>345</availability>
<class>BP</class>
<rowId>2</rowId>
<segmentId>1</segmentId>
</inventory>
</inventories>
<orderId>1</orderId>
</ns2:Quotation>
</Books>

I want to get the <id> of the first <Quotation> element, which has a DeliveryMode/code equal to 'pickup'

Then, I want to get a sefcond property which is the first segmentId under the Quotation with the id obtained first.

Is there a way to perform this using Property Transfer or shall I use a groovy script.

One additional constraint is that the elements have got different namespaces..

Thanks for your help !

Fabien
No RepliesBe the first to reply