/**
  * @param ProcessWasAddedToWorkflow $event
  */
 protected function whenProcessWasAddedToWorkflow(ProcessWasAddedToWorkflow $event)
 {
     $this->processList[] = Process::withTaskList($event->tasks(), $event->processId(), $event->processType());
 }
 public function onProcessWasAddedToWorkflow(ProcessWasAddedToWorkflow $event)
 {
     $this->connection->insert(Tables::PROCESS, ['id' => $event->processId()->toString(), 'type' => $event->processType()->toString(), 'workflow_id' => $event->workflowId()->toString()]);
 }