示例#1
0
 void OnAborted(WorkflowApplicationAbortedEventArgs args)
 {
     if (args.Reason != null)
     {
         UnhandledExceptionInfo = ExceptionDispatchInfo.Capture(args.Reason);
     }
 }
 private void OnAbort(WorkflowApplicationAbortedEventArgs arg)
 {
     Log.WarnFormat("OnAbort({0})", arg.Reason);
     lock (Result)
     {
         Result.Error = arg.Reason;
     }
 }
示例#3
0
 private void AppAborted(WorkflowApplicationAbortedEventArgs e)
 {
     if (Incomplete != null)
     {
         Incomplete(e.InstanceId, "Aborted", e.Reason.Message);
     }
     RemoveInstance(e.InstanceId);
 }
示例#4
0
 void WorkerManagerAborted(WorkflowApplicationAbortedEventArgs e)
 {
     ExtensionMethods.TraceError("WorkerManager {0} Aborted.", e.InstanceId);
     ExtensionMethods.TraceError("Exception: {0}\n{1}",
                                 e.Reason.GetType().FullName,
                                 e.Reason.Message);
     Trace.Flush();
     eventDone.Set();
 }
示例#5
0
        private void Aborted(WorkflowApplicationAbortedEventArgs a)
        {
            var h = WorkflowAborted;

            if (h != null)
            {
                h(this, a);
            }
            RemoveActivityInstance(a.InstanceId);
        }
示例#6
0
 //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));
         }
     }
 }
示例#7
0
        private void OnWorkflowAborted(object sender, WorkflowApplicationAbortedEventArgs e)
        {
            _log.DebugFormat("WorkflowAborted {0} : {1}", e.InstanceId, e.Reason);
            var ctx = GetContext(e.InstanceId);

            if (ctx == null)
            {
                return;
            }

            ctx.Error(e.Reason);
            RiseCompleted(e.InstanceId, ctx);
        }
示例#8
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));
        }
        private void workflowAborted(WorkflowApplicationAbortedEventArgs e)
        {
            string    objType = ExecuteScalar("select [ObjType] from [WorkflowInstance] where [InstanceGUID] = '" + e.InstanceId + "'");
            string    objID   = ExecuteScalar("select [ObjID] from [WorkflowInstance] where [InstanceGUID] = '" + e.InstanceId + "'");
            DynEntity log     = new DynEntity("Log");

            log["LogID"]        = GetNextID("Log");
            log["LogType"]      = "工作流失败";
            log["ObjType"]      = objType;
            log["ObjID"]        = objID;
            log["Comment"]      = e.Reason.Message + "实例为:" + e.InstanceId;
            log["OperateTime"]  = DateTime.Now;
            log["OperaterName"] = "system";
            log["OperaterID"]   = 0;
            GatewayFactory.Default.Save(log);
        }
示例#10
0
        internal void WorkerAborted(WorkflowApplicationAbortedEventArgs e)
        {
            //CompleteJobIfAllWorkersCompleted();
            if (!OneAbortMessageLogged)
            {
                //because we dont want to send same message for all workers.
                StringBuilder sb = new StringBuilder();
                sb.AppendLine(string.Format("Fatal Error: A worker {0} was aborted. Forcefully aborting the job!", e.InstanceId));
                sb.AppendLine();
                sb.Append(string.Format("Reason was: {0}\n{1}", e.Reason.GetType().FullName, e.Reason.ToString()));
                ExtensionMethods.TraceError(sb.ToString());
                Trace.Flush();
                OneAbortMessageLogged = true;
            }

            AbortJob();
        }
示例#11
0
 private void WfAborted(WorkflowApplicationAbortedEventArgs obj)
 {
     _executionLog?.ClearStates();
     Dispatcher.BeginInvoke(new Action(() =>
     {
         var m = new ExecutionMessage()
         {
             ExecutionState = "WorkflowStop", Sender = Name, ParentNames = new string[0]
         };
         subject.OnNext(m);
         var s = string.Format("[{0}] [{1}] [{2}]",
                               DateTime.Now.ToString("HH:mm:ss"),
                               m.Sender,
                               m.ExecutionState);
         LogExecution(s);
     }));
 }
 private void OnAborted(WorkflowApplicationAbortedEventArgs args)
 {
     throw new InvalidOperationException("Workflow aborted", args.Reason);
 }
示例#13
0
 private static void OnAborted(WorkflowApplicationAbortedEventArgs obj)
 {
     synEvent.Set();
     Console.WriteLine("The workflow is aborted!!");
 }
示例#14
0
 private void OnWorkflowInstanceAborted(WorkflowApplicationAbortedEventArgs e)
 {
     TestTraceManager.Instance.AddTrace(e.InstanceId, new SynchronizeTrace(WorkflowInstanceAbortTests.AbortedHandlerCalled));
     SynchronizeTrace.Trace(e.InstanceId, WorkflowInstanceAbortTests.AbortedHandlerCalled);
 }
示例#15
0
 private void AbortedEvent(WorkflowApplicationAbortedEventArgs args)
 {
     _reloadWaitHandler.Set();
     _log.Error("Aborted InstanceId=" + args.InstanceId.ToString(), args.Reason);
     ActivityAbortedEvent?.Invoke(args);
 }
示例#16
0
 /// <summary>
 /// Invoked when the <see cref="ActivityActor"/> is aborted.
 /// </summary>
 /// <param name="args"></param>
 /// <returns></returns>
 protected virtual Task OnAbortedAsync(WorkflowApplicationAbortedEventArgs args)
 {
     return(Task.FromResult(true));
 }
 private void WorkflowAborted(WorkflowApplicationAbortedEventArgs e)
 {
     this.running = false;
     StatusViewModel.SetStatusText(Resources.AbortedStatus, this.workflowName);
 }
 void OnAborted(WorkflowApplicationAbortedEventArgs obj)
 {
 }
 /// <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;
 }
示例#20
0
 private static void AbortedHandler(WorkflowApplicationAbortedEventArgs obj)
 {
     Console.WriteLine("AbortedHandler");
 }
 private void WorkflowAborted(WorkflowApplicationAbortedEventArgs e)
 {
     WriteToConsole(Environment.NewLine + "** Aborted **");
     SetStatusStopped(Environment.NewLine + (e.Reason != null ? ExceptionManager.GetExceptionMessage(e.Reason) : string.Empty));
     CheckShutDown();
 }
示例#22
0
 private void WorkflowAborted(WorkflowApplicationAbortedEventArgs e)
 {
     console.WriteLine(Environment.NewLine + "** Aborted **");
     console.WriteLine(Environment.NewLine + (e.Reason != null ? ExceptionManager.GetExceptionMessage(e.Reason) : string.Empty));
     isBusy = false;
 }
示例#23
0
 private void OnAborted(WorkflowApplicationAbortedEventArgs args)
 {
     _eventBroker.Publish(new WorkflowAborted(args.Reason));
 }
示例#24
0
 Task IActivityActorInternal.OnAbortedAsync(WorkflowApplicationAbortedEventArgs args)
 {
     return(OnAbortedAsync(args));
 }
示例#25
0
 private void Aborted(WorkflowApplicationAbortedEventArgs e)
 {
     OnRunningStateChanged(new WorkflowExecutingStateEventArgs(false));
 }
示例#26
0
 void OnWorkflowAborted(WorkflowApplicationAbortedEventArgs e)
 {
     Application.Current.Dispatcher.BeginInvoke(
         () => { throw new DelegateActivityException("The handler for the DelegateActivityExtension was aborted. See inner exception", e.Reason); });
 }
示例#27
0
 public void OnAborted(WorkflowApplicationAbortedEventArgs e)
 {
     this._repository.UpdateWorkflowInstanceState(e.InstanceId, InstanceState.Aborted, string.Empty);
 }
示例#28
0
 private static void OnWorkflowAborted(WorkflowApplicationAbortedEventArgs args)
 {
     logger.Error(args.Reason);
     Debug.WriteLine("OnWorkflowAborted");
 }
示例#29
0
 static void OnAborted(WorkflowApplicationAbortedEventArgs e)
 {
     Console.WriteLine("Workflow aborted because: " + e.Reason.Message);
     syncEvent.Set();
 }
示例#30
0
 static void aborted(WorkflowApplicationAbortedEventArgs e)
 {
     writeRunInfo(e.InstanceId, "aborted", e.Reason.Message);
 }