Skip to Content

Sequential Multicast - Sharing data between branches

Hi SDNites,

I am using sequential Multicast and I wanted to share few values from branch 1 with branch 2. I have gone through a nice blog which explains how to achieve this but does not have the supporting groovy script details. Can you please help me with a sample example of groovy script which using hashmap and sets the header and properties value.

Also can you please confirm if the same cannot be achieved via Content modifier?

Referred blog :

https://blogs.sap.com/2018/03/12/behavior-of-cpis-message-headerproperty-in-a-multicast/

Regards,

Abhi


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • May 10 at 09:15 AM

    Hi Abhishek,

    You can achieve this via content modifier also.

    In my scenario I am getting the value of content modifier through groovy script.

    PFB the screenshot of content modifier: In my scenario I am reading last_modified date which is external parameter.

    PFB the groovy script:

    Hope it helps !

    Regards,

    Pravesh Shukla

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Pravesh,

      Your way of using Content Modifier is quite nice.

      But this cannot be used in Sequential Multicast where header or property values are to be shared from branch 1 (predecessor branch) to branch 2 (Successor branch). As per my understanding, we need to use Hash map for this. The link which you shared previously showed me how to set the hashmap values. I am looking for how to retrieve it also.

      Please let me know your thoughts.

      Regards,

      Abhi

  • May 17 at 06:15 AM

    Hi Abhishek,

    You can make use of Hashmaps to share data between branches, please refer the below link wherein a use case is defined.

    https://answers.sap.com/questions/97149/how-to-store-the-data-in-hash-map-by-using-groovy.html?childToView=509007#answer-509007

    Thanks,

    Aditya

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Aditya,

      Thanks for the response.

      The attached link does not show how to read the Hasmap values. It shows only how to set it.

      Regards,

      Abhi