Forum Discussion
Dmitry_Nikolaev
14 years agoStaff
Hi Pawel,
At the moment, there is no easy way to get this information. However, this is still possible.
Assume that you have two tasks (with N and M requests) in your complex task. The first task has count 1 and the second task has count 3. You need to handle a request of the second iteration of the second task. To do this, you need to calculate the global id of the request and check this id in your event handler. Global ids are spread in this way:
from 0 to N-1 - the first task
from N to N+M-1 - the first iteration of the second task
from N+M to N+2*M-1 - the second iteration of the second task
from N+2*M to N+3*M-1 - the second iteration of the second task
So, if you want to handle a request of the second iteration of the second task, you need to check whether its id lies within the [N+M, N+2*M-1] interval.
At the moment, there is no easy way to get this information. However, this is still possible.
Assume that you have two tasks (with N and M requests) in your complex task. The first task has count 1 and the second task has count 3. You need to handle a request of the second iteration of the second task. To do this, you need to calculate the global id of the request and check this id in your event handler. Global ids are spread in this way:
from 0 to N-1 - the first task
from N to N+M-1 - the first iteration of the second task
from N+M to N+2*M-1 - the second iteration of the second task
from N+2*M to N+3*M-1 - the second iteration of the second task
So, if you want to handle a request of the second iteration of the second task, you need to check whether its id lies within the [N+M, N+2*M-1] interval.
Related Content
- 4 years ago
- 8 years ago
- 8 years ago
- 10 years ago
Recent Discussions
- 12 hours ago
- 7 days ago
- 10 days ago