/**
  * Schedules EmailBody for processing.
  *
  * @param EmailBody $emailBody
  */
 protected function scheduleProcess(EmailBody $emailBody)
 {
     /*
      * Retrieve all process definitions to trigger
      */
     $definitions = $this->processStorage->getService()->getProcessDefinitionNames();
     $definitions = $this->getDefinitionRepository()->findBy(['name' => $definitions]);
     /*
      * Trigger process definitions with provided data
      */
     foreach ($definitions as $definition) {
         $trigger = new ProcessTrigger();
         //id must be unique otherwise in cache will be saved and runned first definition with id = null
         $trigger->setId($definition->getName());
         $trigger->setDefinition($definition);
         $data = new ProcessData();
         $data->set('data', $emailBody);
         $this->handler->handleTrigger($trigger, $data);
     }
 }