private void OnUnloaded(WorkflowApplicationEventArgs args) { if (_waitHandle != null) { _waitHandle.Set(); } }
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(); }
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); } }
private void wfapp_WorkflowAborted(WorkflowApplicationEventArgs e) { WorkflowDetails workflow; lock (syncRoot) { workflow = workflows[e.InstanceId]; } FinishWorkflow(e.InstanceId); }
private void Unloaded(WorkflowApplicationEventArgs a) { var h = WorkflowUnloaded; if (h != null) { h(this, a); } RemoveActivityInstance(a.InstanceId); }
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); }
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); }
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 } }); }
static void unloaded(WorkflowApplicationEventArgs e) { writeRunInfo(e.InstanceId, "unloaded", ""); }
private void OnUnloaded(WorkflowApplicationEventArgs args) { if(_waitHandle != null) { _waitHandle.Set(); } }
/// <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; }
void WorkerManagerUnloaded(WorkflowApplicationEventArgs e) { //ExtensionMethods.TraceInformation("WorkerManager '{0}' unloaded.", e.InstanceId); //Trace.Flush(); }
private void UnloadedEvent(WorkflowApplicationEventArgs args) { _reloadWaitHandler.Set(); _log.Debug("Unloaded InstanceId=" + args.InstanceId.ToString()); }
private void OnWorkflowIdle(WorkflowApplicationEventArgs args) { }
private static void Unloaded(WorkflowApplicationEventArgs obj) { _instanceId = obj.InstanceId; Console.WriteLine("Unloaded, InstanceId=" + _instanceId); _wait.Set(); }
private static void OnUnloaded(WorkflowApplicationEventArgs workflowApplicationEventArgs) { // UNDONE: (maj) consider moving this to the workflow, itself, not this event, in a custom activity IoHelper.ArchivePersistenceFolder(); }
private void wfapp_WorkflowAborted(WorkflowApplicationEventArgs e) { workflowCompletedEvent.Set(); }
private void OnWorkflowUnloaded(WorkflowApplicationEventArgs args) { }
private static void InstanceAborted(WorkflowApplicationEventArgs e) { try { var ss = e.InstanceId; } catch { } }
void OnUnloaded(WorkflowApplicationEventArgs args) { }
/// <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); }
private void unload(WorkflowApplicationEventArgs e) { }
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; } }
private static void OnUnloaded(WorkflowApplicationEventArgs obj) { synEvent.Set(); Console.WriteLine("Unload the workflow."); }
private void wfapp_WorkflowUnloaded(WorkflowApplicationEventArgs e) { WorkflowDetails workflow; lock (syncRoot) { workflow = workflows[e.InstanceId]; } FinishWorkflow(e.InstanceId); }
/// <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)); }
private static void UnloadedHandler(WorkflowApplicationEventArgs obj) { Console.WriteLine("UnloadedHandler"); }
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); }
Task IActivityActorInternal.OnUnloadedAsync(WorkflowApplicationEventArgs args) { return(OnUnloadedAsync(args)); }
public virtual void Unloaded(WorkflowApplicationEventArgs e) { Console.WriteLine("工作流 {0} 卸载.", e.InstanceId); }
public void OnUnloaded(WorkflowApplicationEventArgs e) { }
private void wfapp_WorkflowUnloaded(WorkflowApplicationEventArgs e) { workflowCompletedEvent.Set(); }
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); } }