Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
TeamSite
TeamSite, LiveSite and OpenDeploy
Workflow not deleting all the files.
Migrateduser
Hi,
I have an external task in the workflow to delete the files attached to the task. Below is the java file that is called to do this functionality. But the problem is, it only deletes n-1 files. That is, if I have 5 files attached to the task, it deletes only 4 files and last file is not getting deleted. But it fetches all 5 files and displays the delete command for all 5 files. Any thoughts on why this is happening?
private void deleteFiles(CSExternalTask task, Runtime rt)
throws CSAuthorizationException, CSRemoteException, CSObjectNotFoundException, CSExpiredSessionException, CSException, IOException {
CSAreaRelativePath[] areaRelativePaths = task.getFiles();
String file;
createlogfolder.info("File Count:"+areaRelativePaths.length);
for (CSAreaRelativePath areaRelativePath : areaRelativePaths) {
file=areaRelativePath.toString();
createlogfolder.info("file List:"+file);
String Deletecmd= "/opt/iw/iw-home/TeamSite/bin/iwdeltaskfile"+" "+task.getId()+" "+file;
Process pr= rt.exec(Deletecmd);
BufferedReader errorReader = new BufferedReader(new InputStreamReader(pr.getErrorStream()));
LOGGER.error("DeleteFileList cmd:"+Deletecmd);
}
}
Thanks.
Find more posts tagged with
Comments
There are no comments yet