How to tell if task was started from another task

Discuss RoboTask here
Post Reply
bgregory
Posts: 27
Joined: Mon May 22, 2017 4:28 pm

How to tell if task was started from another task

Post by bgregory »

I'm sure there is an easy explanation but:
I have a task called AB. Task AB calls task A and task B. How can I tell if task A or task B was started by itself or started from task AB?
Bob Gregory
Oleg
Site Admin
Posts: 3014
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: How to tell if task was started from another task

Post by Oleg »

Pass some parameter from "AB" task to task A and Task B. For example Caller=AB
If you run the task manually, this parameter will not be present.
Oleg Yershov
bgregory
Posts: 27
Joined: Mon May 22, 2017 4:28 pm

Re: How to tell if task was started from another task

Post by bgregory »

Thank you Oleg... simple.
Oleg
Site Admin
Posts: 3014
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: How to tell if task was started from another task

Post by Oleg »

Also you can declare variable Caller on Variable tab of task editor
If parent task passes a parameter with the same name, it overrides the corresponding declared task local variable.
Oleg Yershov
Post Reply