/**
  * Generate a new delivery execution
  *
  * @param core_kernel_classes_Resource $assembly
  * @param string $userUri
  * @return core_kernel_classes_Resource the delivery execution
  */
 public function initDeliveryExecution(core_kernel_classes_Resource $assembly, $userUri)
 {
     $deImplementation = \taoDelivery_models_classes_execution_KVDeliveryExecution::spawn($this->getPersistence(), $userUri, $assembly);
     $deliveryExecution = new DeliveryExecution($deImplementation);
     $this->updateDeliveryExecutionStatus($deliveryExecution, null, InterfaceDeliveryExecution::STATE_ACTIVE);
     return $deliveryExecution;
 }
 /**
  * Generate a new delivery execution
  *
  * @param core_kernel_classes_Resource $assembly
  * @param string $userId
  * @return core_kernel_classes_Resource the delivery execution
  */
 public function initDeliveryExecution(core_kernel_classes_Resource $assembly, $userId)
 {
     $deImplementation = \taoDelivery_models_classes_execution_KVDeliveryExecution::spawn($this->getPersistence(), $userId, $assembly);
     $deliveryExecution = new DeliveryExecutionWrapper($deImplementation);
     $this->updateDeliveryExecutionStatus($deliveryExecution, null, DeliveryExecution::STATE_ACTIVE);
     $this->addDeliveryToUserExecutionList($userId, $assembly->getUri(), $deliveryExecution->getIdentifier());
     return $deliveryExecution;
 }
 /**
  * Generate a new delivery execution
  *
  * @param core_kernel_classes_Resource $assembly
  * @param string $userUri
  * @return core_kernel_classes_Resource the delivery execution
  */
 public function initDeliveryExecution(core_kernel_classes_Resource $assembly, $userUri)
 {
     $deliveryExecution = taoDelivery_models_classes_execution_KVDeliveryExecution::spawn($this->getPersistence(), $userUri, $assembly);
     $this->updateDeliveryExecutionStatus($deliveryExecution, null, INSTANCE_DELIVERYEXEC_ACTIVE);
     return $deliveryExecution;
 }