Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have rest service, I am sending .zip file to it with post request and which consumes multipart. I am able to see the content once i hit the service. But i want to save the .zip with additional labels.[labels will be send as additional parameters to the request]. if .zip is x.zip i want to save it as x_y.zip.
I tried it with FileOutputRaw. but i cant dynamically add y variable.
This is just a timing issue. After you have received your data, don't immediately write it to a file (using the tFileOutputRaaw). Instead, calculate your parameters and work out your filename, then pass the data to a tFlowToIterate. Connect that (like in your screenshot) to a tFixedFlowInput. Your data will be stored in a globalMap variable. Retrieve that globalMap variable and use it in the tFixedFlowInput for your raw file data (I'm assuming it is stored as an Object). Then connect this to your tFileOutputRaw and use the filename calculated (also stored as a globalMap).
The reason this is causing you an issue is that as soon as the subjob is started, the filename of a tFileOutput component, is set. So if you are calculating the name in the subjob, it won't work. If you use the iterate link (as described) it essentially starts a new subjob. If the value of the filename is known by that point, it will work.
This is just a timing issue. After you have received your data, don't immediately write it to a file (using the tFileOutputRaaw). Instead, calculate your parameters and work out your filename, then pass the data to a tFlowToIterate. Connect that (like in your screenshot) to a tFixedFlowInput. Your data will be stored in a globalMap variable. Retrieve that globalMap variable and use it in the tFixedFlowInput for your raw file data (I'm assuming it is stored as an Object). Then connect this to your tFileOutputRaw and use the filename calculated (also stored as a globalMap).
The reason this is causing you an issue is that as soon as the subjob is started, the filename of a tFileOutput component, is set. So if you are calculating the name in the subjob, it won't work. If you use the iterate link (as described) it essentially starts a new subjob. If the value of the filename is known by that point, it will work.
Thank you so much
Not a problem. Glad to help 🙂