Skip to Content

Get MessageID in Receiver REST Channel

I'd like to pass the PI "message id" to the receiver system via a receiver REST channel as a parameter on the Rest URL.

I'm trying to follow the documentation, but unable to make it work.

Has someone tried to do this before?

I'd like to avoid using a map in this interface and accomplish this via channel config.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Dec 15, 2016 at 03:49 PM

    We achieved this by using DynamicConfigBean on the sender side to set the MessageID to a variable in the REST namespace(http:// sap.com/xi/XI/System/REST).

    No mapping was required.

    The part that confused me initially was, I assumed that the REST receiver channel can read any variable from Dynamic Config.

    That statement is partially true. REST channel can read any variable from Dynamic Config, as long as it is in the REST namespace.

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 13, 2016 at 11:20 PM

    Hi Harsh,

    You can build the URL with message id in message mapping, and set the dynamic configuration using UDF.

    https://blogs.sap.com/2014/12/18/pi-rest-adapter-defining-a-dynamic-endpoint/

    https://blogs.sap.com/2014/12/18/pi-rest-adapter-using-dynamic-attributes/

    regards,

    Harish

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 15, 2016 at 02:00 PM

    Hi Harish,

    Thanks for your response. As I mentioned, I'd like to avoid using a map.

    Is there a way to accomplish this via channel config?

    Thanks,

    Harsh

    Add comment
    10|10000 characters needed characters exceeded