Exemple #1
0
 /**
  * Hydrate common values from an Guzzle model to an event
  *
  * @param WorkflowEvent $event
  * @param Model         $model
  */
 protected function hydrateWorkflowEvent(WorkflowEvent $event, Model $model)
 {
     $event->setEventId($model->get('startedEventId'));
     $event->setExecutionId($model->get('workflowExecution')['workflowId']);
     $event->setRunId($model->get('workflowExecution')['runId']);
     $event->setToken($model->get('taskToken'));
     $event->setWorkflowName($model->get('workflowType')['name']);
     $event->setWorkflowVersion($model->get('workflowType')['version']);
 }
Exemple #2
0
 /**
  * Create a context for logging, containing event details
  *
  * @param WorkflowEvent $event
  * @return array
  */
 protected function createEventContext(WorkflowEvent $event)
 {
     return ['execution_id' => $event->getExecutionId(), 'run_id' => $event->getRunId(), 'event_id' => $event->getEventId()];
 }