LucMertensSteri
12 years agoNew Contributor
Property trransfer .... For Each
I have the following request structure:
<!--1 or more repetitions:-->
<SmartMeterMeterReadingDocumentERPCreateRequestMessage>
<ID>ID1-${=new java.text.SimpleDateFormat("MMddHHmmss").format(new Date())}</ID>
</SmartMeterMeterReadingDocumentERPCreateRequestMessage>
<SmartMeterMeterReadingDocumentERPCreateRequestMessage>
<ID>ID2-${=new java.text.SimpleDateFormat("MMddHHmmss").format(new Date())}</</ID>
</SmartMeterMeterReadingDocumentERPCreateRequestMessage>
this way, we assure a unique ID, even when the test is repeated.
But this ID is reused in another query, also containing 2 rows:
<!--1 or more repetitions:-->
<SmartMeterMeterReadingDocumentERPBulkCancellationRequestMessage>
<ID>Must Be ID 1</ID>
</SmartMeterMeterReadingDocumentERPBulkCancellationRequestMessage>
<SmartMeterMeterReadingDocumentERPBulkCancellationRequestMessage>
<ID>Must be ID 2</ID>
</SmartMeterMeterReadingDocumentERPBulkCancellationRequestMessage>
We have to replace these IDs by the value of the IDs used in the first request
I can do it with 2 property transfers indicating the number in square roots.
//.../SmartMeterMeterReadingDocumentERPCreateRequestMessage[1]/ID
This works and is a solution. For every row, I can write a property transfer.
But the number of rows can be dynamic in other examples, and the number of rows can be large (up to 1000).
Is there a way to encode this loop automatically?
Thanks for your help
Luc
<!--1 or more repetitions:-->
<SmartMeterMeterReadingDocumentERPCreateRequestMessage>
<ID>ID1-${=new java.text.SimpleDateFormat("MMddHHmmss").format(new Date())}</ID>
</SmartMeterMeterReadingDocumentERPCreateRequestMessage>
<SmartMeterMeterReadingDocumentERPCreateRequestMessage>
<ID>ID2-${=new java.text.SimpleDateFormat("MMddHHmmss").format(new Date())}</</ID>
</SmartMeterMeterReadingDocumentERPCreateRequestMessage>
this way, we assure a unique ID, even when the test is repeated.
But this ID is reused in another query, also containing 2 rows:
<!--1 or more repetitions:-->
<SmartMeterMeterReadingDocumentERPBulkCancellationRequestMessage>
<ID>Must Be ID 1</ID>
</SmartMeterMeterReadingDocumentERPBulkCancellationRequestMessage>
<SmartMeterMeterReadingDocumentERPBulkCancellationRequestMessage>
<ID>Must be ID 2</ID>
</SmartMeterMeterReadingDocumentERPBulkCancellationRequestMessage>
We have to replace these IDs by the value of the IDs used in the first request
I can do it with 2 property transfers indicating the number in square roots.
//.../SmartMeterMeterReadingDocumentERPCreateRequestMessage[1]/ID
This works and is a solution. For every row, I can write a property transfer.
But the number of rows can be dynamic in other examples, and the number of rows can be large (up to 1000).
Is there a way to encode this loop automatically?
Thanks for your help
Luc