This topic contains 2 replies, has 1 voice, and was last updated by dimitri.seguin17 8 years, 9 months ago.
- Topic
Hello,
I created a new job in batch_jobs.yml in my new bundle.
connector:
name: oro_importexport
jobs:
entity_import_from_mongo:
title: "RC Entity Import from Mongo"
type: import
steps:
import:
title: import
class: Oro\Bundle\BatchBundle\Step\ItemStep
services:
reader: importexport.reader.mongo
processor: oro_importexport.processor.import_delegate
writer: oro_importexport.writer.entity
parameters: ~I created a new command too but when I start this new command, I like return “Can’t find job “entity_import_from_mongo”.
protected function execute(InputInterface $input, OutputInterface $output)
{
$processorAlias = $this->handleProcessorName();
$validationProcessorAlias = $this->handleProcessorName(
self::OPTION_VALIDATION_PROCESSOR,
ProcessorRegistry::TYPE_IMPORT_VALIDATION
);$validationInfo = $this->getImportHandler()->handleImportValidation(
self::JOB_VALIDATE_IMPORT_FROM_MONGO,
$validationProcessorAlias
);$this->renderResult($validationInfo, $output);
$confirmation = $this->getHelper('dialog')->askConfirmation(
$output,
'<question>Do you want to proceed [yes]? </question>',
true
);if (!$confirmation) {
return self::STATUS_SUCCESS;
}$importInfo = $this->getImportHandler()->handleImport(
self::JOB_VALIDATE_IMPORT_FROM_MONGO,
$processorAlias
);$output->writeln('<info>' . $importInfo['message'] . '</info>');
return self::STATUS_SUCCESS;
}I don’t inderstand why. Help me please.
The forum ‘OroCRM – Programming Questions’ is closed to new topics and replies.