How to stop Robotask execution...
Posted: Mon Jan 24, 2011 1:05 am
Hi All,
I'm a bit of a newbie cutting my teeth in RoboTask and i
have come upon a bit of a gap in my knowledge...
I would like to run a pre-cursor check before continuing
with the remainder of the RoboTask steps...
The pre-cursor is a batch file which will write a text
file called Failure.txt or Success.txt in a specified
location dependent upon a Microsoft.Build routine...
I want to be able to check the .txt files in the
directory C:\BuildStatus and where Failure.txt exists
stop the execution of RoboTask... If Success.txt exists
however just continue with the steps...
Below is the task...
Thank you in advance for your help...
I do not know if my approach is correct or even logical,
any help at all would be great...
Jarlath
I'm a bit of a newbie cutting my teeth in RoboTask and i
have come upon a bit of a gap in my knowledge...
I would like to run a pre-cursor check before continuing
with the remainder of the RoboTask steps...
The pre-cursor is a batch file which will write a text
file called Failure.txt or Success.txt in a specified
location dependent upon a Microsoft.Build routine...
I want to be able to check the .txt files in the
directory C:\BuildStatus and where Failure.txt exists
stop the execution of RoboTask... If Success.txt exists
however just continue with the steps...
Below is the task...
Thank you in advance for your help...
I do not know if my approach is correct or even logical,
any help at all would be great...
Jarlath
Code: Select all
;*******************************
;* RoboTask Task file *
;* Do not edit in text editor! *
;*******************************
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|0
CatID=INTEGER|0
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task12"
Hide=INTEGER|0
ID=INTEGER|1634644416
Name=STRING|"00 PreBuild Check"
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER
Action5=FOLDER
Action6=FOLDER
Action7=FOLDER
[Actions\Action1]
ActionID=STRING|"A_GENERAL_RUN_PROG"
Enabled=INTEGER|-1
Name=STRING|"Run ""master.bat"""
Params=FOLDER
[Actions\Action1\Params]
program=STRING|"C:\ProConBuildCheck\master.bat"
runas=STRING|"0"
wait=STRING|"0"
[Actions\Action2]
ActionID=STRING|"A_LOOP_FILE"
Enabled=INTEGER|-1
Name=STRING|"File Loop"
Params=FOLDER
[Actions\Action2\Params]
createmode=STRING|"1"
date1=STRING|"20101207"
date2=STRING|"20101207"
destvar=STRING|"{BUILDSTATUS}"
DuringDays=STRING|"1"
DuringMonths=STRING|"1"
file0=STRING|"C:\ProConBuild\*.txt"
filecount=STRING|"1"
OlderDays=STRING|"1"
OlderMonths=STRING|"1"
savesize=STRING|"0"
searchkind=STRING|"0"
subdirs=STRING|"1"
timesize=STRING|"0"
WithoutPath=STRING|"1"
[Actions\Action3]
ActionID=STRING|"A_FLOW_IF"
Enabled=INTEGER|-1
Name=STRING|"If Then"
Params=FOLDER
[Actions\Action3\Params]
case=STRING|"0"
operator=STRING|"0"
type=STRING|"0"
value1=STRING|"{BUILDSTATUS}"
value2=STRING|"{Failure.txt}"
[Actions\Action4]
ActionID=STRING|"A_FILE_TEXTWRITE"
Enabled=INTEGER|-1
Name=STRING|"Create text file C:\Documents and
Settings\8over8qa\Desktop\RoboTaskPreBuildStatus.txt"
Params=FOLDER
[Actions\Action4\Params]
fileexists=STRING|"0"
filname=STRING|"C:\Documents and
Settings\8over8qa\Desktop\RoboTaskPreBuildStatus.txt"
line0=STRING|"Status : {{BUILDSTATUS}}"
line1=STRING|"Date : {DateTime}"
linecount=STRING|"2"
[Actions\Action5]
ActionID=STRING|"A_TASKS_STOP"
Enabled=INTEGER|-1
Name=STRING|"Stop Task ""Full Install Task"""
Params=FOLDER
[Actions\Action5\Params]
taskid=STRING|"960106963"
[Actions\Action6]
ActionID=STRING|"A_FLOW_ENDIF"
Enabled=INTEGER|-1
Name=STRING|"End If"
[Actions\Action7]
ActionID=STRING|"A_LOOP_END"
Enabled=INTEGER|-1
Name=STRING|"End Loop"