Page 1 of 1

get path of folder for incoming connection

Posted: Tue Nov 26, 2013 11:28 pm
by tz8
Hi,



is there a scripting possibility of getting the path of an incoming connection? I'm having the weird issue that (just for one customer) files are not being accepted as a job by Switch up until i restart the flow... i just want to do a fileList of the folder when s.getJobs() == 0, then crawl through the files and check each file for hasArrived(), if this is true, make a job out of it and send it to the error connection.





var jobList = s.getJobs();

if ( jobList.length == 0 )

{

var inConnList = s.getInConnections();

var inConn = inConnList.at(0);

var inDirPath = inConn.getFolderPath(); // <--- this is needed here!

var inDir = new Dir ( inDirPath );

.

.

.

}





any ideas?



Thorsten

get path of folder for incoming connection

Posted: Wed Nov 27, 2013 11:09 am
by freddyp
Same answer as for the other post asking for the folder on an outgoing connection: you can only get the name, not the path. Have you and sgeller been talking about this together? :)



Rather than implementing a workaround I would recommend to report this with support to investigate what the real cause of the problem is. If you only have it with specific files, you should perhaps investigate if there is something special about the properties of those files.



Freddy

get path of folder for incoming connection

Posted: Wed Nov 27, 2013 4:43 pm
by dkelly
See my hack in other thread for a workaround