Exemplo n.º 1
0
 /**
  * Compute current sync data from execution state.
  * 
  * @return array
  */
 public function collectSyncData()
 {
     $data = ['id' => $this->id, 'parentId' => $this->parentExecution === NULL ? NULL : $this->parentExecution->getId(), 'processId' => $this->getRootExecution()->getId(), 'modelId' => $this->model->getId(), 'state' => $this->state, 'depth' => $this->getExecutionDepth(), 'timestamp' => $this->timestamp, 'variables' => $this->variables, 'transition' => $this->transition === NULL ? NULL : (string) $this->transition->getId(), 'node' => $this->node === NULL ? NULL : (string) $this->node->getId()];
     return $data;
 }
Exemplo n.º 2
0
 /**
  * Have the execution transition into the next node.
  * 
  * @param Execution $execution
  * @param Transition $transition
  */
 public function __construct(Execution $execution, Transition $transition = NULL)
 {
     $this->executionId = $execution->getId();
     $this->transitionId = $transition === NULL ? NULL : (string) $transition->getId();
 }