Skip to Content
0

Externalize Parameters: how to fetch value dynamically

Dec 26, 2017 at 07:25 PM

205

avatar image
Former Member

Hi Experts

I have Timer start event(i harcoded payload for testing)to HCI to SFTP scenario where i want to put the receiver credential name dynamically from the incoming payload.

My incoming structure is:

<header>
<hedfield>sftpuser1</hedfield>
</header>
<invoices>
<invfieid1>testinv1</invfieid1>
<invfieid2>testinv2</invfieid2>
</invoices>
<images>
<imgfield2>SGkgdGhpcyBpcyBiYXNlIDY0IGVuY29kZWQ=</imgfield2>
</images>

and i want to pick the receiver credential name from <hedfield>sftpuser1</hedfield> of header field in the payload so i changed the below external parameter as follows.

Receiver channel external parameter

But everytime i set {{Receiver_credential_name_2}} as //header/hedfield it resets the value at runtime to my old saved credential that i used in past.

Am i not doing it the correct way. Please help.

Regards

Naina

ex-par-ques.jpg (37.2 kB)
ex-par-ques-1.jpg (21.4 kB)
10 |10000 characters needed characters left characters exceeded

Hi Naina. In the spirit of the community, please remember to also follow up on your open questions. Regards, Morten.

0
Former Member
Morten Wittrock

Hi Morten

This is where you are suggesting camel parameters, but for private key alias and credentials i coudnt see anything matching hence a new question

Naina

0

I am talking about your open questions in general. When you follow up, indicating what worked and what didn't, accepting answers, closing questions, you add value to the community, as well as respect the time of those community peers, who took the time to answer your questions.

0
Former Member
Morten Wittrock

see Morten just now i did, and will always do in future

thanks for your help

0
* Please Login or Register to Answer, Follow or Comment.

2 Answers

avatar image
Former Member Dec 27, 2017 at 01:44 PM
0

Hi Naina,

In the externalized parameters tab there is a save button you should click on it in order to save the new value.

But I don't know if the value could accept XPath expressions or not.

Please let us know if you solve your problem.

Best regards,
Mohamed Amine.


saveextparam.png (17.1 kB)
Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Amin

Directly it did not work, so i added the incoming payload first in header and then called header in externalized parameter:

added LoginID in header

called header in EP:

Regards

Naina

success.png (17.3 kB)
success-2.png (11.9 kB)
0
Former Member

Were you able to acces the SFTP dynamically using ${header.cred} ? the value changes ?

1
avatar image
Former Member
Mar 21 at 05:51 AM
0

Hi Naina,

I tried the way like you said. But it does not work. Could you provide more details,like the iFlow details, you create the new header in which component or script etc. ?

Thanks very much

Best Regards

Kevin

Share
10 |10000 characters needed characters left characters exceeded