public RFProcessingTrackerHandle RetryError(string dispatchKey, RFUserLogEntry userLogEntry) { try { Log.Info(this, "RetryError {0}", dispatchKey); LogRequest(); var activity = new RFRequestActivity(_context, _engineConfig); var qi = _context.DispatchStore.GetInstruction(dispatchKey); if (qi != null) { return(RegisterTracker(activity.Submit(null, new List <RFInstruction> { qi }, userLogEntry))); } return(new RFProcessingTrackerHandle { TrackerCode = "error" }); } catch (Exception ex) { Log.Exception(this, "RetryError", ex); return(new RFProcessingTrackerHandle { TrackerCode = "error" }); } }
public RFProcessingTracker SaveEntry(RFCatalogEntry entry, RFUserLogEntry userLogEntry) { var trackerCode = SaveEntry(entry, true, userLogEntry); RFProcessingTracker tracker = null; var sw = Stopwatch.StartNew(); do { Thread.Sleep(250); tracker = GetService().GetProcessStatus(trackerCode); } while (!tracker.IsComplete && sw.ElapsedMilliseconds < 10000); return(tracker); }
public RFProcessingTracker Submit(IEnumerable <RFCatalogEntry> inputs, IEnumerable <RFInstruction> instructions, RFUserLogEntry userLogEntry) { _parentContext.UserLog.LogEntry(userLogEntry); return(_parentContext.SubmitRequest(inputs, instructions)); }
public RFProcessingTracker Run(bool isGraph, string processName, RFEngineProcessorParam parameters, RFUserLogEntry userLogEntry) { var instructions = new List <RFInstruction>(); if (!isGraph) { instructions.Add(new RFParamProcessInstruction(processName, parameters)); } else if (parameters is RFEngineProcessorGraphInstanceParam) { instructions.Add(new RFGraphProcessInstruction((parameters as RFEngineProcessorGraphInstanceParam).Instance, processName)); } _parentContext.UserLog.LogEntry(userLogEntry); return(_parentContext.SubmitRequest(null, instructions)); }
public RFProcessingTrackerHandle SaveDocumentAsync(RFCatalogKey key, object content, RFUserLogEntry userLogEntry) { return(SaveEntryAsync(RFDocument.Create(key, content), userLogEntry)); }
public RFProcessingTracker SaveDocument(RFCatalogKey key, object content, bool raiseEvent, RFUserLogEntry userLogEntry) { if (raiseEvent) { return(SaveEntry(RFDocument.Create(key, content), userLogEntry)); } else { SaveEntry(RFDocument.Create(key, content), false, userLogEntry); return(new RFProcessingTracker("dummy")); } }
protected RFProcessingTrackerHandle SaveEntry(RFCatalogEntry entry, bool raiseEvent, RFUserLogEntry userLogEntry) // raiseEvent = true { if (raiseEvent) { return(GetService().SubmitAndProcess(new List <RFCatalogEntryDTO> { new RFCatalogEntryDTO(entry) }, userLogEntry)); } else { _context.SaveEntry(entry, raiseEvent); _context.UserLog.LogEntry(userLogEntry); return(null); } }
protected RFProcessingTrackerHandle SaveEntries(List <RFCatalogEntry> entries, bool raiseEvent, RFUserLogEntry userLogEntry) // raiseEvent = true { if (raiseEvent) { return(GetService().SubmitAndProcess(entries.Select(e => new RFCatalogEntryDTO(e)), userLogEntry)); } else { foreach (var entry in entries) { _context.SaveEntry(entry, raiseEvent); } _context.UserLog.LogEntry(userLogEntry); return(null); } }
public RFProcessingTrackerHandle SaveEntryAsync(RFCatalogEntry entry, RFUserLogEntry userLogEntry) { return(SaveEntry(entry, true, userLogEntry)); }
public RFProcessingTrackerHandle SaveEntriesAsync(List <RFCatalogEntry> entries, RFUserLogEntry userLogEntry) { return(SaveEntries(entries, true, userLogEntry)); }
public RFProcessingTrackerHandle RunProcess(bool isGraph, string processName, RFGraphInstance instance, RFUserLogEntry userLogEntry) { try { Log.Info(this, "RunProcess {0} / ({1},{2})", processName, instance != null ? instance.Name : null, instance != null ? instance.ValueDate : null); LogRequest(); var activity = new RFRequestActivity(_context, _engineConfig); // TODO: how should we treat non-graph? return(RegisterTracker(activity.Run(isGraph, processName, new RFEngineProcessorGraphInstanceParam(instance), userLogEntry))); } catch (Exception ex) { Log.Exception(this, "RunProcess", ex); return(new RFProcessingTrackerHandle { TrackerCode = "error" }); } }
public RFProcessingTrackerHandle SubmitAndProcess(IEnumerable <RFCatalogEntryDTO> inputs, RFUserLogEntry userLogEntry) { try { Log.Info(this, "SubmitAndProcess {0}", inputs.Count()); LogRequest(); var activity = new RFRequestActivity(_context, _engineConfig); return(RegisterTracker(activity.Submit(inputs.Select(e => e.Deserialize()), userLogEntry))); } catch (Exception ex) { Log.Exception(this, "SubmitAndProcess", ex); return(new RFProcessingTrackerHandle { TrackerCode = "error" }); } }