Esempio n. 1
0
        protected virtual void ProcessLocalServiceTarget(TransactionStatus transactionStatus, ScheduledItem scheduledItem,
                                                         Activity activity)
        {
            DataService dataService =
                ServiceManager.ValidateDataService(scheduledItem.TargetId, ServiceType.Submit);

            // Load the service plugin
            ISubmitProcessor submitPlugin = null;
            IPluginDisposer  disposer;
            string           flowName = FlowManager.GetDataFlowNameById(dataService.FlowId);

            try
            {
                disposer = PluginLoader.LoadSubmitProcessor(dataService, out submitPlugin);
            }
            catch (Exception e)
            {
                throw new NotImplementedException(string.Format("Failed to load the target submit service \"{0}\" for the scheduled item \"{1}\"",
                                                                dataService.Name, scheduledItem.Name), e);
            }
            using (disposer)
            {
                LogActivity(activity, "Calling ProcessSubmit()");
                try
                {
                    ISubmitProcessorEx submitPluginEx = submitPlugin as ISubmitProcessorEx;
                    if (submitPluginEx != null)
                    {
                        string submitTransactionStatusDetail;
                        submitPluginEx.ProcessSubmitAndReturnStatus(transactionStatus.Id,
                                                                    out submitTransactionStatusDetail);
                    }
                    else
                    {
                        submitPlugin.ProcessSubmit(transactionStatus.Id);
                    }
                }
                finally
                {
                    activity.Append(submitPlugin.GetAuditLogEvents());
                }
                LogActivity(activity, "Called ProcessSubmit()");
            }
        }
Esempio n. 2
0
 public virtual IPluginDisposer LoadSubmitProcessor(DataService inDataService, out ISubmitProcessor plugin)
 {
     return(LoadPluginInterface <ISubmitProcessor>(inDataService, out plugin));
 }