Exemplo n.º 1
0
        public IWorkflowInstance CreateInstance(Dictionary <string, object> Parameters, string queuename, string correlationId,
                                                OpenRPA.Interfaces.idleOrComplete idleOrComplete, OpenRPA.Interfaces.VisualTrackingHandler VisualTracking)
        {
            if (this.Parameters == null)
            {
                this.Parameters = new List <workflowparameter>();
            }
            if (this.Parameters.Count == 0)
            {
                ParseParameters();
            }
            var instance = WorkflowInstance.Create(this, Parameters);

            instance.queuename = queuename; instance.correlationId = correlationId;
            if (idleOrComplete != null)
            {
                instance.OnIdleOrComplete += idleOrComplete;
            }
            if (VisualTracking != null)
            {
                instance.OnVisualTracking += VisualTracking;
            }
            LoadedInstances.Add(instance);
            //instance.Run();
            return(instance);
        }
 /// <summary>
 /// Helper method which returns all the currently loaded instances.
 /// </summary>
 /// <returns></returns>
 public static IEnumerable <TabablzControl> GetLoadedInstances( )
 {
     return(LoadedInstances.Union(VisibleInstances).Distinct( ).ToList( ));
 }