Example #1
0
 private void OnWorkflowAborted(WorkflowApplicationAbortedEventArgs e)
 {
     OnExecutingStateChanged(new WorkflowExecutingStateEventArgs(false));
 }
Example #2
0
 static void OnAborted(WorkflowApplicationAbortedEventArgs e)
 {
     Console.WriteLine("Workflow aborted because: " + e.Reason.Message);
     syncEvent.Set();
 }
 /// <summary>
 /// </summary>
 /// <param name="workflowApplicationAbortedEventArgs">
 /// The workflow application aborted event args. 
 /// </param>
 /// <exception cref="NotImplementedException">
 /// </exception>
 private void Aborted(WorkflowApplicationAbortedEventArgs workflowApplicationAbortedEventArgs)
 {
     throw new NotImplementedException();
 }
Example #4
0
        private void HandleWorkflowApplicationAborted(WorkflowApplicationAbortedEventArgs e)
        {
            if (Disposed)
                return;

            _structuredTracer.Correlate();
            Tracer.WriteMessage("Workflow Application is completed in Aborted state.");

            // if the suspend in progress and there is some error it result in the aborted event
            // explicit faulting the workflow.
            if (this.callSuspendDelegate)
            {
                this.callSuspendDelegate = false;
                HandleWorkflowApplicationFaultedState(e.Reason);
                return;
            }


            // if there is an exception in the canceling the workflow the WF application throws abort event instead on canceled event.
            if (_job.JobStateInfo.State == JobState.Stopping)
            {
                HandleWorkflowApplicationCanceled();
                return;
            }

            this.Error = e.Reason;

            // do all cleanups here to save memory
            PerformCleanupAtTerminalState();

            if (this.OnAborted != null)
                this.OnAborted(e.Reason, this);
        }
Example #5
0
 private void OnAborted(WorkflowApplicationAbortedEventArgs args)
 {
     throw new InvalidOperationException("Workflow aborted", args.Reason);
 }
Example #6
0
 private static void Aborted(WorkflowApplicationAbortedEventArgs e)
 {
     Console.WriteLine("Client Aborted: {0}", e.Reason);
     Program.syncEvent.Set();
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="WorkflowAbortedEpisodeResult"/> class.
 /// </summary>
 /// <param name="args">
 /// The event args.
 /// </param>
 /// <param name="instanceId">
 /// The instance Id.
 /// </param>
 public WorkflowAbortedEpisodeResult(WorkflowApplicationAbortedEventArgs args, Guid instanceId)
 {
     this.State = ActivityInstanceState.Faulted;
     this.Reason = args.Reason;
     this.InstanceId = instanceId;
 }
Example #8
0
 /// <summary>
 ///   A Workflow has aborted
 /// </summary>
 /// <param name="args"> The args </param>
 public void OnAbort(WorkflowApplicationAbortedEventArgs args)
 {
     this.Refresh();
 }
 //handle events from the WorkflowApplication
 void IWorkflowApplicationHandler.OnAborted(WorkflowApplicationAbortedEventArgs e)
 {
     lock (managerStateLock)
     {
         if (this.state == ManagerState.Opened)
         {
             this.hostView.Dispatch(() => RemoveInstance(e.InstanceId, "Instance was Aborted: " + e.Reason));
         }
     }
 }
		private void HandleWorkflowApplicationAborted(WorkflowApplicationAbortedEventArgs e)
		{
			if (!base.Disposed)
			{
				PSWorkflowApplicationInstance._structuredTracer.Correlate();
				this.Tracer.WriteMessage("Workflow Application is completed in Aborted state.");
				if (!this.callSuspendDelegate)
				{
					if (this._job.JobStateInfo.State != JobState.Stopping)
					{
						this.Error = e.Reason;
						this.PerformCleanupAtTerminalState();
						if (base.OnAborted != null)
						{
							base.OnAborted(e.Reason, this);
						}
						return;
					}
					else
					{
						this.HandleWorkflowApplicationCanceled();
						return;
					}
				}
				else
				{
					this.callSuspendDelegate = false;
					this.HandleWorkflowApplicationFaultedState(e.Reason);
					return;
				}
			}
			else
			{
				return;
			}
		}
 private void WorkflowAborted(WorkflowApplicationAbortedEventArgs e)
 {
     this.running = false;
     StatusViewModel.SetStatusText(Resources.AbortedStatus, this.workflowName);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="NinjectWorkflowApplicationAbortedEventArgs"/> class.
 /// </summary>
 /// <param name="workflowApplicationAbortedEventArgs">The <see cref="System.Activities.WorkflowApplicationAbortedEventArgs"/> instance containing the event data.</param>
 public NinjectWorkflowApplicationAbortedEventArgs(WorkflowApplicationAbortedEventArgs workflowApplicationAbortedEventArgs) : base(workflowApplicationAbortedEventArgs)
 {
     this.Reason = workflowApplicationAbortedEventArgs.Reason;
 }
Example #13
0
 void OnAborted(WorkflowApplicationAbortedEventArgs args)
 {
     if (args.Reason != null)
         UnhandledExceptionInfo = ExceptionDispatchInfo.Capture(args.Reason);
 }
            void OnAborted(WorkflowApplicationAbortedEventArgs obj)
            {

            }
        /// <summary>
        /// Internal Aborted Handler
        /// </summary>
        /// <param name="args">
        /// The args. 
        /// </param>
        private void InternalAborted(WorkflowApplicationAbortedEventArgs args)
        {
            if (this.Aborted != null)
            {
                var action = this.innerAborted;
                if (action != null)
                {
                    action(args);
                }

                this.Aborted(args);
            }
        }
 static void aborted(WorkflowApplicationAbortedEventArgs e)
 {
     writeRunInfo(e.InstanceId, "aborted", e.Reason.Message);
 }
Example #17
0
        //=========================================================================================================== Events

        private static void OnWorkflowAborted(WorkflowApplicationAbortedEventArgs args)
        {
            DeleteNotifications(args.InstanceId);
            WriteBackTheState(WorkflowStatusEnum.Aborted, args.InstanceId);

            // also write back abort message, if it is not yet given
            var stateContent = GetStateContent(args.InstanceId);
            if (stateContent == null)
                return;

            WriteBackAbortMessage(stateContent, DumpException(args.Reason));
        }