on 09-22-2023 2:44 PM
Hi all,
is it possible to update the Xpath of Element in message mapping using custom functions instead of using context in SAP BTP.
Hello ,
Below might help you and there are functions which will help you to handle contexts within script. But changing XPATH might not be possible using custom functions but you can pass different values as inputs and consider one based on some condition.
https://blogs.sap.com/2021/04/25/udfnodepool-functions-for-sap-cpi-with-groovy-scripting/
Regards,
Sriprasad Shivaram Bhat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello AR,
you can also refer to the below blog:
Thanks,
Lakshmi.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
11 | |
10 | |
8 | |
8 | |
6 | |
6 | |
6 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.