OroCRM Forums

Covering OroCRM topics, including community updates and company announcements.

Forums Forums OroCRM OroCRM – Programming Questions Can't find job

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

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #25042

    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
  • #25043

    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.

    #25044

    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)

The forum ‘OroCRM – Programming Questions’ is closed to new topics and replies.

Back to top