code: public synchronized void submitTask(final ActiveContext context) {
      final TaskEntity task = taskQueue.poll();
      final Integer taskId = task.getId();
      final String command = task.getCommand();
  
      final Configuration taskConf = TaskConfiguration.CONF
          .set(TaskConfiguration.TASK, ShellTask.class)
          .set(TaskConfiguration.IDENTIFIER, taskId.toString())
          .build();
      final Configuration commandConf = Tang.Factory.getTang().newConfigurationBuilder()
          .bindNamedParameter(Command.class, command)
          .build();
  
      final Configuration merged = Configurations.merge(taskConf, commandConf);
      context.submitTask(merged);
      runningTasks.add(task);
    }
docs: Submit a task to the ActiveContext.