Forums

Covering OroCRM topics, including community updates and company announcements.  Subscribe

This topic contains 2 replies, has 1 voice, and was last updated by  dimitri.seguin17 2 years, 4 months ago.

  • Creator
    Topic
  • #11852

    dimitri.seguin17
    Participant

    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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #11854

    dimitri.seguin17
    Participant

    I think I turned a problem in a JobExecutor.php a method doJob to initialize $job my job is null but I don’t understand why.

    #11855

    dimitri.seguin17
    Participant

    Okay I solved a problem in my batch_jobs.yml, I forgot to configure a import_validation I was only import

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

ssossossosso