Is it possible to get the Worker object from a task handle of the type IOmniTaskControl? For example, on a terminate event, I want to log details of which worker was affected.
Asked
Active
Viewed 170 times
1 Answers
0
IOmniTaskControl
doesn't provide such functionality.
When you create new task, add its implementor and the IOmniTaskControl
reference to some list/dictionary and then in OnTerminate
look into that list/dictionary. (And don't forget to remove that entry from the list/dictionary or task controller won't be destroyed as the list/dictionary would keep a reference to it.)

gabr
- 26,580
- 9
- 75
- 141
-
Thanks. I think just keeping a list of IOmniWorker will also do because then the task can be accessed as its property for comparison. – user173399 Jan 19 '17 at 08:05