interface zif_proota_parallel_code
  public.
  "! Unique identifier for each task.
  types task_id type spta_t_object_id.
  "! Data feed as input for task.
  types context_input type ref to data.
  "! Data received as output from task.
  types context_output type ref to data.

  "! Code run on tasks (parallel).
  "! Note that it will run on a separated LUW, so no access to class data set on starter LUW.
  class-methods worker
    importing
      input  type context_input
    exporting
      output type context_output.
  class-methods create_context_input_object
    returning value(context) type context_input.
  class-methods create_context_output_object
    returning value(context) type context_output.
  "! Build input data to be processed on task.
  "! When you have no more tasks to dispatch just return TASK_INPUT empty.
  methods prepare_task_input
    importing
      request_task_id type task_id optional
    exporting
      task_id         type task_id
      task_input      type context_input.
  "! Handle output generated by task.
  methods process_task_output
    importing
      task_output type context_output.
endinterface.
