public WorkFlowIfElse () { IfElseActivity ifelse_activity = new IfElseActivity (); IfElseBranchActivity branch1 = new IfElseBranchActivity (); CodeCondition ifelse_condition1 = new CodeCondition (); DelayActivity delay_activity = new DelayActivity (); CodeActivity code_branch1 = new CodeActivity (); CodeActivity code_branch2 = new CodeActivity (); branch2 = new IfElseBranchActivity (); delay_activity.Name = "DelayActivity"; delay_activity.TimeoutDuration = TimeSpan.Parse ("00:00:05"); delay_activity.InitializeTimeoutDuration += new EventHandler (DelayActivity_InitializeTimeoutDuration); code_branch1.Name ="Code1"; code_branch2.Name ="Code2"; code_branch1.ExecuteCode += new EventHandler (ExecuteCode1); code_branch2.ExecuteCode += new EventHandler (ExecuteCode2); branch1.Activities.Add (code_branch1); branch2.Activities.Add (code_branch2); ifelse_condition1.Condition += new EventHandler <ConditionalEventArgs> (IfElseCondition1); branch1.Condition = ifelse_condition1; ifelse_activity.Activities.Add (branch1); ifelse_activity.Activities.Add (branch2); Activities.Add (delay_activity); Activities.Add (ifelse_activity); }
private void InitializeComponent() { this.CanModifyActivities = true; this.code1 = new System.Workflow.Activities.CodeActivity(); this.delay1 = new System.Workflow.Activities.DelayActivity(); this.code2 = new System.Workflow.Activities.CodeActivity(); // // code1 // this.code1.Name = "code1"; this.code1.ExecuteCode += new System.EventHandler(this.OnCode1ExecuteCode); // // delay1 // this.delay1.Name = "delay1"; this.delay1.TimeoutDuration = System.TimeSpan.Parse("00:00:05"); // // code2 // this.code2.Name = "code2"; this.code2.ExecuteCode += new System.EventHandler(this.OnCode2ExecuteCode); // // DelayWorkflow // this.Activities.Add(this.code1); this.Activities.Add(this.delay1); this.Activities.Add(this.code2); this.Name = "PersistenceServicesWorkflow"; this.CanModifyActivities = false; }
public void InitTwice () { DelayActivity da = new DelayActivity (); CorrelationToken ct = new CorrelationToken (); List <CorrelationProperty> properties = new List <CorrelationProperty> (); ct.Initialize (da, properties); ct.Initialize (da, properties); }
public void Initialize () { DelayActivity da = new DelayActivity (); CorrelationToken ct = new CorrelationToken (); List <CorrelationProperty> properties = new List <CorrelationProperty> (); ct.Initialize (da, properties); Assert.AreEqual (true, ct.Initialized, "C3#1"); }
public override ValidationErrorCollection Validate(ValidationManager manager, object obj) { ValidationErrorCollection errors = new ValidationErrorCollection(); DelayActivity activity = obj as DelayActivity; if (activity == null) { throw new InvalidOperationException(); } if (activity.TimeoutDuration.Ticks < 0L) { errors.Add(new ValidationError(SR.GetString("Error_NegativeValue", new object[] { activity.TimeoutDuration.ToString(), "TimeoutDuration" }), 0x531)); } errors.AddRange(base.Validate(manager, obj)); return(errors); }
public SimpleWorkFlowDelay () { CanModifyActivities = true; CodeCondition codecondition1 = new CodeCondition (); BackUpFile = new CodeActivity (); WhileFilesToBackup = new WhileActivity (); DelaySystemReady = new DelayActivity (); BackUpFile.ExecuteCode += new EventHandler (BackUpFile_ExecuteCode); WhileFilesToBackup.Activities.Add(BackUpFile); codecondition1.Condition += new EventHandler <ConditionalEventArgs>(MoreFiles); WhileFilesToBackup.Condition = codecondition1; DelaySystemReady.TimeoutDuration = TimeSpan.Parse ("00:00:02"); Activities.Add (DelaySystemReady); Activities.Add (WhileFilesToBackup); Name = "SimpleWorkFlowDelay"; CanModifyActivities = false; }
private void InitializeComponent() { this.CanModifyActivities = true; this.delayActivity2 = new System.Workflow.Activities.DelayActivity(); this.codeActivity2 = new System.Workflow.Activities.CodeActivity(); this.delayActivity1 = new System.Workflow.Activities.DelayActivity(); this.codeActivity1 = new System.Workflow.Activities.CodeActivity(); // // delayActivity2 // this.delayActivity2.Name = "delayActivity2"; this.delayActivity2.TimeoutDuration = System.TimeSpan.Parse("00:00:05"); // // codeActivity2 // this.codeActivity2.Name = "codeActivity2"; this.codeActivity2.ExecuteCode += new System.EventHandler(this.codeActivity2_ExecuteCode); // // delayActivity1 // this.delayActivity1.Name = "delayActivity1"; this.delayActivity1.TimeoutDuration = System.TimeSpan.Parse("00:00:05"); // // codeActivity1 // this.codeActivity1.Name = "codeActivity1"; this.codeActivity1.ExecuteCode += new System.EventHandler(this.codeActivity1_ExecuteCode); // // Workflow1 // this.Activities.Add(this.codeActivity1); this.Activities.Add(this.delayActivity1); this.Activities.Add(this.codeActivity2); this.Activities.Add(this.delayActivity2); this.Name = "Workflow1"; this.CanModifyActivities = false; }
private void AddOrderOnHoldState() { // Get a reference to the WorkflowInstance for the selected workflow WorkflowInstance instance = this.runtime.GetWorkflow(this.GetSelectedWorkflowInstanceID()); // Get a reference to the root activity for the workflow Activity root = instance.GetWorkflowDefinition(); // Create a new instance of the WorkflowChanges class for managing // the in-memory changes to the workflow WorkflowChanges changes = new WorkflowChanges(root); // Create a new State activity to the workflow StateActivity orderOnHoldState = new StateActivity(); orderOnHoldState.Name = "OrderOnHoldState"; // Add a new EventDriven activity to the State EventDrivenActivity eventDrivenDelay = new EventDrivenActivity(); eventDrivenDelay.Name = "DelayOrderEvent"; orderOnHoldState.Activities.Add(eventDrivenDelay); // Add a new Delay, initialized to 5 seconds DelayActivity delayOrder = new DelayActivity(); delayOrder.Name = "delayOrder"; delayOrder.TimeoutDuration = new TimeSpan(0, 0, 5); eventDrivenDelay.Activities.Add(delayOrder); // Add a new SetState to the OrderOpenState SetStateActivity setStateOrderOpen = new SetStateActivity(); setStateOrderOpen.TargetStateName = "OrderOpenState"; eventDrivenDelay.Activities.Add(setStateOrderOpen); // Add the OnHoldState to the workflow changes.TransientWorkflow.Activities.Add(orderOnHoldState); // Apply the changes to the workflow instance try { instance.ApplyWorkflowChanges(changes); } catch (WorkflowValidationFailedException) { // New state has already been added MessageBox.Show("On Hold state has already been added to this workflow."); } }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.CanModifyActivities = true; System.Workflow.ComponentModel.ActivityBind activitybind2 = new System.Workflow.ComponentModel.ActivityBind(); System.Workflow.ComponentModel.ActivityBind activitybind3 = new System.Workflow.ComponentModel.ActivityBind(); System.Workflow.ComponentModel.ActivityBind activitybind1 = new System.Workflow.ComponentModel.ActivityBind(); System.Workflow.ComponentModel.ActivityBind activitybind6 = new System.Workflow.ComponentModel.ActivityBind(); System.Workflow.ComponentModel.ActivityBind activitybind4 = new System.Workflow.ComponentModel.ActivityBind(); System.Workflow.ComponentModel.ActivityBind activitybind5 = new System.Workflow.ComponentModel.ActivityBind(); this.MessageReceived = new System.Workflow.Activities.CodeActivity(); this.ReceiveMessage = new Winterdom.Workflow.Activities.Msmq.MsmqReceiveActivity(); this.DelayDone = new System.Workflow.Activities.CodeActivity(); this.ReceiveTimeout = new System.Workflow.Activities.DelayActivity(); this.SendMessage = new Winterdom.Workflow.Activities.Msmq.MsmqSendActivity(); this.eventDrivenActivity2 = new System.Workflow.Activities.EventDrivenActivity(); this.eventDrivenActivity1 = new System.Workflow.Activities.EventDrivenActivity(); this.MessageSent = new System.Workflow.Activities.CodeActivity(); this.SendScope = new System.Workflow.ComponentModel.TransactionScopeActivity(); this.DelaySend = new System.Workflow.Activities.DelayActivity(); this.ConfigureObject = new System.Workflow.Activities.CodeActivity(); this.listenActivity1 = new System.Workflow.Activities.ListenActivity(); this.sequenceActivity2 = new System.Workflow.Activities.SequenceActivity(); this.sequenceActivity1 = new System.Workflow.Activities.SequenceActivity(); this.parallelActivity1 = new System.Workflow.Activities.ParallelActivity(); // // MessageReceived // this.MessageReceived.Name = "MessageReceived"; this.MessageReceived.ExecuteCode += new System.EventHandler(this.MessageReceived_ExecuteCode); activitybind2.Name = "SampleWorkflow1"; activitybind2.Path = "QUEUE"; activitybind3.Name = "SampleWorkflow1"; activitybind3.Path = "_customerReceived"; // // ReceiveMessage // activitybind1.Name = "SampleWorkflow1"; activitybind1.Path = "_labelReceived"; this.ReceiveMessage.MessageType = typeof(TestApp.Customer); this.ReceiveMessage.Name = "ReceiveMessage"; this.ReceiveMessage.SetBinding(Winterdom.Workflow.Activities.Msmq.MsmqReceiveActivity.QueueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind2))); this.ReceiveMessage.SetBinding(Winterdom.Workflow.Activities.Msmq.MsmqReceiveActivity.MessageReceivedProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind3))); this.ReceiveMessage.SetBinding(Winterdom.Workflow.Activities.Msmq.MsmqReceiveActivity.LabelProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind1))); // // DelayDone // this.DelayDone.Name = "DelayDone"; this.DelayDone.ExecuteCode += new System.EventHandler(this.DelayDone_ExecuteCode); // // ReceiveTimeout // this.ReceiveTimeout.Name = "ReceiveTimeout"; this.ReceiveTimeout.TimeoutDuration = System.TimeSpan.Parse("00:00:10"); activitybind6.Name = "SampleWorkflow1"; activitybind6.Path = "QUEUE"; // // SendMessage // this.SendMessage.IsTransactionalQueue = true; activitybind4.Name = "SampleWorkflow1"; activitybind4.Path = "_labelToSend"; activitybind5.Name = "SampleWorkflow1"; activitybind5.Path = "_customerToSend"; this.SendMessage.Name = "SendMessage"; this.SendMessage.SetBinding(Winterdom.Workflow.Activities.Msmq.MsmqSendActivity.MessageToSendProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind5))); this.SendMessage.SetBinding(Winterdom.Workflow.Activities.Msmq.MsmqSendActivity.QueueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind6))); this.SendMessage.SetBinding(Winterdom.Workflow.Activities.Msmq.MsmqSendActivity.LabelProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind4))); // // eventDrivenActivity2 // this.eventDrivenActivity2.Activities.Add(this.ReceiveMessage); this.eventDrivenActivity2.Activities.Add(this.MessageReceived); this.eventDrivenActivity2.Name = "eventDrivenActivity2"; // // eventDrivenActivity1 // this.eventDrivenActivity1.Activities.Add(this.ReceiveTimeout); this.eventDrivenActivity1.Activities.Add(this.DelayDone); this.eventDrivenActivity1.Name = "eventDrivenActivity1"; // // MessageSent // this.MessageSent.Name = "MessageSent"; this.MessageSent.ExecuteCode += new System.EventHandler(this.MessageSent_ExecuteCode); // // SendScope // this.SendScope.Activities.Add(this.SendMessage); this.SendScope.Name = "SendScope"; this.SendScope.TransactionOptions.IsolationLevel = System.Transactions.IsolationLevel.Serializable; // // DelaySend // this.DelaySend.Name = "DelaySend"; this.DelaySend.TimeoutDuration = System.TimeSpan.Parse("00:00:00"); // // ConfigureObject // this.ConfigureObject.Name = "ConfigureObject"; this.ConfigureObject.ExecuteCode += new System.EventHandler(this.ConfigureObject_ExecuteCode); // // listenActivity1 // this.listenActivity1.Activities.Add(this.eventDrivenActivity1); this.listenActivity1.Activities.Add(this.eventDrivenActivity2); this.listenActivity1.Name = "listenActivity1"; // // sequenceActivity2 // this.sequenceActivity2.Activities.Add(this.ConfigureObject); this.sequenceActivity2.Activities.Add(this.DelaySend); this.sequenceActivity2.Activities.Add(this.SendScope); this.sequenceActivity2.Activities.Add(this.MessageSent); this.sequenceActivity2.Name = "sequenceActivity2"; // // sequenceActivity1 // this.sequenceActivity1.Activities.Add(this.listenActivity1); this.sequenceActivity1.Name = "sequenceActivity1"; // // parallelActivity1 // this.parallelActivity1.Activities.Add(this.sequenceActivity1); this.parallelActivity1.Activities.Add(this.sequenceActivity2); this.parallelActivity1.Name = "parallelActivity1"; // // SampleWorkflow1 // this.Activities.Add(this.parallelActivity1); this.Name = "SampleWorkflow1"; this.CanModifyActivities = false; }
private void InitializeComponent () { CanModifyActivities = true; CodeCondition codecondition1 = new CodeCondition (); ProofReadSetStateQualityNotOK = new SetStateActivity (); ProofReadSetStateQualityOK = new SetStateActivity (); ProofReadElseBranchActivity2 = new IfElseBranchActivity (); ProofReadElseBranch = new IfElseBranchActivity (); PrintFinalizationCode = new CodeActivity (); PrintSetState = new SetStateActivity (); PrintCode = new CodeActivity (); PrintDelay = new DelayActivity (); ProofReadIfElse = new IfElseActivity (); ProofReadDelay = new DelayActivity (); CreateInitCode = new CodeActivity (); DocumentSetState = new SetStateActivity (); CodeDocument = new CodeActivity (); CreateDelay = new DelayActivity (); PrintFinalization = new StateFinalizationActivity (); PrintEventDriven = new EventDrivenActivity (); ProofReadEventDriven = new EventDrivenActivity (); CreateInitialization = new StateInitializationActivity (); CreateDriven = new EventDrivenActivity (); End = new StateActivity (); Print = new StateActivity (); ProofRead = new StateActivity (); Create = new StateActivity (); // ProofReadSetStateQualityNotOK ProofReadSetStateQualityNotOK.Name = "ProofReadSetStateQualityNotOK"; ProofReadSetStateQualityNotOK.TargetStateName = "Print"; // ProofReadSetStateQualityOK ProofReadSetStateQualityOK.Name = "ProofReadSetStateQualityOK"; ProofReadSetStateQualityOK.TargetStateName = "End"; // ProofReadElseBranchActivity2 ProofReadElseBranchActivity2.Activities.Add (ProofReadSetStateQualityNotOK); ProofReadElseBranchActivity2.Name = "ProofReadElseBranchActivity2"; // ProofReadElseBranch ProofReadElseBranch.Activities.Add (ProofReadSetStateQualityOK); codecondition1.Condition += new EventHandler <ConditionalEventArgs> (ProofReadIfElseConditionFunction); ProofReadElseBranch.Condition = codecondition1; ProofReadElseBranch.Name = "ProofReadElseBranch"; // PrintFinalizationCode PrintFinalizationCode.Name = "PrintFinalizationCode"; PrintFinalizationCode.ExecuteCode += new EventHandler (PrintFinalizationCodeFunction); // PrintSetState PrintSetState.Name = "PrintSetState"; PrintSetState.TargetStateName = "End"; // PrintCode PrintCode.Name = "PrintCode"; PrintCode.ExecuteCode += new EventHandler (PrintCodeFunction); // PrintDelay PrintDelay.Name = "PrintDelay"; PrintDelay.TimeoutDuration = TimeSpan.Parse ("00:00:02"); // ProofReadIfElse ProofReadIfElse.Activities.Add (ProofReadElseBranch); ProofReadIfElse.Activities.Add (ProofReadElseBranchActivity2); ProofReadIfElse.Description = "Quality is OK?"; ProofReadIfElse.Name = "ProofReadIfElse"; // ProofReadDelay ProofReadDelay.Name = "ProofReadDelay"; ProofReadDelay.TimeoutDuration = TimeSpan.Parse ("00:00:01"); // CreateInitCode CreateInitCode.Name = "CreateInitCode"; CreateInitCode.ExecuteCode += new EventHandler (CreateInitCodeFunction); // DocumentSetState DocumentSetState.Name = "DocumentSetState"; DocumentSetState.TargetStateName = "ProofRead"; // CodeDocument CodeDocument.Name = "CodeDocument"; CodeDocument.ExecuteCode += new EventHandler (CodeDocumentFunction); // CreateDelay CreateDelay.Name = "CreateDelay"; CreateDelay.TimeoutDuration = TimeSpan.Parse ("00:00:01"); // PrintFinalization PrintFinalization.Activities.Add (PrintFinalizationCode); PrintFinalization.Name = "PrintFinalization"; // PrintEventDriven PrintEventDriven.Activities.Add (PrintDelay); PrintEventDriven.Activities.Add (PrintCode); PrintEventDriven.Activities.Add (PrintSetState); PrintEventDriven.Name = "PrintEventDriven"; // ProofReadEventDriven ProofReadEventDriven.Activities.Add (ProofReadDelay); ProofReadEventDriven.Activities.Add (ProofReadIfElse); ProofReadEventDriven.Name = "ProofReadEventDriven"; // CreateInitialization CreateInitialization.Activities.Add (CreateInitCode); CreateInitialization.Name = "CreateInitialization"; // CreateDriven CreateDriven.Activities.Add (CreateDelay); CreateDriven.Activities.Add (CodeDocument); CreateDriven.Activities.Add (DocumentSetState); CreateDriven.Name = "CreateDriven"; // End End.Name = "End"; // Print Print.Activities.Add (PrintEventDriven); Print.Activities.Add (PrintFinalization); Print.Name = "Print"; // ProofRead ProofRead.Activities.Add (ProofReadEventDriven); ProofRead.Name = "ProofRead"; // Create Create.Activities.Add (CreateDriven); Create.Activities.Add (CreateInitialization); Create.Name = "Create"; // DocumentCreation Activities.Add (Create); Activities.Add (ProofRead); Activities.Add (Print); Activities.Add (End); CompletedStateName = "End"; InitialStateName = "Create"; Name = "DocumentCreation"; CanModifyActivities = false; }
private void InitializeComponent() { this.CanModifyActivities = true; this.setStateActivity1 = new System.Workflow.Activities.SetStateActivity(); this.delayActivity1 = new System.Workflow.Activities.DelayActivity(); this.eventDrivenActivity1 = new System.Workflow.Activities.EventDrivenActivity(); this.stateActivity1 = new System.Workflow.Activities.StateActivity(); this.stateActivity2 = new System.Workflow.Activities.StateActivity(); // // setStateActivity1 // this.setStateActivity1.Name = "setStateActivity1"; this.setStateActivity1.TargetStateName = "stateActivity1"; // // delayActivity1 // this.delayActivity1.Name = "delayActivity1"; this.delayActivity1.TimeoutDuration = System.TimeSpan.Parse("00:01:00"); // // eventDrivenActivity1 // this.eventDrivenActivity1.Activities.Add(this.delayActivity1); this.eventDrivenActivity1.Activities.Add(this.setStateActivity1); this.eventDrivenActivity1.Name = "eventDrivenActivity1"; // // stateActivity1 // this.stateActivity1.Name = "stateActivity1"; // // _initial // this.stateActivity2.Activities.Add(this.eventDrivenActivity1); this.stateActivity2.Name = "stateActivity2"; // // PressFlow // this.Activities.Add(this.stateActivity2); this.Activities.Add(this.stateActivity1); this.CompletedStateName = "stateActivity1"; this.DynamicUpdateCondition = null; this.InitialStateName = "stateActivity2"; this.Name = "PressFlow"; this.CanModifyActivities = false; }
private void InitializeComponent() { this.CanModifyActivities = true; System.Workflow.ComponentModel.ActivityBind activitybind1 = new System.Workflow.ComponentModel.ActivityBind(); System.Workflow.ComponentModel.ActivityBind activitybind2 = new System.Workflow.ComponentModel.ActivityBind(); System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding1 = new System.Workflow.ComponentModel.WorkflowParameterBinding(); System.Workflow.Activities.CodeCondition codecondition1 = new System.Workflow.Activities.CodeCondition(); this.NotAuthorizedC2 = new System.Workflow.Activities.CodeActivity(); this.NotAuthorizedC1 = new System.Workflow.Activities.CodeActivity(); this.NotAuthorized2 = new System.Workflow.ComponentModel.FaultHandlerActivity(); this.NotAuthorized1 = new System.Workflow.ComponentModel.FaultHandlerActivity(); this.ExpireAuthorization = new System.Workflow.Activities.CodeActivity(); this.AutorizationTimer = new System.Workflow.Activities.DelayActivity(); this.cancellationHandlerActivity3 = new System.Workflow.ComponentModel.CancellationHandlerActivity(); this.AuthorizationFailed = new System.Workflow.ComponentModel.FaultHandlersActivity(); this.Rejected = new System.Workflow.Activities.HandleExternalEventActivity(); this.AutorizationFailed = new System.Workflow.ComponentModel.FaultHandlersActivity(); this.cancellationHandlerActivity2 = new System.Workflow.ComponentModel.CancellationHandlerActivity(); this.Authorized = new System.Workflow.Activities.HandleExternalEventActivity(); this.AuthorizationExpired = new System.Workflow.Activities.EventDrivenActivity(); this.AuthorizationRejected = new System.Workflow.Activities.EventDrivenActivity(); this.AuthorizationAccepted = new System.Workflow.Activities.EventDrivenActivity(); this.WaitForResponse = new System.Workflow.Activities.ListenActivity(); this.Warrant = new System.Workflow.Activities.WhileActivity(); this.NotifyRequest = new CodeFactory.Workflow.SendEmailActivity(); this.AuthorizationRequested = new System.Workflow.Activities.SequenceActivity(); // // NotAuthorizedC2 // this.NotAuthorizedC2.Name = "NotAuthorizedC2"; this.NotAuthorizedC2.ExecuteCode += new System.EventHandler(this.HandleAuthorizationException); // // NotAuthorizedC1 // this.NotAuthorizedC1.Name = "NotAuthorizedC1"; this.NotAuthorizedC1.ExecuteCode += new System.EventHandler(this.HandleAuthorizationException); // // NotAuthorized2 // this.NotAuthorized2.Activities.Add(this.NotAuthorizedC2); this.NotAuthorized2.FaultType = typeof(System.Workflow.Activities.WorkflowAuthorizationException); this.NotAuthorized2.Name = "NotAuthorized2"; // // NotAuthorized1 // this.NotAuthorized1.Activities.Add(this.NotAuthorizedC1); this.NotAuthorized1.FaultType = typeof(System.Workflow.Activities.WorkflowAuthorizationException); this.NotAuthorized1.Name = "NotAuthorized1"; // // ExpireAuthorization // this.ExpireAuthorization.Name = "ExpireAuthorization"; this.ExpireAuthorization.ExecuteCode += new System.EventHandler(this.ExpireAuthorization_ExecuteCode); // // AutorizationTimer // this.AutorizationTimer.Name = "AutorizationTimer"; this.AutorizationTimer.TimeoutDuration = System.TimeSpan.Parse("00:00:00"); this.AutorizationTimer.InitializeTimeoutDuration += new System.EventHandler(this.AuthorizationTimer_Initialize); // // cancellationHandlerActivity3 // this.cancellationHandlerActivity3.Name = "cancellationHandlerActivity3"; // // AuthorizationFailed // this.AuthorizationFailed.Activities.Add(this.NotAuthorized2); this.AuthorizationFailed.Name = "AuthorizationFailed"; activitybind1.Name = "AuthorizeEntries"; activitybind1.Path = "Authorizers"; // // Rejected // this.Rejected.EventName = "AuthorizationRejected"; this.Rejected.InterfaceType = typeof(CodeFactory.Wiki.Workflow.IWikiServiceProvider); this.Rejected.Name = "Rejected"; this.Rejected.Invoked += new System.EventHandler<System.Workflow.Activities.ExternalDataEventArgs>(this.Rejected_Invoked); this.Rejected.SetBinding(System.Workflow.Activities.HandleExternalEventActivity.RolesProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind1))); // // AutorizationFailed // this.AutorizationFailed.Activities.Add(this.NotAuthorized1); this.AutorizationFailed.Name = "AutorizationFailed"; // // cancellationHandlerActivity2 // this.cancellationHandlerActivity2.Name = "cancellationHandlerActivity2"; activitybind2.Name = "AuthorizeEntries"; activitybind2.Path = "Authorizers"; // // Authorized // this.Authorized.EventName = "AuthorizationAccepted"; this.Authorized.InterfaceType = typeof(CodeFactory.Wiki.Workflow.IWikiServiceProvider); this.Authorized.Name = "Authorized"; workflowparameterbinding1.ParameterName = "e"; this.Authorized.ParameterBindings.Add(workflowparameterbinding1); this.Authorized.Invoked += new System.EventHandler<System.Workflow.Activities.ExternalDataEventArgs>(this.Authorized_Invoked); this.Authorized.SetBinding(System.Workflow.Activities.HandleExternalEventActivity.RolesProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind2))); // // AuthorizationExpired // this.AuthorizationExpired.Activities.Add(this.AutorizationTimer); this.AuthorizationExpired.Activities.Add(this.ExpireAuthorization); this.AuthorizationExpired.Name = "AuthorizationExpired"; // // AuthorizationRejected // this.AuthorizationRejected.Activities.Add(this.Rejected); this.AuthorizationRejected.Activities.Add(this.AuthorizationFailed); this.AuthorizationRejected.Activities.Add(this.cancellationHandlerActivity3); this.AuthorizationRejected.Name = "AuthorizationRejected"; // // AuthorizationAccepted // this.AuthorizationAccepted.Activities.Add(this.Authorized); this.AuthorizationAccepted.Activities.Add(this.cancellationHandlerActivity2); this.AuthorizationAccepted.Activities.Add(this.AutorizationFailed); this.AuthorizationAccepted.Name = "AuthorizationAccepted"; // // WaitForResponse // this.WaitForResponse.Activities.Add(this.AuthorizationAccepted); this.WaitForResponse.Activities.Add(this.AuthorizationRejected); this.WaitForResponse.Activities.Add(this.AuthorizationExpired); this.WaitForResponse.Name = "WaitForResponse"; // // Warrant // this.Warrant.Activities.Add(this.WaitForResponse); codecondition1.Condition += new System.EventHandler<System.Workflow.Activities.ConditionalEventArgs>(this.EvaluateAuthorization); this.Warrant.Condition = codecondition1; this.Warrant.Name = "Warrant"; // // NotifyRequest // this.NotifyRequest.Bcc = null; this.NotifyRequest.Body = null; this.NotifyRequest.CC = null; this.NotifyRequest.Description = "Notifica al autorizador de la solicitud recibida."; this.NotifyRequest.From = "*****@*****.**"; this.NotifyRequest.Name = "NotifyRequest"; this.NotifyRequest.Port = 25; this.NotifyRequest.ReplyTo = null; this.NotifyRequest.SmtpHost = "localhost"; this.NotifyRequest.Subject = null; this.NotifyRequest.To = "*****@*****.**"; this.NotifyRequest.SendingEmail += new System.EventHandler(this.NotifyRequest_SendingEmail); // // AuthorizationRequested // this.AuthorizationRequested.Activities.Add(this.NotifyRequest); this.AuthorizationRequested.Activities.Add(this.Warrant); this.AuthorizationRequested.Name = "AuthorizationRequested"; // // AuthorizeEntries // this.Activities.Add(this.AuthorizationRequested); this.Name = "AuthorizeEntries"; this.Initialized += new System.EventHandler(this.InitializeProcessing); this.CanModifyActivities = false; }
private void InitializeComponent() { this.CanModifyActivities = true; this.setStateActivity2 = new System.Workflow.Activities.SetStateActivity(); this.delayActivity = new System.Workflow.Activities.DelayActivity(); this.refreshCodeActivity = new System.Workflow.Activities.CodeActivity(); this.setStateActivity1 = new System.Workflow.Activities.SetStateActivity(); this.delayBeforeStart = new System.Workflow.Activities.DelayActivity(); this.stateInitializationCodeActivity = new System.Workflow.Activities.CodeActivity(); this.timerEventDrivenActivity = new System.Workflow.Activities.EventDrivenActivity(); this.refreshStateInitializationActivity = new System.Workflow.Activities.StateInitializationActivity(); this.delayBeforeStartActivity = new System.Workflow.Activities.EventDrivenActivity(); this.stateInitializationActivity = new System.Workflow.Activities.StateInitializationActivity(); this.finishStateActivity = new System.Workflow.Activities.StateActivity(); this.refreshStateActivity = new System.Workflow.Activities.StateActivity(); this.refreshInitialState = new System.Workflow.Activities.StateActivity(); // // setStateActivity2 // this.setStateActivity2.Name = "setStateActivity2"; this.setStateActivity2.TargetStateName = "refreshStateActivity"; // // delayActivity // this.delayActivity.Name = "delayActivity"; this.delayActivity.TimeoutDuration = System.TimeSpan.Parse("00:01:00"); // // refreshCodeActivity // this.refreshCodeActivity.Name = "refreshCodeActivity"; this.refreshCodeActivity.ExecuteCode += new System.EventHandler(this.refreshCodeActivity_ExecuteCode); // // setStateActivity1 // this.setStateActivity1.Name = "setStateActivity1"; this.setStateActivity1.TargetStateName = "refreshStateActivity"; // // delayBeforeStart // this.delayBeforeStart.Name = "delayBeforeStart"; this.delayBeforeStart.TimeoutDuration = System.TimeSpan.Parse("00:00:01"); // // stateInitializationCodeActivity // this.stateInitializationCodeActivity.Name = "stateInitializationCodeActivity"; this.stateInitializationCodeActivity.ExecuteCode += new System.EventHandler(this.stateInitializationCodeActivity_ExecuteCode); // // timerEventDrivenActivity // this.timerEventDrivenActivity.Activities.Add(this.delayActivity); this.timerEventDrivenActivity.Activities.Add(this.setStateActivity2); this.timerEventDrivenActivity.Name = "timerEventDrivenActivity"; // // refreshStateInitializationActivity // this.refreshStateInitializationActivity.Activities.Add(this.refreshCodeActivity); this.refreshStateInitializationActivity.Name = "refreshStateInitializationActivity"; // // delayBeforeStartActivity // this.delayBeforeStartActivity.Activities.Add(this.delayBeforeStart); this.delayBeforeStartActivity.Activities.Add(this.setStateActivity1); this.delayBeforeStartActivity.Name = "delayBeforeStartActivity"; // // stateInitializationActivity // this.stateInitializationActivity.Activities.Add(this.stateInitializationCodeActivity); this.stateInitializationActivity.Name = "stateInitializationActivity"; // // finishStateActivity // this.finishStateActivity.Name = "finishStateActivity"; // // refreshStateActivity // this.refreshStateActivity.Activities.Add(this.refreshStateInitializationActivity); this.refreshStateActivity.Activities.Add(this.timerEventDrivenActivity); this.refreshStateActivity.Name = "refreshStateActivity"; // // refreshInitialState // this.refreshInitialState.Activities.Add(this.stateInitializationActivity); this.refreshInitialState.Activities.Add(this.delayBeforeStartActivity); this.refreshInitialState.Name = "refreshInitialState"; // // RefreshWorkflow // this.Activities.Add(this.refreshInitialState); this.Activities.Add(this.refreshStateActivity); this.Activities.Add(this.finishStateActivity); this.CompletedStateName = "finishStateActivity"; this.DynamicUpdateCondition = null; this.InitialStateName = "refreshInitialState"; this.Name = "RefreshWorkflow"; this.CanModifyActivities = false; }
private void InitializeComponent () { CanModifyActivities = true; CodeCondition codecondition1 = new CodeCondition (); CodeCloseMailProgram2 = new ourCodeActivity (); DelayWaitForSentMail2 = new DelayActivity (); PrepareMail2 = new CodeActivity (); CodeCloseMailProgram1 = new CodeActivity (); DelayWaitForSentMail1 = new DelayActivity (); CodePrepareMail1 = new CodeActivity (); SeqSendMail2 = new SequenceActivity (); SeqSendMail1 = new SequenceActivity (); TerminateFinishNoNeedToReadMail = new TerminateActivity (); Parallel = new ParallelActivity (); IfElseBranchActivityNoNeed = new IfElseBranchActivity (); IfElseBranchActivityNeedToSendMail = new IfElseBranchActivity (); NeedToSendMail = new IfElseActivity (); CodeCloseMailProgram2.Name = "CodeCloseMailProgram2"; CodeCloseMailProgram2.ExecuteCode += new EventHandler (CodeCloseMailProgram2_ExecuteCode); DelayWaitForSentMail2.Name = "DelayWaitForSentMail2"; DelayWaitForSentMail2.TimeoutDuration = System.TimeSpan.Parse ("00:00:05"); DelayWaitForSentMail2.InitializeTimeoutDuration += new EventHandler (DelayWaitForSentMail2_InitializeTimeoutDuration); PrepareMail2.Name = "PrepareMail2"; PrepareMail2.ExecuteCode += new EventHandler (PrepareMail2_ExecuteCode); CodeCloseMailProgram1.Name = "CodeCloseMailProgram1"; CodeCloseMailProgram1.ExecuteCode += new EventHandler (CodeCloseMailProgram_ExecuteCode); DelayWaitForSentMail1.Name = "DelayWaitForSentMail1"; DelayWaitForSentMail1.TimeoutDuration = System.TimeSpan.Parse ("00:00:03"); DelayWaitForSentMail1.InitializeTimeoutDuration += new EventHandler (DelayWaitForSentMail1_InitializeTimeoutDuration); CodePrepareMail1.Name = "CodePrepareMail1"; CodePrepareMail1.ExecuteCode += new EventHandler (CodeActivity1_ExecuteCode); SeqSendMail2.Activities.Add (PrepareMail2); SeqSendMail2.Activities.Add (DelayWaitForSentMail2); SeqSendMail2.Activities.Add (CodeCloseMailProgram2); SeqSendMail2.Name = "SeqSendMail2"; SeqSendMail1.Activities.Add (CodePrepareMail1); //SeqSendMail1.Activities.Add (DelayWaitForSentMail1); SeqSendMail1.Activities.Add (CodeCloseMailProgram1); SeqSendMail1.Name = "SeqSendMail1"; TerminateFinishNoNeedToReadMail.Name = "TerminateFinishNoNeedToReadMail"; Parallel.Activities.Add (SeqSendMail1); Parallel.Activities.Add (SeqSendMail2); Parallel.Name = "Parallel"; IfElseBranchActivityNoNeed.Activities.Add (TerminateFinishNoNeedToReadMail); IfElseBranchActivityNoNeed.Name = "IfElseBranchActivityNoNeed"; IfElseBranchActivityNeedToSendMail.Activities.Add (Parallel); codecondition1.Condition += new EventHandler <ConditionalEventArgs>(IfElseCondition); IfElseBranchActivityNeedToSendMail.Condition = codecondition1; IfElseBranchActivityNeedToSendMail.Name = "IfElseBranchActivityNeedToSendMail"; NeedToSendMail.Activities.Add (IfElseBranchActivityNeedToSendMail); NeedToSendMail.Activities.Add (IfElseBranchActivityNoNeed); NeedToSendMail.Name = "NeedToSendMail"; Activities.Add (NeedToSendMail); Name = "IfElseParalellWorkFlow"; CanModifyActivities = false; }
private void InitializeComponent() { this.CanModifyActivities = true; System.Workflow.Activities.Rules.RuleConditionReference ruleconditionreference1 = new System.Workflow.Activities.Rules.RuleConditionReference(); System.Workflow.Activities.Rules.RuleConditionReference ruleconditionreference2 = new System.Workflow.Activities.Rules.RuleConditionReference(); this.codeActivity3 = new System.Workflow.Activities.CodeActivity(); this.codeActivity2 = new System.Workflow.Activities.CodeActivity(); this.ifElseBranchActivity2 = new System.Workflow.Activities.IfElseBranchActivity(); this.ifElseBranchActivity1 = new System.Workflow.Activities.IfElseBranchActivity(); this.ifElseActivity1 = new System.Workflow.Activities.IfElseActivity(); this.delayActivity1 = new System.Workflow.Activities.DelayActivity(); this.whileActivity1 = new System.Workflow.Activities.WhileActivity(); this.codeActivity1 = new System.Workflow.Activities.CodeActivity(); // // codeActivity3 // this.codeActivity3.Name = "codeActivity3"; this.codeActivity3.ExecuteCode += new System.EventHandler(this.codeActivity3_ExecuteCode); // // codeActivity2 // this.codeActivity2.Name = "codeActivity2"; this.codeActivity2.ExecuteCode += new System.EventHandler(this.codeActivity2_ExecuteCode); // // ifElseBranchActivity2 // this.ifElseBranchActivity2.Activities.Add(this.codeActivity3); this.ifElseBranchActivity2.Name = "ifElseBranchActivity2"; // // ifElseBranchActivity1 // this.ifElseBranchActivity1.Activities.Add(this.codeActivity2); ruleconditionreference1.ConditionName = "Condition1"; this.ifElseBranchActivity1.Condition = ruleconditionreference1; this.ifElseBranchActivity1.Name = "ifElseBranchActivity1"; // // ifElseActivity1 // this.ifElseActivity1.Activities.Add(this.ifElseBranchActivity1); this.ifElseActivity1.Activities.Add(this.ifElseBranchActivity2); this.ifElseActivity1.Name = "ifElseActivity1"; // // delayActivity1 // this.delayActivity1.Name = "delayActivity1"; this.delayActivity1.TimeoutDuration = System.TimeSpan.Parse("00:00:05"); // // whileActivity1 // this.whileActivity1.Activities.Add(this.ifElseActivity1); ruleconditionreference2.ConditionName = "Condition2"; this.whileActivity1.Condition = ruleconditionreference2; this.whileActivity1.Name = "whileActivity1"; // // codeActivity1 // this.codeActivity1.Name = "codeActivity1"; this.codeActivity1.ExecuteCode += new System.EventHandler(this.codeActivity1_ExecuteCode); // // Workflow1 // this.Activities.Add(this.codeActivity1); this.Activities.Add(this.whileActivity1); this.Activities.Add(this.delayActivity1); this.Name = "Workflow1"; this.CanModifyActivities = false; }
private void InitializeComponent() { this.CanModifyActivities = true; System.Workflow.Activities.CodeCondition codecondition1 = new System.Workflow.Activities.CodeCondition(); System.Workflow.ComponentModel.ActivityBind activitybind1 = new System.Workflow.ComponentModel.ActivityBind(); System.Workflow.ComponentModel.ActivityBind activitybind2 = new System.Workflow.ComponentModel.ActivityBind(); System.Workflow.ComponentModel.ActivityBind activitybind3 = new System.Workflow.ComponentModel.ActivityBind(); System.Workflow.ComponentModel.ActivityBind activitybind4 = new System.Workflow.ComponentModel.ActivityBind(); System.Workflow.ComponentModel.ActivityBind activitybind5 = new System.Workflow.ComponentModel.ActivityBind(); System.Workflow.ComponentModel.ActivityBind activitybind6 = new System.Workflow.ComponentModel.ActivityBind(); System.Workflow.ComponentModel.ActivityBind activitybind7 = new System.Workflow.ComponentModel.ActivityBind(); System.Workflow.Activities.CodeCondition codecondition2 = new System.Workflow.Activities.CodeCondition(); System.Workflow.Activities.CodeCondition codecondition3 = new System.Workflow.Activities.CodeCondition(); System.Workflow.Activities.CodeCondition codecondition4 = new System.Workflow.Activities.CodeCondition(); System.Workflow.ComponentModel.ActivityBind activitybind8 = new System.Workflow.ComponentModel.ActivityBind(); System.Workflow.ComponentModel.ActivityBind activitybind9 = new System.Workflow.ComponentModel.ActivityBind(); System.Workflow.ComponentModel.ActivityBind activitybind10 = new System.Workflow.ComponentModel.ActivityBind(); System.Workflow.Activities.CodeCondition codecondition5 = new System.Workflow.Activities.CodeCondition(); this.updateAllTasks = new System.Workflow.Activities.CodeActivity(); this.delayOneMinute = new System.Workflow.Activities.DelayActivity(); this.ifElseBranchActivity2 = new System.Workflow.Activities.IfElseBranchActivity(); this.isMustUpdateAllTasks = new System.Workflow.Activities.IfElseBranchActivity(); this.taskApproval1 = new TVMCORP.TVS.WORKFLOWS.Activities.TaskApproval(); this.terminateWF = new System.Workflow.ComponentModel.TerminateActivity(); this.setTerminateLog = new System.Workflow.Activities.CodeActivity(); this.ignoreLog = new TVMCORP.TVS.WORKFLOWS.Activities.CustomLogToWFHistoryActivity(); this.setIgnoreTasks = new System.Workflow.Activities.CodeActivity(); this.checkUpdateAllTasks = new System.Workflow.Activities.IfElseActivity(); this.customLogToWFHistoryActivity2 = new TVMCORP.TVS.WORKFLOWS.Activities.CustomLogToWFHistoryActivity(); this.setDescriptionLog = new System.Workflow.Activities.CodeActivity(); this.tasksReplicator = new System.Workflow.Activities.ReplicatorActivity(); this.terminateWorkflow = new System.Workflow.Activities.IfElseBranchActivity(); this.isIgnoreIfNoParticipant = new System.Workflow.Activities.IfElseBranchActivity(); this.isHaveApprovers = new System.Workflow.Activities.IfElseBranchActivity(); this.checkApprovers = new System.Workflow.Activities.IfElseActivity(); this.buildTasks = new System.Workflow.Activities.CodeActivity(); this.TaskEvenHandler = new TVMCORP.TVS.WORKFLOWS.Activities.TaskEventHandler(); this.customLogToWFHistoryActivity1 = new TVMCORP.TVS.WORKFLOWS.Activities.CustomLogToWFHistoryActivity(); this.setByPassValue = new System.Workflow.Activities.CodeActivity(); this.isNormalTask = new System.Workflow.Activities.IfElseBranchActivity(); this.isByPassTask = new System.Workflow.Activities.IfElseBranchActivity(); this.checkByPassTask = new System.Workflow.Activities.IfElseActivity(); this.initialData = new System.Workflow.Activities.CodeActivity(); // // updateAllTasks // this.updateAllTasks.Name = "updateAllTasks"; this.updateAllTasks.ExecuteCode += new System.EventHandler(this.updateAllTasks_ExecutedCode); // // delayOneMinute // this.delayOneMinute.Name = "delayOneMinute"; this.delayOneMinute.TimeoutDuration = System.TimeSpan.Parse("00:00:01"); // // ifElseBranchActivity2 // this.ifElseBranchActivity2.Name = "ifElseBranchActivity2"; // // isMustUpdateAllTasks // this.isMustUpdateAllTasks.Activities.Add(this.delayOneMinute); this.isMustUpdateAllTasks.Activities.Add(this.updateAllTasks); codecondition1.Condition += new System.EventHandler<System.Workflow.Activities.ConditionalEventArgs>(this.isMustUpdateAllTasks_Condition); this.isMustUpdateAllTasks.Condition = codecondition1; this.isMustUpdateAllTasks.Name = "isMustUpdateAllTasks"; // // taskApproval1 // this.taskApproval1.ApprovalInfoTask = null; this.taskApproval1.Name = "taskApproval1"; this.taskApproval1.Parameter = null; this.taskApproval1.WorkflowProperties = null; activitybind1.Name = "ApprovalWorkflow"; activitybind1.Path = "strLogDescription"; // // terminateWF // this.terminateWF.Name = "terminateWF"; this.terminateWF.SetBinding(System.Workflow.ComponentModel.TerminateActivity.ErrorProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind1))); // // setTerminateLog // this.setTerminateLog.Name = "setTerminateLog"; this.setTerminateLog.ExecuteCode += new System.EventHandler(this.setTerminateLog_ExecuteCode); // // ignoreLog // this.ignoreLog.EventId = Microsoft.SharePoint.Workflow.SPWorkflowHistoryEventType.WorkflowComment; activitybind2.Name = "ApprovalWorkflow"; activitybind2.Path = "strLogDescription"; this.ignoreLog.HistoryOutcome = "Ignored"; this.ignoreLog.Name = "ignoreLog"; activitybind3.Name = "ApprovalWorkflow"; activitybind3.Path = "__ActivationProperties"; this.ignoreLog.SetBinding(TVMCORP.TVS.WORKFLOWS.Activities.CustomLogToWFHistoryActivity.HistoryDescriptionProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind2))); this.ignoreLog.SetBinding(TVMCORP.TVS.WORKFLOWS.Activities.CustomLogToWFHistoryActivity.WorkflowPropertiesProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind3))); // // setIgnoreTasks // this.setIgnoreTasks.Name = "setIgnoreTasks"; this.setIgnoreTasks.ExecuteCode += new System.EventHandler(this.setIgnoreTask_ExecuteCode); // // checkUpdateAllTasks // this.checkUpdateAllTasks.Activities.Add(this.isMustUpdateAllTasks); this.checkUpdateAllTasks.Activities.Add(this.ifElseBranchActivity2); this.checkUpdateAllTasks.Name = "checkUpdateAllTasks"; // // customLogToWFHistoryActivity2 // this.customLogToWFHistoryActivity2.EventId = Microsoft.SharePoint.Workflow.SPWorkflowHistoryEventType.WorkflowComment; activitybind4.Name = "ApprovalWorkflow"; activitybind4.Path = "strLogDescription"; activitybind5.Name = "ApprovalWorkflow"; activitybind5.Path = "Status"; this.customLogToWFHistoryActivity2.Name = "customLogToWFHistoryActivity2"; activitybind6.Name = "ApprovalWorkflow"; activitybind6.Path = "__ActivationProperties"; this.customLogToWFHistoryActivity2.SetBinding(TVMCORP.TVS.WORKFLOWS.Activities.CustomLogToWFHistoryActivity.HistoryOutcomeProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind5))); this.customLogToWFHistoryActivity2.SetBinding(TVMCORP.TVS.WORKFLOWS.Activities.CustomLogToWFHistoryActivity.HistoryDescriptionProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind4))); this.customLogToWFHistoryActivity2.SetBinding(TVMCORP.TVS.WORKFLOWS.Activities.CustomLogToWFHistoryActivity.WorkflowPropertiesProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind6))); // // setDescriptionLog // this.setDescriptionLog.Name = "setDescriptionLog"; this.setDescriptionLog.ExecuteCode += new System.EventHandler(this.logResultToHistoryList_ExecuteCode); activitybind7.Name = "ApprovalWorkflow"; activitybind7.Path = "_listTasks"; // // tasksReplicator // this.tasksReplicator.Activities.Add(this.taskApproval1); this.tasksReplicator.ExecutionType = System.Workflow.Activities.ExecutionType.Parallel; this.tasksReplicator.Name = "tasksReplicator"; codecondition2.Condition += new System.EventHandler<System.Workflow.Activities.ConditionalEventArgs>(this.IsStopTaskReplicator); this.tasksReplicator.UntilCondition = codecondition2; this.tasksReplicator.ChildInitialized += new System.EventHandler<System.Workflow.Activities.ReplicatorChildEventArgs>(this.tasksReplicatorChild_Init); this.tasksReplicator.ChildCompleted += new System.EventHandler<System.Workflow.Activities.ReplicatorChildEventArgs>(this.tasksReplicatorChild_Complete); this.tasksReplicator.SetBinding(System.Workflow.Activities.ReplicatorActivity.InitialChildDataProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind7))); // // terminateWorkflow // this.terminateWorkflow.Activities.Add(this.setTerminateLog); this.terminateWorkflow.Activities.Add(this.terminateWF); this.terminateWorkflow.Name = "terminateWorkflow"; // // isIgnoreIfNoParticipant // this.isIgnoreIfNoParticipant.Activities.Add(this.setIgnoreTasks); this.isIgnoreIfNoParticipant.Activities.Add(this.ignoreLog); codecondition3.Condition += new System.EventHandler<System.Workflow.Activities.ConditionalEventArgs>(this.isIgnoreIfNoParticipant_ConditionCode); this.isIgnoreIfNoParticipant.Condition = codecondition3; this.isIgnoreIfNoParticipant.Name = "isIgnoreIfNoParticipant"; // // isHaveApprovers // this.isHaveApprovers.Activities.Add(this.tasksReplicator); this.isHaveApprovers.Activities.Add(this.setDescriptionLog); this.isHaveApprovers.Activities.Add(this.customLogToWFHistoryActivity2); this.isHaveApprovers.Activities.Add(this.checkUpdateAllTasks); codecondition4.Condition += new System.EventHandler<System.Workflow.Activities.ConditionalEventArgs>(this.isHaveApprovers_ConditionCode); this.isHaveApprovers.Condition = codecondition4; this.isHaveApprovers.Name = "isHaveApprovers"; // // checkApprovers // this.checkApprovers.Activities.Add(this.isHaveApprovers); this.checkApprovers.Activities.Add(this.isIgnoreIfNoParticipant); this.checkApprovers.Activities.Add(this.terminateWorkflow); this.checkApprovers.Name = "checkApprovers"; // // buildTasks // this.buildTasks.Name = "buildTasks"; this.buildTasks.ExecuteCode += new System.EventHandler(this.buildTasks_ExecuteCode); // // TaskEvenHandler // this.TaskEvenHandler.EventType = TVMCORP.TVS.WORKFLOWS.MODELS.TaskEventTypes.ByPassTask; this.TaskEvenHandler.Name = "TaskEvenHandler"; activitybind8.Name = "ApprovalWorkflow"; activitybind8.Path = "TaskHandlerParameter"; this.TaskEvenHandler.SetBinding(TVMCORP.TVS.WORKFLOWS.Activities.TaskEventHandler.ParameterProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind8))); // // customLogToWFHistoryActivity1 // this.customLogToWFHistoryActivity1.EventId = Microsoft.SharePoint.Workflow.SPWorkflowHistoryEventType.WorkflowComment; activitybind9.Name = "ApprovalWorkflow"; activitybind9.Path = "strLogDescription"; this.customLogToWFHistoryActivity1.HistoryOutcome = "ByPassed"; this.customLogToWFHistoryActivity1.Name = "customLogToWFHistoryActivity1"; activitybind10.Name = "ApprovalWorkflow"; activitybind10.Path = "__ActivationProperties"; this.customLogToWFHistoryActivity1.SetBinding(TVMCORP.TVS.WORKFLOWS.Activities.CustomLogToWFHistoryActivity.HistoryDescriptionProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind9))); this.customLogToWFHistoryActivity1.SetBinding(TVMCORP.TVS.WORKFLOWS.Activities.CustomLogToWFHistoryActivity.WorkflowPropertiesProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind10))); // // setByPassValue // this.setByPassValue.Name = "setByPassValue"; this.setByPassValue.ExecuteCode += new System.EventHandler(this.setByPassValue_ExecuteCode); // // isNormalTask // this.isNormalTask.Activities.Add(this.buildTasks); this.isNormalTask.Activities.Add(this.checkApprovers); this.isNormalTask.Name = "isNormalTask"; // // isByPassTask // this.isByPassTask.Activities.Add(this.setByPassValue); this.isByPassTask.Activities.Add(this.customLogToWFHistoryActivity1); this.isByPassTask.Activities.Add(this.TaskEvenHandler); codecondition5.Condition += new System.EventHandler<System.Workflow.Activities.ConditionalEventArgs>(this.isByPassTask_ExecuteCode); this.isByPassTask.Condition = codecondition5; this.isByPassTask.Name = "isByPassTask"; // // checkByPassTask // this.checkByPassTask.Activities.Add(this.isByPassTask); this.checkByPassTask.Activities.Add(this.isNormalTask); this.checkByPassTask.Name = "checkByPassTask"; // // initialData // this.initialData.Name = "initialData"; this.initialData.ExecuteCode += new System.EventHandler(this.InitialData_ExecuteCode); // // ApprovalWorkflow // this.Activities.Add(this.initialData); this.Activities.Add(this.checkByPassTask); this.Name = "ApprovalWorkflow"; this.CanModifyActivities = false; }