onInitialize method

  1. @override
bool onInitialize()
override

Callback when this executor is initialized. Returns true if succesfully initialized, false othervise.

Note that this is a non-async method and should hence be 'light-weight' and not block execution for a long duration.

Implementation

@override
bool onInitialize() {
  // get the trigger executor and add it to this stream
  triggerExecutor = getTriggerExecutor(trigger);
  group.add(triggerExecutor!.data);
  executors.add(triggerExecutor!);
  triggerExecutor?.initialize(trigger, deployment!);

  // get the task executor and add it to the trigger executor's stream
  taskExecutor = getTaskExecutor(task);
  triggerExecutor?.group.add(taskExecutor!.data);
  triggerExecutor?.executors.add(taskExecutor!);
  taskExecutor?.initialize(task, deployment!);

  return true;
}