setVariable problem
Posted: Fri May 16, 2014 9:55 am
Hi,
I'm experiencing a strange behavior in the DIRECTOR when I setVariable.
this is the example project.
I'm experiencing a strange behavior in the DIRECTOR when I setVariable.
this is the example project.
Code: Select all
into log the DataTime variable is setted but when I use DateTime to set another variable (FileDestinazione) it is (DateTime) is empty<project name="Test_Append" mainModule="Main" version="2.0" threadSafe="true">
<description>Test della funzionalità di append dei file</description>
<variable name="ListaFileOrigine" value="" />
<variable name="Nr_FileOrigine" value="0" />
<variable name="DateFile" value="" />
<variable name="FileDestinazione" value="" />
<variable name="ProcessedFileOrigine" value="" />
<module name="Main">
<if label="VerificaDataProcessamento" condition="${IsEmpty(DateFile)==true}" logLevel="debug">
<setVariable label="SetDataProcesso" name="DateTime" value="${CurrentDate('yyMMdd')}" version="2.0" logLevel="verbose" />
</if>
<if label="VerificaNomeFileDestinazione" condition="${IsEmpty(FileDestinazione)}" logLevel="debug">
<setVariable label="SetFileDestinazione" name="FileDestinazione" value="${Concat('MergedFile.D', DateFile,'.txt')}" version="2.0" />
</if>
<createWorkspace version="1.0" />
<sftp label="Sftp_Origine" resourceId="GoAny_acalcag" version="1.0" logLevel="debug">
<cd label="SourceRemoteDir" dir="/home/acalcag/sAppend" />
<mget sourceFiles="*[uno|due|tre]*" destinationDir="~" whenFileExists="overwrite" prefix="BaseFile." suffix="{DateFile}.txt" destinationFilesVariable="ListaFileOrigine" numFilesDownloadedVariable="Nr_FileOrigine" processedSourceFilesVariable="ProcessedFileOrigine" />
</sftp>
<print label="Print-Post-SFTP-get" version="1.0">
<![CDATA[Sono stati trovati i seguenti ${Nr_FileOrigine} File \n
${ListaFileOrigine}.
Sono stati scaricati i seguenti File \n
${ProcessedFileOrigine}]]>
</print>
<mergeFiles label="Merging" inputFilesVariable="${ListaFileOrigine}" outputFile="/opt/goanysvc/Linoma_Software/GoAnywhere/userdata/documents/administrator/Test/${FileDestinazione}" whenFileExists="overwrite" processedInputFilesVariable="ProcessedFileOrigine" version="1.0" />
<print label="Print-Post-Merging" version="1.0">
<![CDATA[Sono stati uniti i seguenti Files \n
${ProcessedFileOrigine}]]>
</print>
<deleteWorkspace version="1.0" />
</module>
</project>
Code: Select all
does anyone have any advice for me?5/16/14 4:47:17 PM INFO Entering if block labeled 'VerificaDataProcessamento' as the condition "${IsEmpty(DateFile)==true}" was met
5/16/14 4:47:17 PM INFO Executing task 'setVariable 2.0 (SetDataProcesso)'
5/16/14 4:47:17 PM INFO Variable 'DateTime' was created and set to '140516'.
5/16/14 4:47:17 PM INFO Finished task 'setVariable 2.0 (SetDataProcesso)'
5/16/14 4:47:17 PM INFO Finished if block labeled 'VerificaDataProcessamento'
5/16/14 4:47:17 PM INFO Entering if block labeled 'VerificaNomeFileDestinazione' as the condition "${IsEmpty(FileDestinazione)}" was met
5/16/14 4:47:17 PM INFO Executing task 'setVariable 2.0 (SetFileDestinazione)'
5/16/14 4:47:17 PM WARN Variable 'FileDestinazione' was replaced with 'MergedFile.D.txt'.
5/16/14 4:47:17 PM INFO Finished task 'setVariable 2.0 (SetFileDestinazione)'