*/
protected Serializable doTask() throws Exception
{
// Need to create a directory tree underneath the selected directory:
final File parentDirectory = new File( (String)CollectionUtils.getFirst( (Collection)bean.getProperty( org.mcisb.util.PropertyNames.EXPORT_FILEPATHS ) ) );
final File directory = new FileUtils().mkdir( parentDirectory, new FileUtils().convertCharacters( node.getDisplayName() ) );
final FileExporter exporter = new FileExporter();
if( experiment )
{
exporter.exportExperiment( directory, recordModelFactory, node, bean.getBoolean( org.mcisb.beacon.spottedexperiment.PropertyNames.XML ), bean.getBoolean( org.mcisb.beacon.spottedexperiment.PropertyNames.LSM ), bean.getBoolean( org.mcisb.beacon.spottedexperiment.PropertyNames.EXCEL ) );