public void RunVirtualBatch(string formId, IPlugin[] plugins) { var virtualBatches = FormProcessingVirtualPipelineBatchBuilder.GetVirtualPipelineBatches(formId); if (virtualBatches == null) { return; } var pipelineBatchRunner = (InProcessPipelineBatchRunner)PipelineBatchRunner; foreach (var virtualBatch in virtualBatches) { if (pipelineBatchRunner != null && (!pipelineBatchRunner.IsRunningRemotely(virtualBatch) || !PipelineBatchRunner.IsRunning(virtualBatch.Identifier))) { const string category = "Data Exchange"; var parameters = new object[] { virtualBatch, GetRunAsUser(), plugins }; var options = new JobOptions(virtualBatch.Name, category, "Data Exchange Framework", this, "RunPipelineBatch", parameters); PipelineBatchRunner.CurrentProcesses[virtualBatch.Identifier] = JobManager.Start(options); } } }
public void Run(ID batchItemId, IPlugin[] plugins) { var batchItem = Sitecore.Configuration.Factory.GetDatabase("master") .GetItem(batchItemId); if (PipelineBatchRunner == null || batchItem == null || !Helper.IsPipelineBatchItem(batchItem)) { return; } var pipelineBatch = Helper.GetPipelineBatch(batchItem); if (pipelineBatch == null) { return; } var pipelineBatchRunner = (InProcessPipelineBatchRunner)PipelineBatchRunner; if (pipelineBatchRunner != null && (!pipelineBatchRunner.IsRunningRemotely(pipelineBatch) || !PipelineBatchRunner.IsRunning(pipelineBatch.Identifier))) { const string category = "Data Exchange"; var parameters = new object[] { pipelineBatch, GetRunAsUser(), plugins }; var options = new JobOptions(batchItem.Name, category, "Data Exchange Framework", this, "RunPipelineBatch", parameters); PipelineBatchRunner.CurrentProcesses[pipelineBatch.Identifier] = JobManager.Start(options); } }
protected virtual void Run(PipelineBatch batch, IPlugin[] plugins) { if (batch == null) { return; } var pipelineBatchRunner = (InProcessPipelineBatchRunner)PipelineBatchRunner; if (pipelineBatchRunner != null && (!pipelineBatchRunner.IsRunningRemotely(batch) || !PipelineBatchRunner.IsRunning(batch.Identifier))) { const string category = "Data Exchange"; var parameters = new object[] { batch, GetUser(), plugins }; var options = new JobOptions(batch.Name, category, "Data Exchange Framework", this, "RunPipelineBatch", parameters); PipelineBatchRunner.CurrentProcesses[batch.Identifier] = JobManager.Start(options); } }