Skip to Content
0

Help on HCI Iflow

Sep 15, 2017 at 06:27 AM

109

avatar image
Former Member

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 ,

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Sriprasad Shivaram Bhat
Sep 15, 2017 at 10:04 AM
0

Hello Apu,

Below might help you.

Regards,

Sriprasad Shivaram Bhat


Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

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>

0

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

0
avatar image
Former Member Sep 15, 2017 at 12:08 PM
0

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-

Share
10 |10000 characters needed characters left characters exceeded