Ejemplo n.º 1
0
 public static RFManualTriggerKey CreateKey(RFKeyDomain keyDomain, RFEnum triggerCode, RFGraphInstance instance)
 {
     return(keyDomain.Associate <RFManualTriggerKey>(new RFManualTriggerKey
     {
         StoreType = RFStoreType.Document,
         Plane = RFPlane.User,
         GraphInstance = instance,
         TriggerCode = triggerCode
     }));
 }
Ejemplo n.º 2
0
 public static RFStatusKey Create(RFKeyDomain domain, string processName, RFGraphInstance instance)
 {
     return(domain.Associate(new RFStatusKey
     {
         ProcessName = processName,
         GraphInstance = instance,
         Plane = RFPlane.System,
         StoreType = RFStoreType.Document
     }));
 }
Ejemplo n.º 3
0
 public static RFStateKey CreateKey(RFKeyDomain keyDomain, string graphName, string processName, RFGraphInstance instance)
 {
     return(keyDomain.Associate <RFStateKey>(new RFStateKey
     {
         StoreType = RFStoreType.Document,
         Plane = RFPlane.User,
         GraphInstance = instance,
         GraphName = graphName,
         ProcessName = processName
     }));
 }
Ejemplo n.º 4
0
 public static RFGenericCatalogKey Create(RFKeyDomain keyDomain, string path, RFEnum _enum, RFGraphInstance instance)
 {
     return(keyDomain.Associate(new RFGenericCatalogKey
     {
         GraphInstance = instance,
         Name = _enum.ToString(),
         Path = path,
         Plane = RFPlane.User,
         StoreType = RFStoreType.Document
     }));
 }
Ejemplo n.º 5
0
 protected RFEngineDefinition(string engineName, RFKeyDomain keyDomain, int intervalSeconds, TimeSpan maxRuntime)
 {
     KeyDomain       = keyDomain;
     EngineName      = engineName;
     Processes       = new Dictionary <string, RFEngineProcessDefinition>();
     Triggers        = new List <IRFEngineTrigger>();
     Services        = new Dictionary <string, Func <IRFProcessingContext, IRFBackgroundService> >();
     Graphs          = new Dictionary <string, RFGraphDefinition>();
     Keys            = new Dictionary <string, string>();
     Tasks           = new List <RFEngineTaskDefinition>();
     Schedules       = new List <Func <IRFProcessingContext, RFSchedulerConfig> >();
     IntervalSeconds = intervalSeconds;
     MaxRuntime      = maxRuntime;
     ProcessCounter  = 1;
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Do not override or call base when you do
 /// </summary>
 public virtual void Initialize(RFEngineProcessorParam p, IRFProcessingContext context, RFKeyDomain keyDomain, string processName)
 {
     InstanceParams = p?.ConvertTo <P>();
     Context        = context;
     KeyDomain      = keyDomain;
     ProcessName    = processName;
     _isCancelling  = false;
     _processEntry  = null;
     Log            = new RFProcessLog(Context.SystemLog, context.UserLog, this);
 }
Ejemplo n.º 7
0
        public override void Initialize(RFEngineProcessorParam p, IRFProcessingContext context, RFKeyDomain keyDomain, string processName)
        {
            base.Initialize(p, context, keyDomain, processName);

            if (InstanceParams is RFEngineProcessorGraphInstanceParam)
            {
                GraphInstance = (InstanceParams as RFEngineProcessorGraphInstanceParam).Instance;
            }
            else
            {
                throw new RFSystemException(this, "Unable to extract GraphInstance from params");
            }
        }
Ejemplo n.º 8
0
 /// <summary>
 /// Create a new engine.
 /// </summary>
 /// <param name="graphName">Unique user-friendly name.</param>
 /// <param name="keyDomain">Key Domain defining root for all keys.</param>
 /// <returns>Use methods on returned obejct to add engine components.</returns>
 public static RFEngineDefinition Create(string graphName, RFKeyDomain keyDomain, int intervalSeconds = 60, TimeSpan?maxRuntime = null)
 {
     return(new RFEngineDefinition(graphName, keyDomain, intervalSeconds, maxRuntime ?? TimeSpan.FromMinutes(20)));
 }
Ejemplo n.º 9
0
 public RFEngineProcess(string name, RFEngineProcessDefinition config, RFKeyDomain keyDomain)
 {
     Name      = name;
     Config    = config;
     KeyDomain = keyDomain;
 }