private void OnUnloaded(WorkflowApplicationEventArgs args)
 {
     if (_waitHandle != null)
     {
         _waitHandle.Set();
     }
 }
Esempio n. 2
0
        private void MyInvoke(WorkflowApplicationEventArgs er, bool isIdle = false)
        {
            nameBox.Items.Clear();

            if (!isIdle)
            {
                UpdateControl();
                nameBox.Text = "";
                return;
            }

            bool countersign = false;
            var  idleEr      = (WorkflowApplicationIdleEventArgs)er;

            foreach (var item in idleEr.Bookmarks)
            {
                if (item.BookmarkName == "Countersign")
                {
                    countersign = true;
                }
                nameBox.Items.Add(item.BookmarkName);
            }
            UpdateControl(countersign);
            nameBox.SelectedIndex = 0;
        }
 private void OnUnload(WorkflowApplicationEventArgs arg)
 {
     Log.DebugFormat("OnUnload()");
     InstanceId = arg.InstanceId;
     Unloaded.Set();
     SynchronizationContext.CompleteWork();
 }
Esempio n. 4
0
        private void OnWorkflowUnloaded(object sender, WorkflowApplicationEventArgs e)
        {
            _log.DebugFormat("WorkflowUnloaded {0}", e.InstanceId);
            var ctx = GetContext(e.InstanceId);

            if (ctx != null)
            {
                RiseCompleted(e.InstanceId, ctx);
            }
        }
Esempio n. 5
0
        private void wfapp_WorkflowAborted(WorkflowApplicationEventArgs e)
        {
            WorkflowDetails workflow;

            lock (syncRoot)
            {
                workflow = workflows[e.InstanceId];
            }

            FinishWorkflow(e.InstanceId);
        }
Esempio n. 6
0
        private void Unloaded(WorkflowApplicationEventArgs a)
        {
            var h = WorkflowUnloaded;

            if (h != null)
            {
                h(this, a);
            }

            RemoveActivityInstance(a.InstanceId);
        }
Esempio n. 7
0
        private void wfapp_WorkflowAborted(WorkflowApplicationEventArgs e)
        {
            WorkflowDetails workflow;

            lock (syncRoot)
            {
                workflow = workflows[e.InstanceId];
            }

            // TODO: this might be needed here for Kill to work correctly, needs testing
            //WorkflowEvent(this, new HostEventArgs(WorkflowEventType.Failed, e.InstanceId, workflow.LastException.Message));

            FinishWorkflow(e.InstanceId);
        }
Esempio n. 8
0
        private void wfapp_WorkflowUnloaded(WorkflowApplicationEventArgs e)
        {
            WorkflowDetails workflow;

            lock (syncRoot)
            {
                workflow = workflows[e.InstanceId];
            }

            // Assume that event is wired-up, otherwise it won't work anyway
            switch (workflow.Job.Status)
            {
            case JobStatus.Persisted:
                WorkflowEvent(this, new HostEventArgs(WorkflowEventType.Persisted, e.InstanceId));
                break;

            default:
                break;
            }

            FinishWorkflow(e.InstanceId);
        }
Esempio n. 9
0
        private static void LogMessages(WorkflowApplicationEventArgs e,
                                        StringWriter sw, string message, Action <string> writelineListener, bool clearMessages = false)
        {
            Task.Run(() =>
            {
                sw.WriteLine(message);
                // Send the current WriteLine outputs to the designated listner
                if (writelineListener != null)
                {
                    var writers = e.GetInstanceExtensions <StringWriter>();
                    foreach (var writer in writers)
                    {
                        writelineListener("Workflow Writeline Log : " + writer.ToString());
                    }
                }

                if (clearMessages)
                {
                    sw.GetStringBuilder().Clear(); //clear all data from the StringWriter
                }
            });
        }
Esempio n. 10
0
 static void unloaded(WorkflowApplicationEventArgs e)
 {
     writeRunInfo(e.InstanceId, "unloaded", "");
 }
 private void OnUnloaded(WorkflowApplicationEventArgs args)
 {
     if(_waitHandle != null)
     {
         _waitHandle.Set();
     }
 }
Esempio n. 12
0
 /// <summary>
 ///   Called when a Workflow is unloaded
 /// </summary>
 /// <param name="args"> The arguments </param>
 public void OnUnload(WorkflowApplicationEventArgs args)
 {
     this.Refresh();
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="NinjectWorkflowApplicationEventArgs"/> class.
        /// </summary>
        /// <param name="workflowApplicationArguments">The <see cref="System.Activities.WorkflowApplicationEventArgs"/> instance containing the event data.</param>
        internal NinjectWorkflowApplicationEventArgs(WorkflowApplicationEventArgs workflowApplicationArguments)
        {
            this.workflowApplicationArguments = workflowApplicationArguments;

            this.InstanceId = this.Arguments.InstanceId;
        }
 void OnUnloaded(WorkflowApplicationEventArgs e)
 {
     this.isLoaded = false;
 }
Esempio n. 15
0
 void WorkerManagerUnloaded(WorkflowApplicationEventArgs e)
 {
     //ExtensionMethods.TraceInformation("WorkerManager '{0}' unloaded.", e.InstanceId);
     //Trace.Flush();
 }
Esempio n. 16
0
 private void UnloadedEvent(WorkflowApplicationEventArgs args)
 {
     _reloadWaitHandler.Set();
     _log.Debug("Unloaded InstanceId=" + args.InstanceId.ToString());
 }
 private void OnWorkflowIdle(WorkflowApplicationEventArgs args)
 {
 }
        private void OnWorkflowIdle(WorkflowApplicationEventArgs args)
        {

        }
Esempio n. 19
0
 private static void Unloaded(WorkflowApplicationEventArgs obj)
 {
     _instanceId = obj.InstanceId;
     Console.WriteLine("Unloaded, InstanceId=" + _instanceId);
     _wait.Set();
 }
Esempio n. 20
0
 private static void OnUnloaded(WorkflowApplicationEventArgs workflowApplicationEventArgs)
 {
     // UNDONE: (maj) consider moving this to the workflow, itself, not this event, in a custom activity
     IoHelper.ArchivePersistenceFolder();
 }
Esempio n. 21
0
 private void wfapp_WorkflowAborted(WorkflowApplicationEventArgs e)
 {
     workflowCompletedEvent.Set();
 }
        private void OnWorkflowUnloaded(WorkflowApplicationEventArgs args)
        {

        }
Esempio n. 23
0
        private static void InstanceAborted(WorkflowApplicationEventArgs e)
        {
            try
            {
                var ss = e.InstanceId;
            }
            catch
            {

            }
        }
Esempio n. 24
0
 void OnUnloaded(WorkflowApplicationEventArgs args)
 {
 }
Esempio n. 25
0
 /// <summary>
 ///   The on unload.
 /// </summary>
 /// <param name="args"> The args. </param>
 private void OnUnload(WorkflowApplicationEventArgs args)
 {
     this.IsLoaded = false;
     Debug.Assert(this.model != null, "this.view != null");
     this.model.OnUnload(args);
 }
Esempio n. 26
0
 private void unload(WorkflowApplicationEventArgs e)
 {
 }
 void OnUnloaded(WorkflowApplicationEventArgs e)
 {
     this.isLoaded = false;
 }
		private void HandleWorkflowApplicationUnloaded(WorkflowApplicationEventArgs e)
		{
			if (!base.Disposed)
			{
				PSWorkflowApplicationInstance._structuredTracer.Correlate();
				this.Tracer.WriteMessage("Workflow Application is unloaded.");
				if (this.callSuspendDelegate)
				{
					this.callSuspendDelegate = false;
					if (base.OnSuspended != null)
					{
						base.OnSuspended(this);
					}
				}
				if (base.OnUnloaded != null)
				{
					base.OnUnloaded(this);
				}
				return;
			}
			else
			{
				return;
			}
		}
Esempio n. 29
0
 private static void OnUnloaded(WorkflowApplicationEventArgs obj)
 {
     synEvent.Set();
     Console.WriteLine("Unload the workflow.");
 }
Esempio n. 30
0
        private void wfapp_WorkflowUnloaded(WorkflowApplicationEventArgs e)
        {
            WorkflowDetails workflow;
            lock (syncRoot)
            {
                workflow = workflows[e.InstanceId];
            }

            FinishWorkflow(e.InstanceId);
        }
 private void OnWorkflowUnloaded(WorkflowApplicationEventArgs args)
 {
 }
Esempio n. 32
0
 /// <summary>
 /// Invoked when the <see cref="ActivityActor"/> is unloaded.
 /// </summary>
 /// <param name="args"></param>
 /// <returns></returns>
 protected virtual Task OnUnloadedAsync(WorkflowApplicationEventArgs args)
 {
     return(Task.FromResult(true));
 }
Esempio n. 33
0
 private static void UnloadedHandler(WorkflowApplicationEventArgs obj)
 {
     Console.WriteLine("UnloadedHandler");
 }
Esempio n. 34
0
        private void HandleWorkflowApplicationUnloaded(WorkflowApplicationEventArgs e)
        {
            if (Disposed)
                return;

            _structuredTracer.Correlate();
            Tracer.WriteMessage("Workflow Application is unloaded.");

            if (this.callSuspendDelegate)
            {
                this.callSuspendDelegate = false;
                // suspend logic
                if (this.OnSuspended != null)
                {
                    this.OnSuspended(this);
                }
            }

            if (this.OnUnloaded != null)
                this.OnUnloaded(this);
        }
Esempio n. 35
0
 Task IActivityActorInternal.OnUnloadedAsync(WorkflowApplicationEventArgs args)
 {
     return(OnUnloadedAsync(args));
 }
Esempio n. 36
0
 public virtual void Unloaded(WorkflowApplicationEventArgs e)
 {
     Console.WriteLine("工作流 {0} 卸载.", e.InstanceId);
 }
Esempio n. 37
0
 public void OnUnloaded(WorkflowApplicationEventArgs e)
 {
 }
        private void wfapp_WorkflowAborted(WorkflowApplicationEventArgs e)
        {
            WorkflowDetails workflow;
            lock (syncRoot)
            {
                workflow = workflows[e.InstanceId];
            }

            // TODO: this might be needed here for Kill to work correctly, needs testing
            //WorkflowEvent(this, new HostEventArgs(WorkflowEventType.Failed, e.InstanceId, workflow.LastException.Message));

            FinishWorkflow(e.InstanceId);
        }
Esempio n. 39
0
 private void wfapp_WorkflowUnloaded(WorkflowApplicationEventArgs e)
 {
     workflowCompletedEvent.Set();
 }
        private void wfapp_WorkflowUnloaded(WorkflowApplicationEventArgs e)
        {
            WorkflowDetails workflow;
            lock (syncRoot)
            {
                workflow = workflows[e.InstanceId];
            }

            // Assume that event is wired-up, otherwise it won't work anyway
            switch (workflow.Job.Status)
            {
                case JobStatus.Persisted:
                    WorkflowEvent(this, new HostEventArgs(WorkflowEventType.Persisted, e.InstanceId));
                    break;
                default:
                    break;
            }

            FinishWorkflow(e.InstanceId);
        }
        public static void VerifyWFApplicationEventArgs <T>(WorkflowApplication workflowApplication, WorkflowApplicationEventArgs eventArgs, int expectedExtensionsCount)
            where T : class
        {
            if (eventArgs.InstanceId != workflowApplication.Id)
            {
                throw new Exception("Expected instance ID is: " + workflowApplication.Id + " Actual is: " + eventArgs.InstanceId);
            }

            int actualCount = eventArgs.GetInstanceExtensions <T>().Count <T>();

            if (actualCount != expectedExtensionsCount)
            {
                throw new Exception("Expected number of extensions is: " + expectedExtensionsCount + " Actual is: " + actualCount);
            }
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="NinjectWorkflowApplicationEventArgs"/> class.
        /// </summary>
        /// <param name="workflowApplicationArguments">The <see cref="System.Activities.WorkflowApplicationEventArgs"/> instance containing the event data.</param>
        internal NinjectWorkflowApplicationEventArgs(WorkflowApplicationEventArgs workflowApplicationArguments)
        {
            this.workflowApplicationArguments = workflowApplicationArguments;

            this.InstanceId = this.Arguments.InstanceId;
        }
Esempio n. 43
0
 static void unloaded(WorkflowApplicationEventArgs e)
 {
     writeRunInfo(e.InstanceId, "unloaded", "");
 }
Esempio n. 44
0
 void OnUnloaded(WorkflowApplicationEventArgs args)
 {
 }