This way we get all work items. But later on onSchedule(self, work_item) event, we can get batches. So we can just construct all tasks in suspended state, then just trigger them to ready state on onSchedule event, like documentation says.
Is there a way to get the same tasks (work items), as they will be on an onSchedule event?
As I understand, with this hybrid approach you need to create a flat task map of workitems on the Afanasy side and then it already depends on the particular implementation how you want to activate/submit those tasks.
And when you are asking "a way to get the same tasks (work items)" - I'm assuming, there no magic method from PDG, just your own way to detect and send the Mantra workitem (for example) to the Mantra block in Afanasy.
At least I didn't find any "magic" method. You have to manage it by yourself. Get all workitems in `onStartCook` method and then map it by name, id, command, or what is more suitable for you.
But there still a question for PDG "Batched" workitem. How do you want to mimic it in the render manager?
Make sense but why do you need to skip workitems that have a parent Batch work item? As I understand render manager will not be responsible for dependencies - just releasing tasks by the trigger. Also, probably need to skip all tasks without cmd.