In PutContextVar overwrite the attribute of any activity (in this case File Target) with the path and the filename.
In terms of placing the file by giving the dynamic folder and filename, we will use PutContextVar.
There in the Activity Name field of the PutContextVar, we will select the File Target from the drop-down,
The Variable Name will be filepath and the Variable Value will contain $$filepath_variable$$ (a variable which will contain the path)
Create another variable in the PutContextVar (this object allows you to add several variables), in this case the VariableName will be filename and the value can be a context variable which will contain the name (such as $$filename_variable$$.xml)
If the file extension is something that is not always XML then we would use a scripted service to get the file extension, the code will be something like:
- go to last index of . (dot)
- then get me all the bytes starting from that position + 1
If there's a mapping activity in the flow, we can do the above easily (without scripting) using the SubstringAfter function in string and put the result in set-context variable like filename_extension_var.
Then in the putcontextvar above, we can do this:
$$filename_variable$$.$$filename_extension_var$$
Comments
0 comments
Article is closed for comments.