Page 1 of 1

TaskNumByExternalName service task

Posted: Mon Jun 08, 2020 7:07 pm
by manxasp
Hiho.

How to get Task Num when the task are running in Robotask Service?

When i use:

Code: Select all

extName = "Task18"
Num = RoboTaskApp().TaskNumByExternalName(extName)
LogMessage(num)

____
Log = -1
when i try with user local task

Code: Select all

extName = "Task155"
Num = RoboTaskApp().TaskNumByExternalName(extName)
LogMessage(num)

____
Log = 1

Re: TaskNumByExternalName service task

Posted: Tue Jun 09, 2020 4:04 pm
by Oleg
If you want to retrieve TaskNum from service task have to run this script on service.
RoboTask application and RoboTask service are different instances of RoboTask. RoboTask service is the separate process with own tasks.
TaskNumByExternalName method retrieve TaskNum from local set of tasks only.