Generally OIC supports following 5 Ftp operations:
- Read a file
- Write a file
- List Files
- Delete a file
- Download a file
Here, I will show you the steps for a POC for move and delete operation.
Steps:
Step1: create an app driven or any other integration and create a rest trigger connection and drag and drop in the integration and configure the following:
Provide a endpoint name
Verb as POST
URI: /
Configure the request payload option
Request payload as Json:
{
"sourceDirectory": "sourceDirectory",
"fileName":"sourceFileName",
"targetDirectory":"target",
"targetFileName":"targetFile",
"moveFileFlag":"Y",
"deleteFileFlag" : "Y"
}
Step2: Take a switch acrivity and mention the condition moveFileFlag="Y" and take a SFTP connection and config the following:
Provide endpoint name: moveFile
Operation: Move a file
Overwrite file option checked.
Next
Done
Map the following :
directory: your source direcrory
fileName: file name
targetDirectory
targetFilename:
Step3: now take again a switch and mention the condition as deleteFileFlag=Y and drop a ftp connection and configure the following:
Provide endpoint name:
Operation : delete a file
Next
Done
Map the following:
directory:
fileName:
Step4: add the tracking, save and activate amd test it with proper data.
No comments:
Post a Comment