예제 #1
0
 void OnAborted(WorkflowApplicationAbortedEventArgs args)
 {
     if (args.Reason != null)
     {
         UnhandledExceptionInfo = ExceptionDispatchInfo.Capture(args.Reason);
     }
 }
예제 #2
0
 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));
        }
예제 #9
0
        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));
 }
예제 #17
0
 private void WorkflowAborted(WorkflowApplicationAbortedEventArgs e)
 {
     this.running = false;
     StatusViewModel.SetStatusText(Resources.AbortedStatus, this.workflowName);
 }
예제 #18
0
 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");
 }
예제 #21
0
 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);
 }