cancel
Showing results for 
Search instead for 
Did you mean: 

Help on HCI Iflow

apu_das2
Active Contributor
0 Kudos

Hi,

I need help on below requirement. How to achieve this in HCI?

1) Getting below payload from sender system -

<Payload>

<ID>1234</ID>

<CODE>abcd</CODE>

</Payload>

2) Now need to do one look up using HTTPS adapter to get a converted value to push into <CODE> tag.

URL to call for look up - https://<fixedURL>?ID=<ID field got from source payload>

i.e. https://abcd.com?ID=1234

Output of this request-reply will be a JSON data where I will get one different value of ID.

i.e. {

payload: {

"Desc": "ACDFFF",
"ID": "CAWR_1",
"Title": "jgsjgghjg",

}}

3) Now, I need to send the received data like below-

<Payload>

<ID>CAWR_1</ID>

<CODE>abcd</CODE>

</Payload>

Please help with the iFlow design and with the script coding if anything will be required.

Thanks ,

Accepted Solutions (0)

Answers (2)

Answers (2)

apu_das2
Active Contributor
0 Kudos

Hi Sriprasad,

Thanks for your reply. Actually, the payload is not the simple one with two fields. There are lots of other fields, I am generating from mapping.

For a test, I have tried with the request reply with hard coded value in the HTTP channel. But getting below error-

Sriprasadsbhat
Active Contributor
0 Kudos

Hello Apu,

Below might help you.

Regards,

Sriprasad Shivaram Bhat

apu_das2
Active Contributor
0 Kudos

Sriprasad,

I am almost there. Manage to store the value which I need to push in payload in a header data i.e. ${header.ID}

Just help me with the groovy script using which I can replace one tag like <ID>fixedvalue</ID> with the header data.

Means,

<ID>fixedvalue</ID> will be replaced with <ID>${header.ID}</ID>

Sriprasadsbhat
Active Contributor
0 Kudos

Hello Apu,

I dont think you need to replace the old ID values.Post request reply your old ID value would be vanished .Whatever the new value which comes from Request-Reply will be new ID.

Hope it helps you.

Regards,

Sriprasad Shivaram Bhat