Ejemplo n.º 1
0
 /**
  * Register the plugin on the workflow environment
  *
  * @param Environment $workflowEnv
  * @return void
  */
 public function registerOn(Environment $workflowEnv)
 {
     $es = $workflowEnv->getEventStore();
     $es->beginTransaction();
     $es->create(new \Prooph\EventStore\Stream\Stream(new \Prooph\EventStore\Stream\StreamName('prooph_processing_stream'), []));
     $es->commit();
 }
 /**
  * Register the plugin on the workflow environment
  *
  * @param Environment $workflowEnv
  * @return void
  */
 public function registerOn(Environment $workflowEnv)
 {
     $workflowEnv->getWorkflowProcessor()->events()->attachListener('process_was_started_by_message', [$this, 'onProcessWasStartedByMessage']);
     $workflowEnv->getWorkflowProcessor()->events()->attachListener('process_did_finish', [$this, 'onProcessDidFinish']);
     $workflowEnv->getEventStore()->getActionEventDispatcher()->attachListener('commit.post', [$this, 'onEventStorePostCommit']);
 }