TaskNumByExternalName service task

Discuss RoboTask here
Post Reply
manxasp
Posts: 4
Joined: Sat Dec 29, 2018 5:03 pm

TaskNumByExternalName service task

Post 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
Oleg
Site Admin
Posts: 3000
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: TaskNumByExternalName service task

Post 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.
Oleg Yershov
Post Reply