private void handleExpressionExtended_Invoked(object sender, ExternalDataEventArgs e) { MathServiceEventArgs mathServiceEventArgs = e as MathServiceEventArgs; switch (mathServiceEventArgs.Opcode) { case "+": answer += mathServiceEventArgs.Operand; break; case "-": answer -= mathServiceEventArgs.Operand; break; case "*": answer *= mathServiceEventArgs.Operand; break; case "/": answer /= mathServiceEventArgs.Operand; break; default: throw new InvalidOperationException("unexpected Opcode"); } bool firstItem = expression.Length == 0; expression = (firstItem ? "" : "(" + expression + mathServiceEventArgs.Opcode + " ") + mathServiceEventArgs.Operand.ToString() + (firstItem ? " " : ") "); }
private void OnAddInvestigationDetails_Invoked(object sender, ExternalDataEventArgs e) { string curUser = Thread.CurrentPrincipal.Identity.Name; AddInvestigationDetailsEventArgs args = (AddInvestigationDetailsEventArgs)e; IgrssAdapters.InvestigationAdapter.AddInvestigationDetail(Guid.NewGuid(), ComplainId, args.InvestigationDate, args.InvestigationDetails, curUser, DateTime.Now); }
private void onTaskChanged(object sender, ExternalDataEventArgs e) { if (afterProperties.ExtendedProperties.ContainsValue("Completed")) { taskCompleted = true; } }
public void OnGoForward(ExternalDataEventArgs args) { if (GoForward != null) { GoForward(null, args); } }
public void OnGoReverse(ExternalDataEventArgs args) { if (GoReverse != null) { GoReverse(null, args); } }
/// <summary> /// Raise the StopReceived event /// </summary> /// <param name="args"></param> public void OnStopReceived(ExternalDataEventArgs args) { if (StopReceived != null) { StopReceived(null, args); } }
/// <summary> /// Raise the ContinueReceived event /// </summary> /// <param name="args"></param> public void OnContinueReceived(ExternalDataEventArgs args) { if (ContinueReceived != null) { ContinueReceived(null, args); } }
private void OnComplainAccepted_Invoked(object sender, ExternalDataEventArgs e) { ComplainAcceptedEventArgs args = (ComplainAcceptedEventArgs)e; ComplainDetailsRow row = (ComplainDetailsRow)args.UpdatedRows.Rows[0]; IgrssAdapters.ComplainAdapter.UpdateComplainDetails(row.ComplaintType, row.AgainstEmpID, row.ComplainingEmpID, row.ComplainantName, row.ComplainantAddress, row.ComplaintDate, row.ReceivingOfficeId, row.Subject, row.Detail, row.ComplainId, row.ComplaintNo); }
public ADVIA1650() { try { _clsORecord = new ADVIA1650OrderRecord(); _clsQRecord = new ADVIA1650QueryRecord(); _clsRRecord = new ADVIA1650ResultRecord(); PrvRequestArray = new List <string>(); var objService = new ExternalDataExchangeService(); InstanceId = Guid.NewGuid(); objWorkFlowRuntime.AddService(objService); objASTM = new ClsAstm(); objService.AddService(objASTM); objASTM.SendACKEvent += objASTM_SendACKEvent; objASTM.SendNAKEvent += objASTM_SendNAKEvent; objASTM.SendENQEvent += objASTM_SendENQEvent; objASTM.SendEOTEvent += objASTM_SendEOTEvent; objWorkFlowInstance = objWorkFlowRuntime.CreateWorkflow(typeof(ASTMWorkflow), null, InstanceId); objWorkFlowInstance.Start(); Console.WriteLine("Work flow started"); objDataEventArgs = new ExternalDataEventArgs(InstanceId); objDataEventArgs.WaitForIdle = true; //DumpStateMachine(objWorkFlowRuntime, InstanceId); } catch (Exception ex) { throw ex; } }
public void OnStopEngine(ExternalDataEventArgs args) { if (StopEngine != null) { StopEngine(null, args); } }
public void OnLeaveCar(ExternalDataEventArgs args) { if (LeaveCar != null) { LeaveCar(null, args); } }
public VersaCell() { try { _clsHRecord = new VersaCellHeaderRecord(); _clsPRecord = new VersaCellPatientRecord(); _clsORecord = new VersaCellOrderRecord(); _clsQRecord = new VersaCellQueryRecord(); _clsRRecord = new VersaCellResultRecord(); _clsTRecord = new VersaCellTerminationRecord(); PrvRequestArray = new Queue <List <string> >(); objService = new ExternalDataExchangeService(); InstanceId = Guid.NewGuid(); objWorkFlowRuntime.AddService(objService); objASTM = new clsASTM(); objService.AddService(objASTM); objASTM.SendACKEvent += objASTM_SendACKEvent; objASTM.SendNAKEvent += objASTM_SendNAKEvent; objASTM.SendENQEvent += objASTM_SendENQEvent; objASTM.SendEOTEvent += objASTM_SendEOTEvent; objWorkFlowInstance = objWorkFlowRuntime.CreateWorkflow(typeof(ASTMWorkflow), null, InstanceId); objWorkFlowInstance.Start(); Console.WriteLine(@"Work flow started"); objDataEventArgs = new ExternalDataEventArgs(InstanceId); objDataEventArgs.WaitForIdle = true; DumpStateMachine(objWorkFlowRuntime, InstanceId); } catch (Exception ex) { Log.FatalException("Fatal Error: ", ex); } }
public void OnBeepHorn(ExternalDataEventArgs args) { if (BeepHorn != null) { BeepHorn(null, args); } }
private void onWorkflowActivated1_Invoked(object sender, ExternalDataEventArgs e) { Debug.WriteLine("admProcessRequestsWF:{" + workflowProperties.WorkflowId + "} initiated"); item = workflowProperties.Item; startTime = DateTime.Now; }
public TcpIpASTMManager() { try { _prvRequestArray = new Queue <List <string> >(); _currentOrder = new List <string>(); _failSending = 0; _timeoutManager = new Timer(60000); _timeoutManager.Elapsed += _timeoutManager_Elapsed; objService = new ExternalDataExchangeService(); InstanceId = Guid.NewGuid(); objWorkFlowRuntime.AddService(objService); objASTM = new ClsAstm(); objService.AddService(objASTM); objASTM.SendACKEvent += objASTM_SendACKEvent; objASTM.SendNAKEvent += objASTM_SendNAKEvent; objASTM.SendENQEvent += objASTM_SendENQEvent; objASTM.SendEOTEvent += objASTM_SendEOTEvent; //objASTM.ACKTimeoutEvent += new EventHandler(objASTM_ACKTimeoutEvent); objWorkFlowInstance = objWorkFlowRuntime.CreateWorkflow(typeof(ASTMWorkflow), null, InstanceId); objWorkFlowInstance.Start(); Console.WriteLine(string.Format(@"Work flow started")); objDataEventArgs = new ExternalDataEventArgs(InstanceId) { WaitForIdle = true }; DumpStateMachine(objWorkFlowRuntime, InstanceId); } catch (Exception ex) { Log.Error(string.Format("Error: {0}", ex)); } }
private void paidEventInvoked(object sender, ExternalDataEventArgs e) { var workflowEventArgs = e as WorkflowEventArgsWithInitiator; if (workflowEventArgs == null) { return; } TransitionInitiator = workflowEventArgs.InitiatorId; ImpersonatedIdentityId = workflowEventArgs.ImpersonatedIdentityId; LastCommand = WorkflowCommand.SetPaid; var paidCommandEventArgs = e as PaidCommandEventArgs; if (paidCommandEventArgs == null) { return; } var externalState = new BillDemandExternalState() { DocumentNumber = paidCommandEventArgs.DocumentNumber, PaymentDate = paidCommandEventArgs.PaymentDate.HasValue ? paidCommandEventArgs.PaymentDate.Value : DateTime.Now }; Budget2WorkflowRuntime.BillDemandBuinessService.SetExternalParameters(WorkflowInstanceId, externalState); }
public void DeliverMessage(ExternalDataEventArgs eventArgs, IComparable queueName, object message, object workItem, IPendingWork workHandler) { if (eventArgs == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("eventArgs"); } if (queueName == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("queueName"); } using (ExternalDataExchangeClient desClient = new ExternalDataExchangeClient(WorkflowRuntimeEndpoint.netNamedPipeContextBinding, new EndpointAddress(this.baseUri))) { using (OperationContextScope scope = new OperationContextScope((IContextChannel)desClient.InnerChannel)) { IContextManager contextManager = desClient.InnerChannel.GetProperty <IContextManager>(); Fx.Assert(contextManager != null, "IContextManager must not be null."); if (contextManager != null) { IDictionary <string, string> context = new Dictionary <string, string>(); context["instanceId"] = eventArgs.InstanceId.ToString(); contextManager.SetContext(context); } desClient.RaiseEvent(eventArgs, queueName, message); } } }
private void OnApplicationUpdated_Invoked(object sender, ExternalDataEventArgs e) { FeedbackData CurFeedback = VerificationList[verificationIndex]; WorkflowSupport.DeleteAlerts(CurFeedback.Alerts.ToArray()); this.verificationIndex = 0; }
public void OnStopMovement(ExternalDataEventArgs args) { if (StopMovement != null) { StopMovement(null, args); } }
private void HandleRejectEvent_Invoked(object sender, ExternalDataEventArgs e) { RejectEventArgs statusArgs = e as RejectEventArgs; ObjectId = statusArgs.ObjectId; Upn = statusArgs.Identity; Comment = statusArgs.RejectReason; }
private ExternalDataEventArgs GetEventArgs() { ExternalDataEventArgs args = new ExternalDataEventArgs(_instanceId); args.WaitForIdle = true; return(args); }
private void onWorkflowActivated1_Invoked(object sender, ExternalDataEventArgs e) { intZgloszenieID = Convert.ToInt32(workflowProperties.Item["Zgłoszenie.ID"]); Load_cNagrody(); Clear_ContentEntries(); }
private void onWorkflowActivated1_Invoked(object sender, ExternalDataEventArgs e) { Debug.WriteLine("ZatwierdzenieZadaniaWF:{" + workflowProperties.WorkflowId + "} initiated"); item = workflowProperties.Item; Debug.WriteLine("Workflow created:" + workflowProperties.Workflow.Created.ToString()); startTime = DateTime.Now; }
private void handleEventStop_Invoked( object sender, ExternalDataEventArgs e) { Console.WriteLine("Got EventStop"); //set the variable that will tell the WhileActivity to stop _isComplete = true; }
protected ExternalDataEventArgs GetDefaultArgs(Guid instanceId) { var args = new ExternalDataEventArgs(instanceId) { WaitForIdle = true }; return(args); }
private void HandleApproveEvent_Invoked(object sender, ExternalDataEventArgs e) { ApproveEventArgs statusArgs = e as ApproveEventArgs; ObjectId = statusArgs.ObjectId; Upn = statusArgs.Identity; Comment = statusArgs.Comment; _pass = true; }
private void onTaskChanged1_Invoked(object sender, ExternalDataEventArgs e) { //Checking the task properties after the change. //Looking for 1.0 to reflect a completed task. if (afterProperties.PercentComplete == 1.0) { taskCompleted = true; } }
private void handleExternalEventActivity2_Invoked( object sender, ExternalDataEventArgs e) { if (e is CorrelationExampleEventArgs) { Console.WriteLine("Received data for branch 2: {0}", ((CorrelationExampleEventArgs)e).EventData); } }
public void OnValuationRequest() { ExternalDataEventArgs e = new ExternalDataEventArgs(IgrssCommon.lastWf); if (RequestValuation != null) { RequestValuation(this, e); } }
private void onTaskChanged1_Invoked(object sender, ExternalDataEventArgs e) { //更改后检查任务属性。 //查找 1.0 以反映已完成的任务。 if (afterProperties.PercentComplete == 1.0) { taskCompleted = true; } }