yes,i want to develop a flow service with input document type A and output document type B,and viceversa.
i had tried to use service “recordlistToRecord”,and “appendToRecordList” in a loop for mapping from A to B,but it failed ,I can only get last one record in B from A.
You need to create a new B record for each iteration of the loop. If you will always map all A records to the new B list, then using an in-array and out-array will be the most efficient approach. If you need to be selective with which A records get mapped, then use appendToRecordList (caution: this is a bad approach for large lists). You don’t need recordListToRecord.
Review these threads for more info on looping over one record list to create another record list.
Create a new B message Document(list) and try using the Loop on (In-Array(head/item/property) and Out-Array(message/record) approach and inside the loop you will see the A of head/Item/Property as document and also message/record as document instead of documentlist and so map the fields from A to B.Step thru the loop and make sure the results/pipeline as expected.