コード例 #1
0
 private void OnUnloaded(WorkflowApplicationEventArgs args)
 {
     if (_waitHandle != null)
     {
         _waitHandle.Set();
     }
 }
コード例 #2
0
ファイル: WorkflowForm.cs プロジェクト: HathWallace/WFDemo
        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;
        }
コード例 #3
0
 private void OnUnload(WorkflowApplicationEventArgs arg)
 {
     Log.DebugFormat("OnUnload()");
     InstanceId = arg.InstanceId;
     Unloaded.Set();
     SynchronizationContext.CompleteWork();
 }
コード例 #4
0
ファイル: ProcessHost.cs プロジェクト: zaharvsb52/MyWmsPro
        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);
            }
        }
コード例 #5
0
        private void wfapp_WorkflowAborted(WorkflowApplicationEventArgs e)
        {
            WorkflowDetails workflow;

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

            FinishWorkflow(e.InstanceId);
        }
コード例 #6
0
        private void Unloaded(WorkflowApplicationEventArgs a)
        {
            var h = WorkflowUnloaded;

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

            RemoveActivityInstance(a.InstanceId);
        }
コード例 #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);
        }
コード例 #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);
        }
コード例 #9
0
ファイル: WorkflowHost.cs プロジェクト: chakrabar/Solutions
        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
                }
            });
        }
コード例 #10
0
 static void unloaded(WorkflowApplicationEventArgs e)
 {
     writeRunInfo(e.InstanceId, "unloaded", "");
 }
コード例 #11
0
 private void OnUnloaded(WorkflowApplicationEventArgs args)
 {
     if(_waitHandle != null)
     {
         _waitHandle.Set();
     }
 }
コード例 #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;
        }
コード例 #14
0
 void OnUnloaded(WorkflowApplicationEventArgs e)
 {
     this.isLoaded = false;
 }
コード例 #15
0
 void WorkerManagerUnloaded(WorkflowApplicationEventArgs e)
 {
     //ExtensionMethods.TraceInformation("WorkerManager '{0}' unloaded.", e.InstanceId);
     //Trace.Flush();
 }
コード例 #16
0
 private void UnloadedEvent(WorkflowApplicationEventArgs args)
 {
     _reloadWaitHandler.Set();
     _log.Debug("Unloaded InstanceId=" + args.InstanceId.ToString());
 }
 private void OnWorkflowIdle(WorkflowApplicationEventArgs args)
 {
 }
コード例 #18
0
        private void OnWorkflowIdle(WorkflowApplicationEventArgs args)
        {

        }
コード例 #19
0
 private static void Unloaded(WorkflowApplicationEventArgs obj)
 {
     _instanceId = obj.InstanceId;
     Console.WriteLine("Unloaded, InstanceId=" + _instanceId);
     _wait.Set();
 }
コード例 #20
0
ファイル: Workflow1Handler.cs プロジェクト: bejubi/MmapMan
 private static void OnUnloaded(WorkflowApplicationEventArgs workflowApplicationEventArgs)
 {
     // UNDONE: (maj) consider moving this to the workflow, itself, not this event, in a custom activity
     IoHelper.ArchivePersistenceFolder();
 }
コード例 #21
0
ファイル: Parameters.cs プロジェクト: theresadower/graywulf
 private void wfapp_WorkflowAborted(WorkflowApplicationEventArgs e)
 {
     workflowCompletedEvent.Set();
 }
コード例 #22
0
        private void OnWorkflowUnloaded(WorkflowApplicationEventArgs args)
        {

        }
コード例 #23
0
ファイル: InterfacesForOut.cs プロジェクト: uunniie/ctnew
        private static void InstanceAborted(WorkflowApplicationEventArgs e)
        {
            try
            {
                var ss = e.InstanceId;
            }
            catch
            {

            }
        }
コード例 #24
0
ファイル: HttpHandler.cs プロジェクト: wasabii/twilio-net
 void OnUnloaded(WorkflowApplicationEventArgs args)
 {
 }
コード例 #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);
 }
コード例 #26
0
 private void unload(WorkflowApplicationEventArgs e)
 {
 }
コード例 #27
0
 void OnUnloaded(WorkflowApplicationEventArgs e)
 {
     this.isLoaded = false;
 }
コード例 #28
0
		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;
			}
		}
コード例 #29
0
 private static void OnUnloaded(WorkflowApplicationEventArgs obj)
 {
     synEvent.Set();
     Console.WriteLine("Unload the workflow.");
 }
コード例 #30
0
        private void wfapp_WorkflowUnloaded(WorkflowApplicationEventArgs e)
        {
            WorkflowDetails workflow;
            lock (syncRoot)
            {
                workflow = workflows[e.InstanceId];
            }

            FinishWorkflow(e.InstanceId);
        }
 private void OnWorkflowUnloaded(WorkflowApplicationEventArgs args)
 {
 }
コード例 #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));
 }
コード例 #33
0
ファイル: Program.cs プロジェクト: eeroom/Azeroth.Core
 private static void UnloadedHandler(WorkflowApplicationEventArgs obj)
 {
     Console.WriteLine("UnloadedHandler");
 }
コード例 #34
0
ファイル: WorkflowInstance.cs プロジェクト: 40a/PowerShell
        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);
        }
コード例 #35
0
 Task IActivityActorInternal.OnUnloadedAsync(WorkflowApplicationEventArgs args)
 {
     return(OnUnloadedAsync(args));
 }
コード例 #36
0
 public virtual void Unloaded(WorkflowApplicationEventArgs e)
 {
     Console.WriteLine("工作流 {0} 卸载.", e.InstanceId);
 }
コード例 #37
0
 public void OnUnloaded(WorkflowApplicationEventArgs e)
 {
 }
コード例 #38
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);
        }
コード例 #39
0
ファイル: Parameters.cs プロジェクト: skyquery/graywulf
 private void wfapp_WorkflowUnloaded(WorkflowApplicationEventArgs e)
 {
     workflowCompletedEvent.Set();
 }
コード例 #40
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);
        }
コード例 #41
0
        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;
        }
コード例 #43
0
 static void unloaded(WorkflowApplicationEventArgs e)
 {
     writeRunInfo(e.InstanceId, "unloaded", "");
 }
コード例 #44
0
 void OnUnloaded(WorkflowApplicationEventArgs args)
 {
 }