9 use Magento\AsynchronousOperations\Api\Data\OperationInterfaceFactory;
20 private $entityManager;
25 private $operationFactory;
41 OperationInterfaceFactory $operationFactory,
44 $this->entityManager = $entityManager;
45 $this->operationFactory = $operationFactory;
61 $operationEntity = $this->operationFactory->create();
62 $this->entityManager->load($operationEntity, $operationId);
63 $operationEntity->setErrorCode($errorCode);
64 $operationEntity->setStatus(
$status);
65 $operationEntity->setResultMessage(
$message);
66 $operationEntity->setSerializedData(
$data);
67 $operationEntity->setResultSerializedData($resultData);
68 $this->entityManager->save($operationEntity);
70 $this->logger->critical($exception->getMessage());
__construct(EntityManager $entityManager, OperationInterfaceFactory $operationFactory, \Psr\Log\LoggerInterface $logger)
changeOperationStatus( $operationId, $status, $errorCode=null, $message=null, $data=null, $resultData=null)