cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

update Xpath in Message mapping using Custom functions.

amit023
Explorer
0 Likes
1,581

Hi all,

is it possible to update the Xpath of Element in message mapping using custom functions instead of using context in SAP BTP.

View Entire Topic
Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi amit023,

How about entering your logic on a Groovy Script component and that would set some iflow context variables that would be used by the xpath for data extraction. Your script would be able to dynamically set what the xpath should gather from the payload.

Have you tried it?

If that doesn't work, I would simply add xpath extraction rules for all attributes in the payload, So I would be able to mapp whatever I wanted.

BTW, did you know you can convert your payload into OpenAPI syntax, upload it to Cloud Integration and use it to viasually map the inbound/outbound attributes?

https://blogs.sap.com/2020/09/16/sap-cloud-integration-swagger-openapi-spec-json-in-message-mapping/

Best regards,
Ivan

amit023
Explorer
0 Likes

Hi Ivan,

question is more about pathetically designed message mapping component which has nothing inbuilt and for everything you have to write functions.

Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi amit023,

Could you please elaborate a little more on the comment? I didn't quite understand what you really want to achieve. Perhaps if you give a more concrete example it would help.

Best regards,
Ivan