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.ActivityBind activitybind3 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.Activities.CodeCondition codecondition1 = new System.Workflow.Activities.CodeCondition();
     this.completedTask = new System.Workflow.Activities.CodeActivity();
     this.taskApprovalActivity1 = new TVMCORP.TVS.WORKFLOWS.Activities.TaskApprovalActivity();
     this.initialData = new System.Workflow.Activities.CodeActivity();
     this.sequenceActivity1 = new System.Workflow.Activities.SequenceActivity();
     this.whileActivity1 = new System.Workflow.Activities.WhileActivity();
     //
     // completedTask
     //
     this.completedTask.Name = "completedTask";
     this.completedTask.ExecuteCode += new System.EventHandler(this.completedTask_ExecuteCode);
     //
     // taskApprovalActivity1
     //
     activitybind1.Name = "TaskApproval";
     activitybind1.Path = "TaskInfo";
     this.taskApprovalActivity1.Name = "taskApprovalActivity1";
     activitybind2.Name = "TaskApproval";
     activitybind2.Path = "Parameter";
     activitybind3.Name = "TaskApproval";
     activitybind3.Path = "WorkflowProperties";
     this.taskApprovalActivity1.SetBinding(TVMCORP.TVS.WORKFLOWS.Activities.TaskApprovalActivity.ParameterProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind2)));
     this.taskApprovalActivity1.SetBinding(TVMCORP.TVS.WORKFLOWS.Activities.TaskApprovalActivity.ApprovalInfoTaskProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind1)));
     this.taskApprovalActivity1.SetBinding(TVMCORP.TVS.WORKFLOWS.Activities.TaskApprovalActivity.WorkflowPropertiesProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind3)));
     //
     // initialData
     //
     this.initialData.Name = "initialData";
     this.initialData.ExecuteCode += new System.EventHandler(this.initialData_ExecuteCode);
     //
     // sequenceActivity1
     //
     this.sequenceActivity1.Activities.Add(this.initialData);
     this.sequenceActivity1.Activities.Add(this.taskApprovalActivity1);
     this.sequenceActivity1.Activities.Add(this.completedTask);
     this.sequenceActivity1.Name = "sequenceActivity1";
     //
     // whileActivity1
     //
     this.whileActivity1.Activities.Add(this.sequenceActivity1);
     codecondition1.Condition += new System.EventHandler<System.Workflow.Activities.ConditionalEventArgs>(this.havePreviousTask);
     this.whileActivity1.Condition = codecondition1;
     this.whileActivity1.Name = "whileActivity1";
     //
     // TaskApproval
     //
     this.Activities.Add(this.whileActivity1);
     this.Name = "TaskApproval";
     this.CanModifyActivities = false;
 }
Example #2
0
        void IActivityEventListener <ActivityExecutionStatusChangedEventArgs> .OnEvent(Object sender, ActivityExecutionStatusChangedEventArgs e)
        {
            if (sender == null)
            {
                throw new ArgumentNullException("sender");
            }
            if (e == null)
            {
                throw new ArgumentNullException("e");
            }

            ActivityExecutionContext context = sender as ActivityExecutionContext;

            if (context == null)
            {
                throw new ArgumentException(SR.Error_SenderMustBeActivityExecutionContext, "sender");
            }

            e.Activity.UnregisterForStatusChange(Activity.ClosedEvent, this);

            SequenceActivity sequenceActivity = context.Activity as SequenceActivity;

            if (sequenceActivity == null)
            {
                throw new ArgumentException("sender");
            }

            if (sequenceActivity.ExecutionStatus == ActivityExecutionStatus.Canceling ||
                (sequenceActivity.ExecutionStatus == ActivityExecutionStatus.Faulting) &&
                (bool)this.GetValue(SequenceFaultingProperty))
            {
                if (sequenceActivity.ExecutionStatus == ActivityExecutionStatus.Faulting)
                {
                    this.RemoveProperty(SequenceFaultingProperty);
                }

                this.RemoveProperty(ActiveChildQualifiedNameProperty);
                context.CloseActivity();
            }
            else if (sequenceActivity.ExecutionStatus == ActivityExecutionStatus.Executing)
            {
                if (!TryScheduleNextChild(context))
                {
                    OnSequenceComplete(context);
                    context.CloseActivity();
                }
            }
        }
 /// <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()
 {
     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.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.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.ComponentModel.ActivityBind activitybind11 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.ActivityBind activitybind12 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.ActivityBind activitybind13 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.ActivityBind activitybind14 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.ActivityBind activitybind15 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.ActivityBind activitybind16 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.ActivityBind activitybind17 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.ActivityBind activitybind18 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.ActivityBind activitybind19 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.Activities.CodeCondition codecondition1 = new System.Workflow.Activities.CodeCondition();
     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.Activities.CodeCondition codecondition5 = new System.Workflow.Activities.CodeCondition();
     System.Workflow.Activities.CodeCondition codecondition6 = new System.Workflow.Activities.CodeCondition();
     System.Workflow.Activities.CodeCondition codecondition7 = new System.Workflow.Activities.CodeCondition();
     System.Workflow.Activities.CodeCondition codecondition8 = new System.Workflow.Activities.CodeCondition();
     System.Workflow.Activities.CodeCondition codecondition9 = new System.Workflow.Activities.CodeCondition();
     System.Workflow.Activities.CodeCondition codecondition10 = new System.Workflow.Activities.CodeCondition();
     System.Workflow.ComponentModel.ActivityBind activitybind20 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.ActivityBind activitybind21 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.ActivityBind activitybind22 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.Runtime.CorrelationToken correlationtoken1 = new System.Workflow.Runtime.CorrelationToken();
     System.Workflow.ComponentModel.ActivityBind activitybind23 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.Activities.CodeCondition codecondition11 = new System.Workflow.Activities.CodeCondition();
     System.Workflow.Activities.CodeCondition codecondition12 = new System.Workflow.Activities.CodeCondition();
     System.Workflow.ComponentModel.ActivityBind activitybind24 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.ActivityBind activitybind25 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.ActivityBind activitybind26 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.ActivityBind activitybind27 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.ActivityBind activitybind28 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.ActivityBind activitybind29 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.ActivityBind activitybind30 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.Runtime.CorrelationToken correlationtoken2 = new System.Workflow.Runtime.CorrelationToken();
     System.Workflow.ComponentModel.ActivityBind activitybind31 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.ActivityBind activitybind32 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.ActivityBind activitybind33 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.ActivityBind activitybind34 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.ActivityBind activitybind35 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.Activities.CodeCondition codecondition13 = new System.Workflow.Activities.CodeCondition();
     System.Workflow.ComponentModel.ActivityBind activitybind36 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.ActivityBind activitybind37 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.ActivityBind activitybind38 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.ActivityBind activitybind39 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.ActivityBind activitybind40 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.ActivityBind activitybind41 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.Activities.CodeCondition codecondition14 = new System.Workflow.Activities.CodeCondition();
     this.sendWFTaskEmail2 = new TVMCORP.TVS.WORKFLOWS.Activities.SendWFTaskEmail();
     this.sendEmailToEscalationParty = new TVMCORP.TVS.WORKFLOWS.Activities.SendWFTaskEmail();
     this.escalationDateReachedHandler = new TVMCORP.TVS.WORKFLOWS.Activities.TaskEventHandler();
     this.sendReminderEmailReplicator = new System.Workflow.Activities.ReplicatorActivity();
     this.reminderDataReachedHandler = new TVMCORP.TVS.WORKFLOWS.Activities.TaskEventHandler();
     this.sendEEC = new System.Workflow.Activities.CodeActivity();
     this.TaskEvenHandler = new TVMCORP.TVS.WORKFLOWS.Activities.TaskEventHandler();
     this.updateOnHoldTask = new System.Workflow.Activities.CodeActivity();
     this.workflowTerminatedHandler = new TVMCORP.TVS.WORKFLOWS.Activities.TaskEventHandler();
     this.sentHandler = new TVMCORP.TVS.WORKFLOWS.Activities.TaskEventHandler();
     this.requestedHandler = new TVMCORP.TVS.WORKFLOWS.Activities.TaskEventHandler();
     this.reassignedHandler = new TVMCORP.TVS.WORKFLOWS.Activities.TaskEventHandler();
     this.rejetedHandler = new TVMCORP.TVS.WORKFLOWS.Activities.TaskEventHandler();
     this.approvedHandler = new TVMCORP.TVS.WORKFLOWS.Activities.TaskEventHandler();
     this.ifElseBranchActivity3 = new System.Workflow.Activities.IfElseBranchActivity();
     this.isNotOnHoldEscalation = new System.Workflow.Activities.IfElseBranchActivity();
     this.ifElseBranchActivity2 = new System.Workflow.Activities.IfElseBranchActivity();
     this.isNotOnHold = new System.Workflow.Activities.IfElseBranchActivity();
     this.ifElseBranchActivity1 = new System.Workflow.Activities.IfElseBranchActivity();
     this.isSendEEC = new System.Workflow.Activities.IfElseBranchActivity();
     this.isOnHold = new System.Workflow.Activities.IfElseBranchActivity();
     this.isTerminated = new System.Workflow.Activities.IfElseBranchActivity();
     this.isSent = new System.Workflow.Activities.IfElseBranchActivity();
     this.isRequested = new System.Workflow.Activities.IfElseBranchActivity();
     this.isReassigned = new System.Workflow.Activities.IfElseBranchActivity();
     this.isRejected = new System.Workflow.Activities.IfElseBranchActivity();
     this.isApproved = new System.Workflow.Activities.IfElseBranchActivity();
     this.checkOnHoldEscalation = new System.Workflow.Activities.IfElseActivity();
     this.delayForActivity2 = new Microsoft.SharePoint.WorkflowActions.DelayForActivity();
     this.checkOnHold = new System.Workflow.Activities.IfElseActivity();
     this.delayForActivity1 = new Microsoft.SharePoint.WorkflowActions.DelayForActivity();
     this.taskEventHandler = new System.Workflow.Activities.IfElseActivity();
     this.onTaskChanged = new Microsoft.SharePoint.WorkflowActions.OnTaskChanged();
     this.isEscalationNotExist = new System.Workflow.Activities.IfElseBranchActivity();
     this.isEscalationExist = new System.Workflow.Activities.IfElseBranchActivity();
     this.notExist = new System.Workflow.Activities.IfElseBranchActivity();
     this.isExist = new System.Workflow.Activities.IfElseBranchActivity();
     this.taskChangeSequence = new System.Workflow.Activities.SequenceActivity();
     this.sendAssignmentEmail = new TVMCORP.TVS.WORKFLOWS.Activities.SendWFTaskEmail();
     this.checkEscalationDate = new System.Workflow.Activities.IfElseActivity();
     this.checkReminderDate = new System.Workflow.Activities.IfElseActivity();
     this.persistOnClose2 = new TVMCORP.TVS.WORKFLOWS.Activities.PersistOnClose();
     this.taskCompletedHandler = new TVMCORP.TVS.WORKFLOWS.Activities.TaskEventHandler();
     this.completeTask = new Microsoft.SharePoint.WorkflowActions.CompleteTask();
     this.updateTask = new Microsoft.SharePoint.WorkflowActions.UpdateTask();
     this.customLogToWFHistoryActivity1 = new TVMCORP.TVS.WORKFLOWS.Activities.CustomLogToWFHistoryActivity();
     this.setDescriptionLog = new System.Workflow.Activities.CodeActivity();
     this.whileTaskChange = new System.Workflow.Activities.WhileActivity();
     this.sendAssignEmailReplicator = new System.Workflow.Activities.ReplicatorActivity();
     this.setSecurityForTask = new System.Workflow.Activities.CodeActivity();
     this.taskCreatedHandler = new TVMCORP.TVS.WORKFLOWS.Activities.TaskEventHandler();
     this.setTaskHandlerParameter = new System.Workflow.Activities.CodeActivity();
     this.persistOnClose1 = new TVMCORP.TVS.WORKFLOWS.Activities.PersistOnClose();
     this.createTaskWithContentType = new Microsoft.SharePoint.WorkflowActions.CreateTaskWithContentType();
     this.escalationSequence = new System.Workflow.Activities.SequenceActivity();
     this.reminderSequence = new System.Workflow.Activities.SequenceActivity();
     this.taskSequence = new System.Workflow.Activities.SequenceActivity();
     this.taskGroup = new System.Workflow.Activities.ConditionedActivityGroup();
     this.initialData = new System.Workflow.Activities.CodeActivity();
     //
     // sendWFTaskEmail2
     //
     this.sendWFTaskEmail2.CC = null;
     this.sendWFTaskEmail2.Name = "sendWFTaskEmail2";
     activitybind1.Name = "TaskApprovalActivity";
     activitybind1.Path = "TaskIdCreated";
     activitybind2.Name = "TaskApprovalActivity";
     activitybind2.Path = "Parameter.ApprovalConfiguation.URLEmailTemplate";
     activitybind3.Name = "TaskApprovalActivity";
     activitybind3.Path = "Parameter.ApprovalConfiguation.ReminderEmailTemplate";
     this.sendWFTaskEmail2.To = null;
     activitybind4.Name = "TaskApprovalActivity";
     activitybind4.Path = "WorkflowProperties";
     this.sendWFTaskEmail2.SetBinding(TVMCORP.TVS.WORKFLOWS.Activities.SendWFTaskEmail.TaskListItemProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind1)));
     this.sendWFTaskEmail2.SetBinding(TVMCORP.TVS.WORKFLOWS.Activities.SendWFTaskEmail.TemplateListURLProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind2)));
     this.sendWFTaskEmail2.SetBinding(TVMCORP.TVS.WORKFLOWS.Activities.SendWFTaskEmail.TemplateNameProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind3)));
     this.sendWFTaskEmail2.SetBinding(TVMCORP.TVS.WORKFLOWS.Activities.SendWFTaskEmail.WorkflowPropertiesProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind4)));
     //
     // sendEmailToEscalationParty
     //
     this.sendEmailToEscalationParty.CC = null;
     this.sendEmailToEscalationParty.Name = "sendEmailToEscalationParty";
     activitybind5.Name = "TaskApprovalActivity";
     activitybind5.Path = "TaskIdCreated";
     activitybind6.Name = "TaskApprovalActivity";
     activitybind6.Path = "Parameter.ApprovalConfiguation.URLEmailTemplate";
     activitybind7.Name = "TaskApprovalActivity";
     activitybind7.Path = "Parameter.ApprovalConfiguation.EscalationEmailTemplate";
     activitybind8.Name = "TaskApprovalActivity";
     activitybind8.Path = "Parameter.ApprovalConfiguation.EscalationPartyEmail";
     activitybind9.Name = "TaskApprovalActivity";
     activitybind9.Path = "WorkflowProperties";
     this.sendEmailToEscalationParty.SetBinding(TVMCORP.TVS.WORKFLOWS.Activities.SendWFTaskEmail.TaskListItemProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind5)));
     this.sendEmailToEscalationParty.SetBinding(TVMCORP.TVS.WORKFLOWS.Activities.SendWFTaskEmail.TemplateListURLProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind6)));
     this.sendEmailToEscalationParty.SetBinding(TVMCORP.TVS.WORKFLOWS.Activities.SendWFTaskEmail.TemplateNameProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind7)));
     this.sendEmailToEscalationParty.SetBinding(TVMCORP.TVS.WORKFLOWS.Activities.SendWFTaskEmail.ToProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind8)));
     this.sendEmailToEscalationParty.SetBinding(TVMCORP.TVS.WORKFLOWS.Activities.SendWFTaskEmail.WorkflowPropertiesProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind9)));
     //
     // escalationDateReachedHandler
     //
     this.escalationDateReachedHandler.EventType = TVMCORP.TVS.WORKFLOWS.MODELS.TaskEventTypes.EscalationDateReached;
     this.escalationDateReachedHandler.Name = "escalationDateReachedHandler";
     activitybind10.Name = "TaskApprovalActivity";
     activitybind10.Path = "TaskHandlerParameter";
     this.escalationDateReachedHandler.SetBinding(TVMCORP.TVS.WORKFLOWS.Activities.TaskEventHandler.ParameterProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind10)));
     activitybind11.Name = "TaskApprovalActivity";
     activitybind11.Path = "AssingeeEmailsList";
     //
     // sendReminderEmailReplicator
     //
     this.sendReminderEmailReplicator.Activities.Add(this.sendWFTaskEmail2);
     this.sendReminderEmailReplicator.ExecutionType = System.Workflow.Activities.ExecutionType.Sequence;
     this.sendReminderEmailReplicator.Name = "sendReminderEmailReplicator";
     this.sendReminderEmailReplicator.ChildInitialized += new System.EventHandler<System.Workflow.Activities.ReplicatorChildEventArgs>(this.sendReminderEmailReplicatorChild_Init);
     this.sendReminderEmailReplicator.SetBinding(System.Workflow.Activities.ReplicatorActivity.InitialChildDataProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind11)));
     //
     // reminderDataReachedHandler
     //
     this.reminderDataReachedHandler.EventType = TVMCORP.TVS.WORKFLOWS.MODELS.TaskEventTypes.ReminderDateReached;
     this.reminderDataReachedHandler.Name = "reminderDataReachedHandler";
     activitybind12.Name = "TaskApprovalActivity";
     activitybind12.Path = "TaskHandlerParameter";
     this.reminderDataReachedHandler.SetBinding(TVMCORP.TVS.WORKFLOWS.Activities.TaskEventHandler.ParameterProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind12)));
     //
     // sendEEC
     //
     this.sendEEC.Name = "sendEEC";
     this.sendEEC.ExecuteCode += new System.EventHandler(this.sendEEC_ExecuteCode);
     //
     // TaskEvenHandler
     //
     this.TaskEvenHandler.EventType = TVMCORP.TVS.WORKFLOWS.MODELS.TaskEventTypes.TaskOnHold;
     this.TaskEvenHandler.Name = "TaskEvenHandler";
     activitybind13.Name = "TaskApprovalActivity";
     activitybind13.Path = "TaskHandlerParameter";
     this.TaskEvenHandler.SetBinding(TVMCORP.TVS.WORKFLOWS.Activities.TaskEventHandler.ParameterProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind13)));
     //
     // updateOnHoldTask
     //
     this.updateOnHoldTask.Name = "updateOnHoldTask";
     this.updateOnHoldTask.ExecuteCode += new System.EventHandler(this.updateOnHoldTask_ExecuteCode);
     //
     // workflowTerminatedHandler
     //
     this.workflowTerminatedHandler.EventType = TVMCORP.TVS.WORKFLOWS.MODELS.TaskEventTypes.WorkflowTerminated;
     this.workflowTerminatedHandler.Name = "workflowTerminatedHandler";
     activitybind14.Name = "TaskApprovalActivity";
     activitybind14.Path = "TaskHandlerParameter";
     this.workflowTerminatedHandler.SetBinding(TVMCORP.TVS.WORKFLOWS.Activities.TaskEventHandler.ParameterProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind14)));
     //
     // sentHandler
     //
     this.sentHandler.EventType = TVMCORP.TVS.WORKFLOWS.MODELS.TaskEventTypes.TaskInformationSent;
     this.sentHandler.Name = "sentHandler";
     activitybind15.Name = "TaskApprovalActivity";
     activitybind15.Path = "TaskHandlerParameter";
     this.sentHandler.SetBinding(TVMCORP.TVS.WORKFLOWS.Activities.TaskEventHandler.ParameterProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind15)));
     //
     // requestedHandler
     //
     this.requestedHandler.EventType = TVMCORP.TVS.WORKFLOWS.MODELS.TaskEventTypes.TaskInformationRequested;
     this.requestedHandler.Name = "requestedHandler";
     activitybind16.Name = "TaskApprovalActivity";
     activitybind16.Path = "TaskHandlerParameter";
     this.requestedHandler.SetBinding(TVMCORP.TVS.WORKFLOWS.Activities.TaskEventHandler.ParameterProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind16)));
     //
     // reassignedHandler
     //
     this.reassignedHandler.EventType = TVMCORP.TVS.WORKFLOWS.MODELS.TaskEventTypes.TaskReassigned;
     this.reassignedHandler.Name = "reassignedHandler";
     activitybind17.Name = "TaskApprovalActivity";
     activitybind17.Path = "TaskHandlerParameter";
     this.reassignedHandler.SetBinding(TVMCORP.TVS.WORKFLOWS.Activities.TaskEventHandler.ParameterProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind17)));
     //
     // rejetedHandler
     //
     this.rejetedHandler.EventType = TVMCORP.TVS.WORKFLOWS.MODELS.TaskEventTypes.TaskRejected;
     this.rejetedHandler.Name = "rejetedHandler";
     activitybind18.Name = "TaskApprovalActivity";
     activitybind18.Path = "TaskHandlerParameter";
     this.rejetedHandler.SetBinding(TVMCORP.TVS.WORKFLOWS.Activities.TaskEventHandler.ParameterProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind18)));
     //
     // approvedHandler
     //
     this.approvedHandler.EventType = TVMCORP.TVS.WORKFLOWS.MODELS.TaskEventTypes.TaskApproved;
     this.approvedHandler.Name = "approvedHandler";
     activitybind19.Name = "TaskApprovalActivity";
     activitybind19.Path = "TaskHandlerParameter";
     this.approvedHandler.SetBinding(TVMCORP.TVS.WORKFLOWS.Activities.TaskEventHandler.ParameterProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind19)));
     //
     // ifElseBranchActivity3
     //
     this.ifElseBranchActivity3.Name = "ifElseBranchActivity3";
     //
     // isNotOnHoldEscalation
     //
     this.isNotOnHoldEscalation.Activities.Add(this.escalationDateReachedHandler);
     this.isNotOnHoldEscalation.Activities.Add(this.sendEmailToEscalationParty);
     codecondition1.Condition += new System.EventHandler<System.Workflow.Activities.ConditionalEventArgs>(this.isNotOnHold_Condition);
     this.isNotOnHoldEscalation.Condition = codecondition1;
     this.isNotOnHoldEscalation.Name = "isNotOnHoldEscalation";
     //
     // ifElseBranchActivity2
     //
     this.ifElseBranchActivity2.Name = "ifElseBranchActivity2";
     //
     // isNotOnHold
     //
     this.isNotOnHold.Activities.Add(this.reminderDataReachedHandler);
     this.isNotOnHold.Activities.Add(this.sendReminderEmailReplicator);
     codecondition2.Condition += new System.EventHandler<System.Workflow.Activities.ConditionalEventArgs>(this.isNotOnHold_Condition);
     this.isNotOnHold.Condition = codecondition2;
     this.isNotOnHold.Name = "isNotOnHold";
     //
     // ifElseBranchActivity1
     //
     this.ifElseBranchActivity1.Name = "ifElseBranchActivity1";
     //
     // isSendEEC
     //
     this.isSendEEC.Activities.Add(this.sendEEC);
     codecondition3.Condition += new System.EventHandler<System.Workflow.Activities.ConditionalEventArgs>(this.isSendEEC_Condition);
     this.isSendEEC.Condition = codecondition3;
     this.isSendEEC.Name = "isSendEEC";
     //
     // isOnHold
     //
     this.isOnHold.Activities.Add(this.updateOnHoldTask);
     this.isOnHold.Activities.Add(this.TaskEvenHandler);
     codecondition4.Condition += new System.EventHandler<System.Workflow.Activities.ConditionalEventArgs>(this.isOnHold_Condition);
     this.isOnHold.Condition = codecondition4;
     this.isOnHold.Name = "isOnHold";
     //
     // isTerminated
     //
     this.isTerminated.Activities.Add(this.workflowTerminatedHandler);
     codecondition5.Condition += new System.EventHandler<System.Workflow.Activities.ConditionalEventArgs>(this.isTerminated_Condition);
     this.isTerminated.Condition = codecondition5;
     this.isTerminated.Name = "isTerminated";
     //
     // isSent
     //
     this.isSent.Activities.Add(this.sentHandler);
     codecondition6.Condition += new System.EventHandler<System.Workflow.Activities.ConditionalEventArgs>(this.isSent_Condition);
     this.isSent.Condition = codecondition6;
     this.isSent.Name = "isSent";
     //
     // isRequested
     //
     this.isRequested.Activities.Add(this.requestedHandler);
     codecondition7.Condition += new System.EventHandler<System.Workflow.Activities.ConditionalEventArgs>(this.isRequested_Condition);
     this.isRequested.Condition = codecondition7;
     this.isRequested.Name = "isRequested";
     //
     // isReassigned
     //
     this.isReassigned.Activities.Add(this.reassignedHandler);
     codecondition8.Condition += new System.EventHandler<System.Workflow.Activities.ConditionalEventArgs>(this.isReassigned_Condition);
     this.isReassigned.Condition = codecondition8;
     this.isReassigned.Name = "isReassigned";
     //
     // isRejected
     //
     this.isRejected.Activities.Add(this.rejetedHandler);
     codecondition9.Condition += new System.EventHandler<System.Workflow.Activities.ConditionalEventArgs>(this.isRejected_Condition);
     this.isRejected.Condition = codecondition9;
     this.isRejected.Name = "isRejected";
     //
     // isApproved
     //
     this.isApproved.Activities.Add(this.approvedHandler);
     codecondition10.Condition += new System.EventHandler<System.Workflow.Activities.ConditionalEventArgs>(this.isApproved_Condition);
     this.isApproved.Condition = codecondition10;
     this.isApproved.Name = "isApproved";
     //
     // checkOnHoldEscalation
     //
     this.checkOnHoldEscalation.Activities.Add(this.isNotOnHoldEscalation);
     this.checkOnHoldEscalation.Activities.Add(this.ifElseBranchActivity3);
     this.checkOnHoldEscalation.Name = "checkOnHoldEscalation";
     //
     // delayForActivity2
     //
     activitybind20.Name = "TaskApprovalActivity";
     activitybind20.Path = "Parameter.ApprovalConfiguation.EscalationDuration";
     this.delayForActivity2.Hours = 0D;
     this.delayForActivity2.Minutes = 0D;
     this.delayForActivity2.Name = "delayForActivity2";
     this.delayForActivity2.SetBinding(Microsoft.SharePoint.WorkflowActions.DelayForActivity.DaysProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind20)));
     //
     // checkOnHold
     //
     this.checkOnHold.Activities.Add(this.isNotOnHold);
     this.checkOnHold.Activities.Add(this.ifElseBranchActivity2);
     this.checkOnHold.Name = "checkOnHold";
     //
     // delayForActivity1
     //
     activitybind21.Name = "TaskApprovalActivity";
     activitybind21.Path = "Parameter.ApprovalConfiguation.ReminderDuration";
     this.delayForActivity1.Hours = 0D;
     this.delayForActivity1.Minutes = 0D;
     this.delayForActivity1.Name = "delayForActivity1";
     this.delayForActivity1.SetBinding(Microsoft.SharePoint.WorkflowActions.DelayForActivity.DaysProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind21)));
     //
     // taskEventHandler
     //
     this.taskEventHandler.Activities.Add(this.isApproved);
     this.taskEventHandler.Activities.Add(this.isRejected);
     this.taskEventHandler.Activities.Add(this.isReassigned);
     this.taskEventHandler.Activities.Add(this.isRequested);
     this.taskEventHandler.Activities.Add(this.isSent);
     this.taskEventHandler.Activities.Add(this.isTerminated);
     this.taskEventHandler.Activities.Add(this.isOnHold);
     this.taskEventHandler.Activities.Add(this.isSendEEC);
     this.taskEventHandler.Activities.Add(this.ifElseBranchActivity1);
     this.taskEventHandler.Name = "taskEventHandler";
     //
     // onTaskChanged
     //
     activitybind22.Name = "TaskApprovalActivity";
     activitybind22.Path = "ApprovalInfoTask.TaskAfterProperties";
     this.onTaskChanged.BeforeProperties = null;
     correlationtoken1.Name = "taskToken";
     correlationtoken1.OwnerActivityName = "TaskApprovalActivity";
     this.onTaskChanged.CorrelationToken = correlationtoken1;
     this.onTaskChanged.Executor = null;
     this.onTaskChanged.Name = "onTaskChanged";
     activitybind23.Name = "TaskApprovalActivity";
     activitybind23.Path = "ApprovalInfoTask.Id";
     this.onTaskChanged.Invoked += new System.EventHandler<System.Workflow.Activities.ExternalDataEventArgs>(this.onTaskChanged1_Invoked);
     this.onTaskChanged.SetBinding(Microsoft.SharePoint.WorkflowActions.OnTaskChanged.TaskIdProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind23)));
     this.onTaskChanged.SetBinding(Microsoft.SharePoint.WorkflowActions.OnTaskChanged.AfterPropertiesProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind22)));
     //
     // isEscalationNotExist
     //
     this.isEscalationNotExist.Name = "isEscalationNotExist";
     //
     // isEscalationExist
     //
     this.isEscalationExist.Activities.Add(this.delayForActivity2);
     this.isEscalationExist.Activities.Add(this.checkOnHoldEscalation);
     codecondition11.Condition += new System.EventHandler<System.Workflow.Activities.ConditionalEventArgs>(this.IsEscalationDateExist);
     this.isEscalationExist.Condition = codecondition11;
     this.isEscalationExist.Name = "isEscalationExist";
     //
     // notExist
     //
     this.notExist.Name = "notExist";
     //
     // isExist
     //
     this.isExist.Activities.Add(this.delayForActivity1);
     this.isExist.Activities.Add(this.checkOnHold);
     codecondition12.Condition += new System.EventHandler<System.Workflow.Activities.ConditionalEventArgs>(this.IsReminderDateExist);
     this.isExist.Condition = codecondition12;
     this.isExist.Name = "isExist";
     //
     // taskChangeSequence
     //
     this.taskChangeSequence.Activities.Add(this.onTaskChanged);
     this.taskChangeSequence.Activities.Add(this.taskEventHandler);
     this.taskChangeSequence.Name = "taskChangeSequence";
     //
     // sendAssignmentEmail
     //
     this.sendAssignmentEmail.CC = null;
     this.sendAssignmentEmail.Name = "sendAssignmentEmail";
     activitybind24.Name = "TaskApprovalActivity";
     activitybind24.Path = "TaskIdCreated";
     activitybind25.Name = "TaskApprovalActivity";
     activitybind25.Path = "Parameter.ApprovalConfiguation.URLEmailTemplate";
     activitybind26.Name = "TaskApprovalActivity";
     activitybind26.Path = "Parameter.ApprovalConfiguation.AssignmentEmailTemplate";
     this.sendAssignmentEmail.To = null;
     activitybind27.Name = "TaskApprovalActivity";
     activitybind27.Path = "WorkflowProperties";
     this.sendAssignmentEmail.SetBinding(TVMCORP.TVS.WORKFLOWS.Activities.SendWFTaskEmail.TaskListItemProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind24)));
     this.sendAssignmentEmail.SetBinding(TVMCORP.TVS.WORKFLOWS.Activities.SendWFTaskEmail.TemplateListURLProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind25)));
     this.sendAssignmentEmail.SetBinding(TVMCORP.TVS.WORKFLOWS.Activities.SendWFTaskEmail.TemplateNameProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind26)));
     this.sendAssignmentEmail.SetBinding(TVMCORP.TVS.WORKFLOWS.Activities.SendWFTaskEmail.WorkflowPropertiesProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind27)));
     //
     // checkEscalationDate
     //
     this.checkEscalationDate.Activities.Add(this.isEscalationExist);
     this.checkEscalationDate.Activities.Add(this.isEscalationNotExist);
     this.checkEscalationDate.Name = "checkEscalationDate";
     //
     // checkReminderDate
     //
     this.checkReminderDate.Activities.Add(this.isExist);
     this.checkReminderDate.Activities.Add(this.notExist);
     this.checkReminderDate.Name = "checkReminderDate";
     //
     // persistOnClose2
     //
     this.persistOnClose2.Name = "persistOnClose2";
     //
     // taskCompletedHandler
     //
     this.taskCompletedHandler.EventType = TVMCORP.TVS.WORKFLOWS.MODELS.TaskEventTypes.TaskCompleted;
     this.taskCompletedHandler.Name = "taskCompletedHandler";
     activitybind28.Name = "TaskApprovalActivity";
     activitybind28.Path = "TaskHandlerParameter";
     this.taskCompletedHandler.SetBinding(TVMCORP.TVS.WORKFLOWS.Activities.TaskEventHandler.ParameterProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind28)));
     //
     // completeTask
     //
     this.completeTask.CorrelationToken = correlationtoken1;
     this.completeTask.Name = "completeTask";
     activitybind29.Name = "TaskApprovalActivity";
     activitybind29.Path = "ApprovalInfoTask.Id";
     activitybind30.Name = "TaskApprovalActivity";
     activitybind30.Path = "OutComeText";
     this.completeTask.SetBinding(Microsoft.SharePoint.WorkflowActions.CompleteTask.TaskIdProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind29)));
     this.completeTask.SetBinding(Microsoft.SharePoint.WorkflowActions.CompleteTask.TaskOutcomeProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind30)));
     //
     // updateTask
     //
     correlationtoken2.Name = "taskToken";
     correlationtoken2.OwnerActivityName = "TaskApprovalActivity";
     this.updateTask.CorrelationToken = correlationtoken2;
     this.updateTask.Name = "updateTask";
     activitybind31.Name = "TaskApprovalActivity";
     activitybind31.Path = "ApprovalInfoTask.Id";
     activitybind32.Name = "TaskApprovalActivity";
     activitybind32.Path = "updateTaskPros";
     this.updateTask.MethodInvoking += new System.EventHandler(this.updateTask_ExecuteCode);
     this.updateTask.SetBinding(Microsoft.SharePoint.WorkflowActions.UpdateTask.TaskIdProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind31)));
     this.updateTask.SetBinding(Microsoft.SharePoint.WorkflowActions.UpdateTask.TaskPropertiesProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind32)));
     //
     // customLogToWFHistoryActivity1
     //
     this.customLogToWFHistoryActivity1.Enabled = false;
     this.customLogToWFHistoryActivity1.EventId = Microsoft.SharePoint.Workflow.SPWorkflowHistoryEventType.WorkflowComment;
     activitybind33.Name = "TaskApprovalActivity";
     activitybind33.Path = "TaskDescription";
     activitybind34.Name = "TaskApprovalActivity";
     activitybind34.Path = "ApprovalInfoTask.Status";
     this.customLogToWFHistoryActivity1.Name = "customLogToWFHistoryActivity1";
     activitybind35.Name = "TaskApprovalActivity";
     activitybind35.Path = "WorkflowProperties";
     this.customLogToWFHistoryActivity1.SetBinding(TVMCORP.TVS.WORKFLOWS.Activities.CustomLogToWFHistoryActivity.WorkflowPropertiesProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind35)));
     this.customLogToWFHistoryActivity1.SetBinding(TVMCORP.TVS.WORKFLOWS.Activities.CustomLogToWFHistoryActivity.HistoryDescriptionProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind33)));
     this.customLogToWFHistoryActivity1.SetBinding(TVMCORP.TVS.WORKFLOWS.Activities.CustomLogToWFHistoryActivity.HistoryOutcomeProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind34)));
     //
     // setDescriptionLog
     //
     this.setDescriptionLog.Enabled = false;
     this.setDescriptionLog.Name = "setDescriptionLog";
     this.setDescriptionLog.ExecuteCode += new System.EventHandler(this.logToHistory_ExecuteCode);
     //
     // whileTaskChange
     //
     this.whileTaskChange.Activities.Add(this.taskChangeSequence);
     codecondition13.Condition += new System.EventHandler<System.Workflow.Activities.ConditionalEventArgs>(this.IsNotComplete);
     this.whileTaskChange.Condition = codecondition13;
     this.whileTaskChange.Name = "whileTaskChange";
     activitybind36.Name = "TaskApprovalActivity";
     activitybind36.Path = "AssingeeEmailsList";
     //
     // sendAssignEmailReplicator
     //
     this.sendAssignEmailReplicator.Activities.Add(this.sendAssignmentEmail);
     this.sendAssignEmailReplicator.ExecutionType = System.Workflow.Activities.ExecutionType.Sequence;
     this.sendAssignEmailReplicator.Name = "sendAssignEmailReplicator";
     this.sendAssignEmailReplicator.ChildInitialized += new System.EventHandler<System.Workflow.Activities.ReplicatorChildEventArgs>(this.sendAssignEmailReplicatorChild_Init);
     this.sendAssignEmailReplicator.SetBinding(System.Workflow.Activities.ReplicatorActivity.InitialChildDataProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind36)));
     //
     // setSecurityForTask
     //
     this.setSecurityForTask.Name = "setSecurityForTask";
     this.setSecurityForTask.ExecuteCode += new System.EventHandler(this.setSecurityForTask_ExecuteCode);
     //
     // taskCreatedHandler
     //
     this.taskCreatedHandler.EventType = TVMCORP.TVS.WORKFLOWS.MODELS.TaskEventTypes.TaskCreated;
     this.taskCreatedHandler.Name = "taskCreatedHandler";
     activitybind37.Name = "TaskApprovalActivity";
     activitybind37.Path = "TaskHandlerParameter";
     this.taskCreatedHandler.SetBinding(TVMCORP.TVS.WORKFLOWS.Activities.TaskEventHandler.ParameterProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind37)));
     //
     // setTaskHandlerParameter
     //
     this.setTaskHandlerParameter.Name = "setTaskHandlerParameter";
     this.setTaskHandlerParameter.ExecuteCode += new System.EventHandler(this.setTaskHandlerParameter_ExecuteCode);
     //
     // persistOnClose1
     //
     this.persistOnClose1.Name = "persistOnClose1";
     //
     // createTaskWithContentType
     //
     activitybind38.Name = "TaskApprovalActivity";
     activitybind38.Path = "ApprovalInfoTask.ContentTypeId";
     this.createTaskWithContentType.CorrelationToken = correlationtoken2;
     activitybind39.Name = "TaskApprovalActivity";
     activitybind39.Path = "TaskIdCreated";
     this.createTaskWithContentType.Name = "createTaskWithContentType";
     this.createTaskWithContentType.SpecialPermissions = null;
     activitybind40.Name = "TaskApprovalActivity";
     activitybind40.Path = "ApprovalInfoTask.Id";
     activitybind41.Name = "TaskApprovalActivity";
     activitybind41.Path = "ApprovalInfoTask.TaskProperties";
     this.createTaskWithContentType.MethodInvoking += new System.EventHandler(this.createTaskWithContentType1_MethodInvoking);
     this.createTaskWithContentType.SetBinding(Microsoft.SharePoint.WorkflowActions.CreateTaskWithContentType.ContentTypeIdProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind38)));
     this.createTaskWithContentType.SetBinding(Microsoft.SharePoint.WorkflowActions.CreateTaskWithContentType.TaskPropertiesProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind41)));
     this.createTaskWithContentType.SetBinding(Microsoft.SharePoint.WorkflowActions.CreateTaskWithContentType.TaskIdProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind40)));
     this.createTaskWithContentType.SetBinding(Microsoft.SharePoint.WorkflowActions.CreateTaskWithContentType.ListItemIdProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind39)));
     //
     // escalationSequence
     //
     this.escalationSequence.Activities.Add(this.checkEscalationDate);
     this.escalationSequence.Name = "escalationSequence";
     //
     // reminderSequence
     //
     this.reminderSequence.Activities.Add(this.checkReminderDate);
     this.reminderSequence.Name = "reminderSequence";
     //
     // taskSequence
     //
     this.taskSequence.Activities.Add(this.createTaskWithContentType);
     this.taskSequence.Activities.Add(this.persistOnClose1);
     this.taskSequence.Activities.Add(this.setTaskHandlerParameter);
     this.taskSequence.Activities.Add(this.taskCreatedHandler);
     this.taskSequence.Activities.Add(this.setSecurityForTask);
     this.taskSequence.Activities.Add(this.sendAssignEmailReplicator);
     this.taskSequence.Activities.Add(this.whileTaskChange);
     this.taskSequence.Activities.Add(this.setDescriptionLog);
     this.taskSequence.Activities.Add(this.customLogToWFHistoryActivity1);
     this.taskSequence.Activities.Add(this.updateTask);
     this.taskSequence.Activities.Add(this.completeTask);
     this.taskSequence.Activities.Add(this.taskCompletedHandler);
     this.taskSequence.Activities.Add(this.persistOnClose2);
     this.taskSequence.Name = "taskSequence";
     //
     // taskGroup
     //
     this.taskGroup.Activities.Add(this.taskSequence);
     this.taskGroup.Activities.Add(this.reminderSequence);
     this.taskGroup.Activities.Add(this.escalationSequence);
     this.taskGroup.Name = "taskGroup";
     codecondition14.Condition += new System.EventHandler<System.Workflow.Activities.ConditionalEventArgs>(this.IsStopTaskGroup);
     this.taskGroup.UntilCondition = codecondition14;
     //
     // initialData
     //
     this.initialData.Name = "initialData";
     this.initialData.ExecuteCode += new System.EventHandler(this.initialData_ExecuteCode);
     //
     // TaskApprovalActivity
     //
     this.Activities.Add(this.initialData);
     this.Activities.Add(this.taskGroup);
     this.Name = "TaskApprovalActivity";
     this.CanModifyActivities = false;
 }
Example #5
0
        private void ProcessAutoReplyEmailActivity(ParallelActivity activityList)
        {
            AutoReplyEmail emailActivity = new AutoReplyEmail();
            emailActivity.Name = "AutoReplyEmail";
            SequenceActivity branch = new SequenceActivity();
            branch.Name = "branch1";
            branch.Activities.Add(emailActivity);

            if (activityList != null)
                activityList.Activities.Add(branch);
            else
                workflowDesigner.SequentialWorkflow.Activities.Add(branch);
            
            workflowDesigner.Host.RootComponent.Site.Container.Add(emailActivity);
            workflowDesigner.Host.RootComponent.Site.Container.Add(branch);
        }
Example #6
0
        private void ProcessOutlookNoteActivity(ParallelActivity activityList)
        {
            OutlookNote outlookNoteActivity = new OutlookNote();
            outlookNoteActivity.Name = "CreateOutlookNote";
            SequenceActivity branch = new SequenceActivity();
            branch.Name = "branch2";
            branch.Activities.Add(outlookNoteActivity);

            if (activityList != null)
                activityList.Activities.Add(branch);
            else
                workflowDesigner.SequentialWorkflow.Activities.Add(branch);

            workflowDesigner.Host.RootComponent.Site.Container.Add(outlookNoteActivity);
            workflowDesigner.Host.RootComponent.Site.Container.Add(branch);
        }
        private void InitializeComponent()
        {
            parallel1 = new ParallelActivity();
            sequence1 = new SequenceActivity();
            sequence2 = new SequenceActivity();
            begin = new CodeActivity();
            end = new CodeActivity();
            increment1 = new CodeActivity();
            increment2 = new CodeActivity();
            decrement1 = new CodeActivity();
            decrement2 = new CodeActivity();
            SynchronizedDecrement = new SynchronizationScopeActivity();
            SynchronizedIncrement = new SynchronizationScopeActivity();
            System.Collections.Generic.List<string> stringCollection1 = new System.Collections.Generic.List<string>();
            System.Collections.Generic.List<string> stringCollection2 = new System.Collections.Generic.List<string>();

            this.CanModifyActivities = true;
            // parallel
            this.parallel1.Activities.Add(sequence1);
            this.parallel1.Activities.Add(sequence2);
            this.parallel1.Name = "parallel1";

            // sequences
            this.sequence1.Activities.Add(SynchronizedIncrement);
            this.sequence1.Name = "sequence1";
            this.sequence2.Activities.Add(SynchronizedDecrement);
            this.sequence2.Name = "sequence2";

            // both synchronization activities are set to  the same syncMutex string
            // in order for the parallel activity to provide synchronization guarantees for shared data access to count variable
            this.SynchronizedIncrement.Name = "SynchronizedIncrement";
            stringCollection1.Add("syncMutex");
            this.SynchronizedIncrement.SynchronizationHandles = stringCollection1;
            this.SynchronizedIncrement.Activities.Add(increment1);
            this.SynchronizedIncrement.Activities.Add(increment2);

            this.SynchronizedDecrement.Name = "SynchronizedDecrement";
            stringCollection2.Add("syncMutex");
            this.SynchronizedDecrement.SynchronizationHandles = stringCollection2;
            this.SynchronizedDecrement.Activities.Add(decrement1);
            this.SynchronizedDecrement.Activities.Add(decrement2);

            // code activities
            begin.Name = "begin";
            begin.ExecuteCode += new EventHandler(Begin_ExecuteCode);

            end.Name = "end";
            end.ExecuteCode += new EventHandler(End_ExecuteCode);

            increment1.Name = "increment1";
            increment1.ExecuteCode += new EventHandler(Increment1_ExecuteCode);

            increment2.Name = "increment2";
            increment2.ExecuteCode += new EventHandler(Increment2_ExecuteCode);

            decrement1.Name = "decrement1";
            decrement1.ExecuteCode += new EventHandler(Decrement1_ExecuteCode);

            decrement2.Name = "decrement2";
            decrement2.ExecuteCode += new EventHandler(Decrement2_ExecuteCode);

            // workflow activities
            this.Activities.Add(begin);
            this.Activities.Add(parallel1);
            this.Activities.Add(end);
            this.Name = "SynchronizedActivityWorkflow";
            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;
 }
Example #9
0
		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;

		}
Example #10
0
 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.Runtime.CorrelationToken correlationtoken1 = new System.Workflow.Runtime.CorrelationToken();
     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 codecondition1 = 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();
     this.logToHistoryListActivity2 = new Microsoft.SharePoint.WorkflowActions.LogToHistoryListActivity();
     this.TaskChanged = new Microsoft.SharePoint.WorkflowActions.OnTaskChanged();
     this.logToHistoryListActivity1 = new Microsoft.SharePoint.WorkflowActions.LogToHistoryListActivity();
     this.sequenceActivity1 = new System.Workflow.Activities.SequenceActivity();
     this.TaskActivityLog = new Microsoft.SharePoint.WorkflowActions.LogToHistoryListActivity();
     this.UpdateData = new System.Workflow.Activities.CodeActivity();
     this.completeTask1 = new Microsoft.SharePoint.WorkflowActions.CompleteTask();
     this.WhileTaskNotComplete = new System.Workflow.Activities.WhileActivity();
     this.CreateTask = new Microsoft.SharePoint.WorkflowActions.CreateTaskWithContentType();
     //
     // logToHistoryListActivity2
     //
     this.logToHistoryListActivity2.Duration = System.TimeSpan.Parse("-10675199.02:48:05.4775808");
     this.logToHistoryListActivity2.Enabled = false;
     this.logToHistoryListActivity2.EventId = Microsoft.SharePoint.Workflow.SPWorkflowHistoryEventType.WorkflowComment;
     this.logToHistoryListActivity2.HistoryDescription = "xyyyyyyyyyyyyy";
     this.logToHistoryListActivity2.HistoryOutcome = "yyyyyyyyy";
     this.logToHistoryListActivity2.Name = "logToHistoryListActivity2";
     this.logToHistoryListActivity2.OtherData = "";
     this.logToHistoryListActivity2.UserId = -1;
     //
     // TaskChanged
     //
     activitybind1.Name = "TaskActivity";
     activitybind1.Path = "TaskChanged_AfterProperties";
     activitybind2.Name = "TaskActivity";
     activitybind2.Path = "TaskChanged_BeforeProperties";
     correlationtoken1.Name = "TaskToken";
     correlationtoken1.OwnerActivityName = "TaskActivity";
     this.TaskChanged.CorrelationToken = correlationtoken1;
     this.TaskChanged.Executor = null;
     this.TaskChanged.Name = "TaskChanged";
     activitybind3.Name = "TaskActivity";
     activitybind3.Path = "CreateTask_TaskId";
     this.TaskChanged.Invoked += new System.EventHandler<System.Workflow.Activities.ExternalDataEventArgs>(this.TaskChanged_Invoked);
     this.TaskChanged.SetBinding(Microsoft.SharePoint.WorkflowActions.OnTaskChanged.AfterPropertiesProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind1)));
     this.TaskChanged.SetBinding(Microsoft.SharePoint.WorkflowActions.OnTaskChanged.BeforePropertiesProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind2)));
     this.TaskChanged.SetBinding(Microsoft.SharePoint.WorkflowActions.OnTaskChanged.TaskIdProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind3)));
     //
     // logToHistoryListActivity1
     //
     this.logToHistoryListActivity1.Duration = System.TimeSpan.Parse("-10675199.02:48:05.4775808");
     this.logToHistoryListActivity1.Enabled = false;
     this.logToHistoryListActivity1.EventId = Microsoft.SharePoint.Workflow.SPWorkflowHistoryEventType.WorkflowComment;
     this.logToHistoryListActivity1.HistoryDescription = "xxxxxxxxxxxxxxxxxxxxx";
     this.logToHistoryListActivity1.HistoryOutcome = "x";
     this.logToHistoryListActivity1.Name = "logToHistoryListActivity1";
     this.logToHistoryListActivity1.OtherData = "";
     this.logToHistoryListActivity1.UserId = -1;
     //
     // sequenceActivity1
     //
     this.sequenceActivity1.Activities.Add(this.logToHistoryListActivity1);
     this.sequenceActivity1.Activities.Add(this.TaskChanged);
     this.sequenceActivity1.Activities.Add(this.logToHistoryListActivity2);
     this.sequenceActivity1.Name = "sequenceActivity1";
     //
     // TaskActivityLog
     //
     this.TaskActivityLog.Duration = System.TimeSpan.Parse("-10675199.02:48:05.4775808");
     this.TaskActivityLog.EventId = Microsoft.SharePoint.Workflow.SPWorkflowHistoryEventType.WorkflowComment;
     activitybind4.Name = "TaskActivity";
     activitybind4.Path = "TaskActivityLog_HistoryDescription";
     activitybind5.Name = "TaskActivity";
     activitybind5.Path = "TaskOutcome";
     this.TaskActivityLog.Name = "TaskActivityLog";
     this.TaskActivityLog.OtherData = "";
     this.TaskActivityLog.UserId = -1;
     this.TaskActivityLog.SetBinding(Microsoft.SharePoint.WorkflowActions.LogToHistoryListActivity.HistoryOutcomeProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind5)));
     this.TaskActivityLog.SetBinding(Microsoft.SharePoint.WorkflowActions.LogToHistoryListActivity.HistoryDescriptionProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind4)));
     //
     // UpdateData
     //
     this.UpdateData.Name = "UpdateData";
     this.UpdateData.ExecuteCode += new System.EventHandler(this.UpdateData_ExecuteCode);
     //
     // completeTask1
     //
     this.completeTask1.CorrelationToken = correlationtoken1;
     this.completeTask1.Name = "completeTask1";
     activitybind6.Name = "TaskActivity";
     activitybind6.Path = "CreateTask_TaskId";
     activitybind7.Name = "TaskActivity";
     activitybind7.Path = "TaskOutcome";
     this.completeTask1.MethodInvoking += new System.EventHandler(this.CompleteTask_MethodInvoking);
     this.completeTask1.SetBinding(Microsoft.SharePoint.WorkflowActions.CompleteTask.TaskIdProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind6)));
     this.completeTask1.SetBinding(Microsoft.SharePoint.WorkflowActions.CompleteTask.TaskOutcomeProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind7)));
     //
     // WhileTaskNotComplete
     //
     this.WhileTaskNotComplete.Activities.Add(this.sequenceActivity1);
     codecondition1.Condition += new System.EventHandler<System.Workflow.Activities.ConditionalEventArgs>(this.IsTaskNotCompleted);
     this.WhileTaskNotComplete.Condition = codecondition1;
     this.WhileTaskNotComplete.Name = "WhileTaskNotComplete";
     //
     // CreateTask
     //
     activitybind8.Name = "TaskActivity";
     activitybind8.Path = "TaskContentTypeId";
     this.CreateTask.CorrelationToken = correlationtoken1;
     this.CreateTask.ListItemId = -1;
     this.CreateTask.Name = "CreateTask";
     this.CreateTask.SpecialPermissions = null;
     activitybind9.Name = "TaskActivity";
     activitybind9.Path = "CreateTask_TaskId";
     activitybind10.Name = "TaskActivity";
     activitybind10.Path = "approvalTaskProperties";
     this.CreateTask.MethodInvoking += new System.EventHandler(this.CreateTask_MethodInvoking);
     this.CreateTask.SetBinding(Microsoft.SharePoint.WorkflowActions.CreateTaskWithContentType.ContentTypeIdProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind8)));
     this.CreateTask.SetBinding(Microsoft.SharePoint.WorkflowActions.CreateTaskWithContentType.TaskIdProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind9)));
     this.CreateTask.SetBinding(Microsoft.SharePoint.WorkflowActions.CreateTaskWithContentType.TaskPropertiesProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind10)));
     //
     // TaskActivity
     //
     this.Activities.Add(this.CreateTask);
     this.Activities.Add(this.WhileTaskNotComplete);
     this.Activities.Add(this.completeTask1);
     this.Activities.Add(this.UpdateData);
     this.Activities.Add(this.TaskActivityLog);
     this.Name = "TaskActivity";
     this.CanModifyActivities = false;
 }
 private void InitializeComponent()
 {
     this.CanModifyActivities = true;
     System.Workflow.ComponentModel.ActivityBind activitybind2 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.Runtime.CorrelationToken correlationtoken1 = new System.Workflow.Runtime.CorrelationToken();
     System.Workflow.ComponentModel.ActivityBind activitybind1 = 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.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.ComponentModel.ActivityBind activitybind11 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.Activities.CodeCondition codecondition1 = new System.Workflow.Activities.CodeCondition();
     System.Workflow.Activities.CodeCondition codecondition2 = new System.Workflow.Activities.CodeCondition();
     System.Workflow.Activities.CodeCondition codecondition3 = new System.Workflow.Activities.CodeCondition();
     System.Workflow.ComponentModel.ActivityBind activitybind12 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.ActivityBind activitybind13 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.ActivityBind activitybind14 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.ActivityBind activitybind15 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.ActivityBind activitybind16 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.ActivityBind activitybind17 = new System.Workflow.ComponentModel.ActivityBind();
     this.onTaskDeleted1 = new Microsoft.SharePoint.WorkflowActions.OnTaskDeleted();
     this.onTaskChanged1 = new Microsoft.SharePoint.WorkflowActions.OnTaskChanged();
     this.throwActivity1 = new System.Workflow.ComponentModel.ThrowActivity();
     this.codeActivity2 = new System.Workflow.Activities.CodeActivity();
     this.logToHistoryListActivity5 = new Microsoft.SharePoint.WorkflowActions.LogToHistoryListActivity();
     this.logToHistoryListActivity4 = new Microsoft.SharePoint.WorkflowActions.LogToHistoryListActivity();
     this.completeTask1 = new Microsoft.SharePoint.WorkflowActions.CompleteTask();
     this.eventDrivenActivity2 = new System.Workflow.Activities.EventDrivenActivity();
     this.eventDrivenActivity1 = new System.Workflow.Activities.EventDrivenActivity();
     this.ifElseBranchActivity2 = new System.Workflow.Activities.IfElseBranchActivity();
     this.ifElseBranchActivity1 = new System.Workflow.Activities.IfElseBranchActivity();
     this.listenActivity1 = new System.Workflow.Activities.ListenActivity();
     this.ifElseActivity1 = new System.Workflow.Activities.IfElseActivity();
     this.whileActivity1 = new System.Workflow.Activities.WhileActivity();
     this.logToHistoryListActivity1 = new Microsoft.SharePoint.WorkflowActions.LogToHistoryListActivity();
     this.codeActivity1 = new System.Workflow.Activities.CodeActivity();
     this.createTaskWithContentType1 = new Microsoft.SharePoint.WorkflowActions.CreateTaskWithContentType();
     this.sequenceActivity1 = new System.Workflow.Activities.SequenceActivity();
     activitybind2.Name = "CreateTaskForMultiCT";
     activitybind2.Path = "onTaskDeleted1_AfterProperties1";
     //
     // onTaskDeleted1
     //
     correlationtoken1.Name = "createTaskCT1Token";
     correlationtoken1.OwnerActivityName = "sequenceActivity1";
     this.onTaskDeleted1.CorrelationToken = correlationtoken1;
     this.onTaskDeleted1.Executor = null;
     this.onTaskDeleted1.Name = "onTaskDeleted1";
     activitybind1.Name = "CreateTaskForMultiCT";
     activitybind1.Path = "createTaskWithContentType1_TaskId1";
     this.onTaskDeleted1.Invoked += new System.EventHandler<System.Workflow.Activities.ExternalDataEventArgs>(this.onTaskDeleted1_Invoked);
     this.onTaskDeleted1.SetBinding(Microsoft.SharePoint.WorkflowActions.OnTaskDeleted.AfterPropertiesProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind2)));
     this.onTaskDeleted1.SetBinding(Microsoft.SharePoint.WorkflowActions.OnTaskDeleted.TaskIdProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind1)));
     //
     // onTaskChanged1
     //
     activitybind3.Name = "CreateTaskForMultiCT";
     activitybind3.Path = "onTaskChanged1_AfterProperties1";
     activitybind4.Name = "CreateTaskForMultiCT";
     activitybind4.Path = "onTaskChanged1_BeforeProperties1";
     this.onTaskChanged1.CorrelationToken = correlationtoken1;
     this.onTaskChanged1.Executor = null;
     this.onTaskChanged1.Name = "onTaskChanged1";
     activitybind5.Name = "CreateTaskForMultiCT";
     activitybind5.Path = "createTaskWithContentType1_TaskId1";
     this.onTaskChanged1.Invoked += new System.EventHandler<System.Workflow.Activities.ExternalDataEventArgs>(this.onTaskChanged1_Invoked);
     this.onTaskChanged1.SetBinding(Microsoft.SharePoint.WorkflowActions.OnTaskChanged.AfterPropertiesProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind3)));
     this.onTaskChanged1.SetBinding(Microsoft.SharePoint.WorkflowActions.OnTaskChanged.BeforePropertiesProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind4)));
     this.onTaskChanged1.SetBinding(Microsoft.SharePoint.WorkflowActions.OnTaskChanged.TaskIdProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind5)));
     activitybind6.Name = "CreateTaskForMultiCT";
     activitybind6.Path = "throwActivity1_Fault1";
     //
     // throwActivity1
     //
     this.throwActivity1.FaultType = typeof(System.Exception);
     this.throwActivity1.Name = "throwActivity1";
     this.throwActivity1.SetBinding(System.Workflow.ComponentModel.ThrowActivity.FaultProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind6)));
     //
     // codeActivity2
     //
     this.codeActivity2.Name = "codeActivity2";
     this.codeActivity2.ExecuteCode += new System.EventHandler(this.codeActivity2_ExecuteCode);
     //
     // logToHistoryListActivity5
     //
     this.logToHistoryListActivity5.Duration = System.TimeSpan.Parse("-10675199.02:48:05.4775808");
     this.logToHistoryListActivity5.EventId = Microsoft.SharePoint.Workflow.SPWorkflowHistoryEventType.WorkflowComment;
     activitybind7.Name = "CreateTaskForMultiCT";
     activitybind7.Path = "logToHistoryListActivity5_HistoryDescription1";
     activitybind8.Name = "CreateTaskForMultiCT";
     activitybind8.Path = "logToHistoryListActivity5_HistoryOutcome1";
     this.logToHistoryListActivity5.Name = "logToHistoryListActivity5";
     this.logToHistoryListActivity5.OtherData = "";
     this.logToHistoryListActivity5.UserId = -1;
     this.logToHistoryListActivity5.MethodInvoking += new System.EventHandler(this.logToHistoryListActivity5_MethodInvoking);
     this.logToHistoryListActivity5.SetBinding(Microsoft.SharePoint.WorkflowActions.LogToHistoryListActivity.HistoryDescriptionProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind7)));
     this.logToHistoryListActivity5.SetBinding(Microsoft.SharePoint.WorkflowActions.LogToHistoryListActivity.HistoryOutcomeProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind8)));
     //
     // logToHistoryListActivity4
     //
     this.logToHistoryListActivity4.Duration = System.TimeSpan.Parse("-10675199.02:48:05.4775808");
     this.logToHistoryListActivity4.EventId = Microsoft.SharePoint.Workflow.SPWorkflowHistoryEventType.WorkflowComment;
     activitybind9.Name = "CreateTaskForMultiCT";
     activitybind9.Path = "logToHistoryListActivity4_HistoryDescription1";
     activitybind10.Name = "CreateTaskForMultiCT";
     activitybind10.Path = "logToHistoryListActivity4_HistoryOutcome1";
     this.logToHistoryListActivity4.Name = "logToHistoryListActivity4";
     this.logToHistoryListActivity4.OtherData = "";
     this.logToHistoryListActivity4.UserId = -1;
     this.logToHistoryListActivity4.MethodInvoking += new System.EventHandler(this.logToHistoryListActivity4_MethodInvoking);
     this.logToHistoryListActivity4.SetBinding(Microsoft.SharePoint.WorkflowActions.LogToHistoryListActivity.HistoryDescriptionProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind9)));
     this.logToHistoryListActivity4.SetBinding(Microsoft.SharePoint.WorkflowActions.LogToHistoryListActivity.HistoryOutcomeProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind10)));
     //
     // completeTask1
     //
     this.completeTask1.CorrelationToken = correlationtoken1;
     this.completeTask1.Name = "completeTask1";
     activitybind11.Name = "CreateTaskForMultiCT";
     activitybind11.Path = "createTaskWithContentType1_TaskId1";
     this.completeTask1.TaskOutcome = null;
     this.completeTask1.MethodInvoking += new System.EventHandler(this.completeTask1_MethodInvoking);
     this.completeTask1.SetBinding(Microsoft.SharePoint.WorkflowActions.CompleteTask.TaskIdProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind11)));
     //
     // eventDrivenActivity2
     //
     this.eventDrivenActivity2.Activities.Add(this.onTaskDeleted1);
     this.eventDrivenActivity2.Name = "eventDrivenActivity2";
     //
     // eventDrivenActivity1
     //
     this.eventDrivenActivity1.Activities.Add(this.onTaskChanged1);
     this.eventDrivenActivity1.Name = "eventDrivenActivity1";
     //
     // ifElseBranchActivity2
     //
     this.ifElseBranchActivity2.Activities.Add(this.logToHistoryListActivity5);
     this.ifElseBranchActivity2.Activities.Add(this.codeActivity2);
     this.ifElseBranchActivity2.Activities.Add(this.throwActivity1);
     codecondition1.Condition += new System.EventHandler<System.Workflow.Activities.ConditionalEventArgs>(this.IfElseActivity2_Condition);
     this.ifElseBranchActivity2.Condition = codecondition1;
     this.ifElseBranchActivity2.Name = "ifElseBranchActivity2";
     //
     // ifElseBranchActivity1
     //
     this.ifElseBranchActivity1.Activities.Add(this.completeTask1);
     this.ifElseBranchActivity1.Activities.Add(this.logToHistoryListActivity4);
     codecondition2.Condition += new System.EventHandler<System.Workflow.Activities.ConditionalEventArgs>(this.IfElseActivity1_Condition);
     this.ifElseBranchActivity1.Condition = codecondition2;
     this.ifElseBranchActivity1.Name = "ifElseBranchActivity1";
     //
     // listenActivity1
     //
     this.listenActivity1.Activities.Add(this.eventDrivenActivity1);
     this.listenActivity1.Activities.Add(this.eventDrivenActivity2);
     this.listenActivity1.Name = "listenActivity1";
     //
     // ifElseActivity1
     //
     this.ifElseActivity1.Activities.Add(this.ifElseBranchActivity1);
     this.ifElseActivity1.Activities.Add(this.ifElseBranchActivity2);
     this.ifElseActivity1.Name = "ifElseActivity1";
     //
     // whileActivity1
     //
     this.whileActivity1.Activities.Add(this.listenActivity1);
     codecondition3.Condition += new System.EventHandler<System.Workflow.Activities.ConditionalEventArgs>(this.whileActivity1_Condition);
     this.whileActivity1.Condition = codecondition3;
     this.whileActivity1.Name = "whileActivity1";
     //
     // logToHistoryListActivity1
     //
     this.logToHistoryListActivity1.Duration = System.TimeSpan.Parse("-10675199.02:48:05.4775808");
     this.logToHistoryListActivity1.EventId = Microsoft.SharePoint.Workflow.SPWorkflowHistoryEventType.WorkflowComment;
     activitybind12.Name = "CreateTaskForMultiCT";
     activitybind12.Path = "logToHistoryListActivity1_HistoryDescription1";
     activitybind13.Name = "CreateTaskForMultiCT";
     activitybind13.Path = "logToHistoryListActivity1_HistoryOutcome1";
     this.logToHistoryListActivity1.Name = "logToHistoryListActivity1";
     this.logToHistoryListActivity1.OtherData = "";
     this.logToHistoryListActivity1.UserId = -1;
     this.logToHistoryListActivity1.MethodInvoking += new System.EventHandler(this.logToHistoryListActivity1_MethodInvoking);
     this.logToHistoryListActivity1.SetBinding(Microsoft.SharePoint.WorkflowActions.LogToHistoryListActivity.HistoryDescriptionProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind12)));
     this.logToHistoryListActivity1.SetBinding(Microsoft.SharePoint.WorkflowActions.LogToHistoryListActivity.HistoryOutcomeProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind13)));
     //
     // codeActivity1
     //
     this.codeActivity1.Name = "codeActivity1";
     this.codeActivity1.ExecuteCode += new System.EventHandler(this.codeActivity1_ExecuteCode);
     //
     // createTaskWithContentType1
     //
     activitybind14.Name = "CreateTaskForMultiCT";
     activitybind14.Path = "createTaskWithContentType1_ContentTypeId1";
     this.createTaskWithContentType1.CorrelationToken = correlationtoken1;
     activitybind15.Name = "CreateTaskForMultiCT";
     activitybind15.Path = "createTaskWithContentType1_ListItemId1";
     this.createTaskWithContentType1.Name = "createTaskWithContentType1";
     this.createTaskWithContentType1.SpecialPermissions = null;
     activitybind16.Name = "CreateTaskForMultiCT";
     activitybind16.Path = "createTaskWithContentType1_TaskId1";
     activitybind17.Name = "CreateTaskForMultiCT";
     activitybind17.Path = "createTaskWithContentType1_TaskProperties1";
     this.createTaskWithContentType1.MethodInvoking += new System.EventHandler(this.createTaskWithContentType1_MethodInvoking);
     this.createTaskWithContentType1.SetBinding(Microsoft.SharePoint.WorkflowActions.CreateTaskWithContentType.ContentTypeIdProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind14)));
     this.createTaskWithContentType1.SetBinding(Microsoft.SharePoint.WorkflowActions.CreateTaskWithContentType.ListItemIdProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind15)));
     this.createTaskWithContentType1.SetBinding(Microsoft.SharePoint.WorkflowActions.CreateTaskWithContentType.TaskIdProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind16)));
     this.createTaskWithContentType1.SetBinding(Microsoft.SharePoint.WorkflowActions.CreateTaskWithContentType.TaskPropertiesProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind17)));
     //
     // sequenceActivity1
     //
     this.sequenceActivity1.Activities.Add(this.createTaskWithContentType1);
     this.sequenceActivity1.Activities.Add(this.codeActivity1);
     this.sequenceActivity1.Activities.Add(this.logToHistoryListActivity1);
     this.sequenceActivity1.Activities.Add(this.whileActivity1);
     this.sequenceActivity1.Activities.Add(this.ifElseActivity1);
     this.sequenceActivity1.Name = "sequenceActivity1";
     //
     // CreateTaskForMultiCT
     //
     this.Activities.Add(this.sequenceActivity1);
     this.Name = "CreateTaskForMultiCT";
     this.CanModifyActivities = false;
 }
 private void InitializeComponent()
 {
     this.CanModifyActivities = true;
     CorrelationToken correlationtoken1 = new CorrelationToken();
     CorrelationToken correlationtoken2 = new CorrelationToken();
     this.taskCompleted2 = new TaskCompleted();
     this.createTask2 = new CreateTask();
     this.taskCompleted1 = new TaskCompleted();
     this.createTask1 = new CreateTask();
     this.sequence2 = new SequenceActivity();
     this.sequence1 = new SequenceActivity();
     this.parallel1 = new ParallelActivity();
     //
     // taskCompleted2
     //
     correlationtoken1.Name = "c2";
     correlationtoken1.OwnerActivityName = "sequence2";
     this.taskCompleted2.CorrelationToken = correlationtoken1;
     this.taskCompleted2.EventArgs = null;
     this.taskCompleted2.EventName = "TaskCompleted";
     this.taskCompleted2.InterfaceType = typeof(ITaskService);
     this.taskCompleted2.Name = "taskCompleted2";
     this.taskCompleted2.Sender = null;
     this.taskCompleted2.Invoked += new EventHandler<ExternalDataEventArgs>(this.OnTaskCompleted);
     //
     // createTask2
     //
     this.createTask2.Assignee = "Kim";
     this.createTask2.CorrelationToken = correlationtoken1;
     this.createTask2.InterfaceType = typeof(ITaskService);
     this.createTask2.MethodName = "CreateTask";
     this.createTask2.Name = "createTask2";
     this.createTask2.TaskId = "002";
     this.createTask2.Text = "task 2";
     //
     // taskCompleted1
     //
     correlationtoken2.Name = "c1";
     correlationtoken2.OwnerActivityName = "sequence1";
     this.taskCompleted1.CorrelationToken = correlationtoken2;
     this.taskCompleted1.EventArgs = null;
     this.taskCompleted1.EventName = "TaskCompleted";
     this.taskCompleted1.InterfaceType = typeof(ITaskService);
     this.taskCompleted1.Name = "taskCompleted1";
     this.taskCompleted1.Sender = null;
     this.taskCompleted1.Invoked += new EventHandler<ExternalDataEventArgs>(this.OnTaskCompleted);
     //
     // createTask1
     //
     this.createTask1.Assignee = "Joe";
     this.createTask1.CorrelationToken = correlationtoken2;
     this.createTask1.InterfaceType = typeof(ITaskService);
     this.createTask1.MethodName = "CreateTask";
     this.createTask1.Name = "createTask1";
     this.createTask1.TaskId = "001";
     this.createTask1.Text = "task 1";
     //
     // sequence2
     //
     this.sequence2.Activities.Add(this.createTask2);
     this.sequence2.Activities.Add(this.taskCompleted2);
     this.sequence2.Name = "sequence2";
     //
     // sequence1
     //
     this.sequence1.Activities.Add(this.createTask1);
     this.sequence1.Activities.Add(this.taskCompleted1);
     this.sequence1.Name = "sequence1";
     //
     // parallel1
     //
     this.parallel1.Activities.Add(this.sequence1);
     this.parallel1.Activities.Add(this.sequence2);
     this.parallel1.Name = "parallel1";
     //
     // TaskWorkflow
     //
     this.Activities.Add(this.parallel1);
     this.Name = "TaskWorkflow";
     this.CanModifyActivities = false;
 }
        private void Step_CreateXoml()
        {
            // Root アクティビティ
            RootWorkflowActivityWithData rootActivity = new RootWorkflowActivityWithData();
            rootActivity.Name = "ROOT";
            rootActivity.WorkflowFields.Add(new WorkflowDataField("__list", "System.String"));
            rootActivity.WorkflowFields.Add(new WorkflowDataField("__item", "System.Int32"));
            rootActivity.WorkflowFields.Add(new WorkflowDataField("__context", "Microsoft.SharePoint.WorkflowActions.WorkflowContext"));
            rootActivity.WorkflowFields.Add(new WorkflowDataField("__initParams", "Microsoft.SharePoint.Workflow.SPWorkflowActivationProperties"));
            rootActivity.WorkflowFields.Add(new WorkflowDataField("__workflowId", "System.Guid"));

            // OnWorkflowActivated アクティビティ
            OnWorkflowActivated onWorkflowActivatedActivity = new OnWorkflowActivated();
            CorrelationToken onWorkflowActivatedColToken = new CorrelationToken("refObject");
            onWorkflowActivatedColToken.OwnerActivityName = "ROOT";
            onWorkflowActivatedActivity.CorrelationToken = onWorkflowActivatedColToken;
            ActivityBind onWorkflowActivatedBind = new ActivityBind();
            onWorkflowActivatedBind.Name = "ROOT";
            onWorkflowActivatedBind.Path = "__initParams";
            onWorkflowActivatedActivity.SetBinding(OnWorkflowActivated.WorkflowPropertiesProperty, onWorkflowActivatedBind);
            rootActivity.Activities.Add(onWorkflowActivatedActivity);

            // ApplyActivation アクティビティ
            ApplyActivation applyActivationActivity = new ApplyActivation();
            ActivityBind applyActivationBindContextProp = new ActivityBind();
            applyActivationBindContextProp.Name = "ROOT";
            applyActivationBindContextProp.Path = "__context";
            applyActivationActivity.SetBinding(ApplyActivation.__ContextProperty, applyActivationBindContextProp);
            ActivityBind applyActivationBindWorkflowProp = new ActivityBind();
            applyActivationBindWorkflowProp.Name = "ROOT";
            applyActivationBindWorkflowProp.Path = "__initParams";
            applyActivationActivity.SetBinding(ApplyActivation.__WorkflowPropertiesProperty, applyActivationBindWorkflowProp);
            rootActivity.Activities.Add(applyActivationActivity);

            // Sequence アクティビティ (ステップ 1)
            SequenceActivity step1Activity = new SequenceActivity();
            step1Activity.Description = "ステップ 1";
            for (int i = 0; i < 3; i++)
            {
                // SetField アクティビティ
                if (Tasks[i].SelectedItem == "Field Update")
                {
                    SetFieldActivity setFieldActivity = new SetFieldActivity();
                    string docListGUID = GetListGUIDFromName(SiteLoc.Text, AssocDocLib.Text);
                    setFieldActivity.FieldName = GetFieldInternalName(SiteLoc.Text, docListGUID, FieldNames[i].Text);
                    setFieldActivity.Value = FieldValues[i].Text;

                    ActivityBind contextPropertyBind = new ActivityBind();
                    contextPropertyBind.Name = "ROOT";
                    contextPropertyBind.Path = "__context";
                    setFieldActivity.SetBinding(SetFieldActivity.__ContextProperty, contextPropertyBind);

                    ActivityBind listIdBind = new ActivityBind();
                    listIdBind.Name = "ROOT";
                    listIdBind.Path = "__list";
                    setFieldActivity.SetBinding(SetFieldActivity.__ListIdProperty, listIdBind);

                    ActivityBind listItemBind = new ActivityBind();
                    listItemBind.Name = "ROOT";
                    listItemBind.Path = "__item";
                    setFieldActivity.SetBinding(SetFieldActivity.__ListItemProperty, listItemBind);

                    step1Activity.Activities.Add(setFieldActivity);
                }
                // EMail アクティビティ
                else if (Tasks[i].SelectedItem == "Send Mail")
                {
                    EmailActivity eMailActivity = new EmailActivity();

                    ArrayList toArray = new ArrayList();
                    toArray.Add(MailAddresses[i].Text);
                    eMailActivity.To = toArray;
                    eMailActivity.CC = null;
                    eMailActivity.BCC = null;

                    eMailActivity.Subject = "Custom Workflow Test";
                    eMailActivity.Body = "Hello, SharePoint !";

                    ActivityBind contextPropertyBind = new ActivityBind();
                    contextPropertyBind.Name = "ROOT";
                    contextPropertyBind.Path = "__context";
                    eMailActivity.SetBinding(EmailActivity.__ContextProperty, contextPropertyBind);

                    step1Activity.Activities.Add(eMailActivity);
                }
            }
            rootActivity.Activities.Add(step1Activity);

            // XmlDocument に保存
            MemoryStream xomlMem = new MemoryStream();
            XmlTextWriter xomlWriter = new XmlTextWriter(xomlMem, Encoding.UTF8);
            WorkflowMarkupSerializer xomlSerializer = new WorkflowMarkupSerializer();
            xomlSerializer.Serialize(xomlWriter, rootActivity);
            xomlDoc = new XmlDocument();
            xomlMem.Position = 3; // Attention! : 先頭の BOM (Byte Order Mark) は SharePoint でおかしな動きになる !
            xomlDoc.Load(xomlMem);
            xomlWriter.Close();
            xomlMem.Close();

            // コードも含めたコンパイル (サーバ側) に備え x:Class を追加
            XmlAttribute classAttr = xomlDoc.CreateAttribute("Class", @"http://schemas.microsoft.com/winfx/2006/xaml");
            classAttr.Value = "Microsoft.SharePoint.Workflow.ROOT";
            xomlDoc.ChildNodes[0].Attributes.Append(classAttr);

            // if you use Microsoft.SharePoint.WorkflowActions.dll,
            // this code is needed. (Above notation)
            // xomlDoc.ChildNodes[0].Attributes["xmlns:ns0"].Value = @"clr-namespace:Microsoft.SharePoint.WorkflowActions;Assembly=Microsoft.SharePoint.WorkflowActions, Version=12.0.0.0, Culture=neutral, PublicKeyToken=null";
        }