プログラムによるパイプライン バッチの開始

Version:
日本語翻訳に関する免責事項

このページの翻訳はAIによって自動的に行われました。可能な限り正確な翻訳を心掛けていますが、原文と異なる表現や解釈が含まれる場合があります。正確で公式な情報については、必ず英語の原文をご参照ください。

パイプライン バッチはプログラムで開始できます。例えば:

Guid tenantId = ... //identify the tenant that owns the pipeline batch
Guid pipelineBatchId = ... //identity the pipeline batch
IEnumerable<PipelineBatch> batches = null;
tasks = Sitecore.DataExchange.Context.PipelineBatchRepository.GetPipelineBatches(tenantId);
if (batches != null)
    {
        PipelineBatch pipelineBatch = batches.FirstOrDefault(x => x.ID == pipelineBatchId);
        if (pipelineBatch != null)
            {
                var runner = new InProcessPipelineBatchRunner();
                if (runner.Run(pipelineBatch))
                    {
                        //pipeline batch was started
                    }
            }
    }
メモ

パイプライン バッチは、その内容によっては長時間実行できます。パイプライン バッチが短時間で完了することが確実でない限り、Sitecoreタスクで実行することをお勧めします。

この記事を改善するための提案がある場合は、 お知らせください!