Hi,

As part of my work I'm writing a small sub-workflow to save results in a
new file at a selected location. Basically, it is a mixture from local
services "Select File" and "Write Text File". I've looked at different
examples and tutorials online, they all seem to agree on the methods used
but it won't work for me.

Code (imports taken from Select File, excluded  here):

*....
if (title == void) {
    title = null;
}

JFileChooser chooser = new JFileChooser();
chooser.setDialogTitle(title);
chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);

chooser.showSaveDialog(null);

if (returnVal == JFileChooser.APPROVE_OPTION) {
       File file = chooser.getSelectedFile();
      outputFile = file.getAbsolutePath();

   BufferedWriter  out=new BufferedWriter(new FileWriter(file));

    out.write("hi!");
    out.flush();
    out.close();
}*


It doesn't create the file, does anyone know why?

Attachment: save_file.t2flow
Description: Binary data

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
taverna-users mailing list
[email protected]
[email protected]
Web site: http://www.taverna.org.uk
Mailing lists: http://www.taverna.org.uk/about/contact-us/

Reply via email to