Page 1 of 1

Unspecified error appears periodically: DatasetLoop

Posted: Thu Mar 06, 2014 12:49 pm
by daskalv
Hello,

I am using the latest Robotask 5.8 on Windows Server 2003 (in French), to perform some checks in Oracle 10g DB.
I have a task that is executed every 2 minutes, that makes a select in the DB and then compares the result to a previously selected value.

When task is run manually, it is executed successfully, each time.
When task is run automatically, it is also executed successfully, but periodically an "unspecified error" appears for the "Dataset Loop" action, existing in the task.
I haven't noticed any pattern, when the error appears.

The task:

Code: Select all

;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
 
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|0
Comment=STRINGLIST
ContinueOnError=INTEGER|0
Events=FOLDER
ExternalName=STRING|"Task6"
Hide=INTEGER|0
ID=INTEGER|151774396
LogOnAsUser=INTEGER|1
Name=STRING|"NoWEBenquiry"
OnErrorTaskID=INTEGER|0
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
WriteGeneralLog=INTEGER|0

[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER
Action5=FOLDER
Action6=FOLDER
Action7=FOLDER
Action8=FOLDER

[Actions\Action1]
ActionID=STRING|"A_LOOP_DATASET"
Enabled=INTEGER|-1
Name=STRING|"Dataset Loop"
Params=FOLDER

[Actions\Action1\Params]
commatext=STRING|"0"
connectionstring=STRING|"FILE NAME=C:\Program Files\Fichiers communs\ODBC\Data Sources\ROBO.dsn"
override=STRING|"1"
password=STRING|"239063295834745201743625027078"
sql=STRING|"""SELECT SYS_RECORDKEY  FROM(SELECT a.SYS_RECORDKEY FROM(SELECT SYS_RECORDKEY  FROM enquiry_details WHERE T_1494_REQUEST_SOURCE='W' and To_Char(""""T_446_DATEOFREQUEST"""", 'YYYYMMDD')='{Year}{MonthNo}{Day}' ORDER BY ENQUIRY_DETAILS.T_446_DATEOFREQUEST desc,T_447_TIMEOFREQUEST desc)a WHERE rownum =1) ;"""
timeout=STRING|"15"
userid=STRING|"PROFILESM_ADM"
var2=STRING|"TEST2"
withmemo=STRING|"0"

[Actions\Action2]
ActionID=STRING|"A_FILE_TEXTWRITE"
Enabled=INTEGER|-1
Name=STRING|"Create text file E:\ProfileSM_Maroc\DELIVERY\Robotask_Tasks\Temp\NoWEBenquiry.txt"
Params=FOLDER

[Actions\Action2\Params]
encode=STRING|"0"
fileexists=STRING|"1"
filname=STRING|"E:\ProfileSM_Maroc\DELIVERY\Robotask_Tasks\Temp\NoWEBenquiry.txt"
line0=STRING|"{Year}{MonthNo}{Day} {Time} {TEST2} {TESTPREC2}"
linecount=STRING|"1"
suppress=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|"1"
value1=STRING|"{TEST2}"
value2=STRING|"{TESTPREC2}"

[Actions\Action4]
ActionID=STRING|"A_INET_SENDMAIL"
Enabled=INTEGER|-1
Name=STRING|"Send Email"
Params=FOLDER

[Actions\Action4\Params]
attachcount=STRING|"0"
auth=STRING|"0"
bcc=STRING|"morocco-cbsupport@experian.com"
charset=STRING|"iso-8859-1"
from=STRING|"dbcheck@esm.com"
host=STRING|"mail"
html=STRING|"0"
msg0=STRING|"No new WEB enquiry recorded in the last 2 minutes"
msg2=STRING|"last recordkey  {TEST2}"
msg4=STRING|"2 minutes ago it was {TESTPREC2}"
msgcount=STRING|"6"
password=STRING|"2514525708262172570724686"
passwordmode=STRING|"0"
port=STRING|"25"
SSL=STRING|"0"
subject=STRING|"count of WEB enquiry is not increased"
to=STRING|"usagers-maroc@experian.com"

[Actions\Action5]
ActionID=STRING|"A_FLOW_ELSE"
Enabled=INTEGER|-1
Name=STRING|"Else"

[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"

[Actions\Action8]
ActionID=STRING|"A_VARIABLES_SET"
Enabled=INTEGER|-1
Name=STRING|"Set variable ""TESTPREC2"" with value ""{TEST2}"""
Params=FOLDER

[Actions\Action8\Params]
expand=STRING|"1"
varname=STRING|"TESTPREC2"
varvalue=STRING|"{TEST2}"
Partial log:
I: 06/03/2014 10:44:00: ****** Starting task: NoWEBenquiry ******************
I: 06/03/2014 10:44:00: Executing "1.Dataset Loop"
I: 06/03/2014 10:44:02: Executing "2.Create text file E:\ProfileSM_Maroc\DELIVERY\Robotask_Tasks\Temp\NoWEBenquiry.txt"
I: 06/03/2014 10:44:02: Executing "3.If Then"
I: 06/03/2014 10:44:02: Executing "6.End If"
I: 06/03/2014 10:44:02: Executing "7.End Loop"
I: 06/03/2014 10:44:02: Executing "1.Dataset Loop"
I: 06/03/2014 10:44:02: Executing "8.Set variable "TESTPREC2" with value "{TEST2}""
I: 06/03/2014 10:44:02: Task executed successfully
I: 06/03/2014 10:46:00: ****** Starting task: NoWEBenquiry ******************
I: 06/03/2014 10:46:00: Executing "1.Dataset Loop"
E: 06/03/2014 10:46:00: Erreur non spйcifiйe
E: 06/03/2014 10:46:00: An error occurred. Step #1 (Dataset Loop).
E: 06/03/2014 10:46:00: Task execution is aborted
I: 06/03/2014 10:48:00: ****** Starting task: NoWEBenquiry ******************
I: 06/03/2014 10:48:00: Executing "1.Dataset Loop"
I: 06/03/2014 10:48:03: Executing "2.Create text file E:\ProfileSM_Maroc\DELIVERY\Robotask_Tasks\Temp\NoWEBenquiry.txt"
I: 06/03/2014 10:48:03: Executing "3.If Then"
I: 06/03/2014 10:48:03: Executing "6.End If"
I: 06/03/2014 10:48:03: Executing "7.End Loop"
I: 06/03/2014 10:48:03: Executing "1.Dataset Loop"
I: 06/03/2014 10:48:03: Executing "8.Set variable "TESTPREC2" with value "{TEST2}""
I: 06/03/2014 10:48:03: Task executed successfully


Important to mention, that other tasks are executed at the same time as well. Don't know if this can be an influencer.
Does anybody has idea why this happens?

Regards,
Vladislav

Re: Unspecified error appears periodically: DatasetLoop

Posted: Thu Mar 06, 2014 5:13 pm
by Oleg
Unfortunately I can't see your SQL connection settings.
The action get the error when it try to execute SQL statement.
Try to use Oracle OLE DB Provider instead of ODBC driver. I think that it is more stable
See on screenshot.
oracle.jpg
oracle.jpg (31.68 KiB) Viewed 10456 times
Also you can try to use the Error handling task with simple algorithm:
Pause 5 sec // for example
Run the task again.

You can attach the error handler to a task in task editor, see screenshot below.
errhadler.jpg
errhadler.jpg (66.25 KiB) Viewed 10456 times

Re: Unspecified error appears periodically: DatasetLoop

Posted: Tue Mar 18, 2014 9:01 am
by daskalv
Hi Oleg,

Thank you very much for the advice.

Unfortunately I am not allowed to change the ODBC driver on the server, where I experience this problem.
The client requires the use of Oracle InstantClient 10.x odbc driver.

But I added an "error handling task", as you suggested, with a small delay and it significantly improved the situation. Plus I added some "wait" rules between all the tasks that were supposed to be started simultaneously.
I still get some errors from time to time, but much less than before.

Thanks again for the quick and detailed response.