Пример #1
0
		public WorkFlowIfElse ()
		{
			IfElseActivity ifelse_activity = new IfElseActivity ();
			IfElseBranchActivity branch1 = new IfElseBranchActivity ();
			CodeCondition ifelse_condition1 = new CodeCondition ();
			CodeActivity code_branch1 = new CodeActivity ();
			CodeActivity code_branch2 = new CodeActivity ();
			branch2 = new IfElseBranchActivity ();

			code_branch1.Name ="Code1";
			code_branch2.Name ="Code2";
			code_branch1.ExecuteCode += new EventHandler (ExecuteCode1);
			code_branch2.ExecuteCode += new EventHandler (ExecuteCode2);

			branch1.Activities.Add (code_branch1);
			branch2.Activities.Add (code_branch2);

			ifelse_condition1.Condition += new EventHandler <ConditionalEventArgs> (IfElseCondition1);
			branch1.Condition = ifelse_condition1;

			ifelse_activity.Activities.Add (branch1);
			ifelse_activity.Activities.Add (branch2);

			Activities.Add (ifelse_activity);
		}
Пример #2
0
		public WorkFlowIfElse ()
		{
			IfElseActivity ifelse_activity = new IfElseActivity ();
			IfElseBranchActivity branch1 = new IfElseBranchActivity ();
			CodeCondition ifelse_condition1 = new CodeCondition ();
			DelayActivity delay_activity = new DelayActivity ();
			CodeActivity code_branch1 = new CodeActivity ();
			CodeActivity code_branch2 = new CodeActivity ();
			branch2 = new IfElseBranchActivity ();

			delay_activity.Name = "DelayActivity";
			delay_activity.TimeoutDuration = TimeSpan.Parse ("00:00:05");
			delay_activity.InitializeTimeoutDuration += new EventHandler (DelayActivity_InitializeTimeoutDuration);

			code_branch1.Name ="Code1";
			code_branch2.Name ="Code2";
			code_branch1.ExecuteCode += new EventHandler (ExecuteCode1);
			code_branch2.ExecuteCode += new EventHandler (ExecuteCode2);

			branch1.Activities.Add (code_branch1);
			branch2.Activities.Add (code_branch2);

			ifelse_condition1.Condition += new EventHandler <ConditionalEventArgs> (IfElseCondition1);
			branch1.Condition = ifelse_condition1;

			ifelse_activity.Activities.Add (branch1);
			ifelse_activity.Activities.Add (branch2);

			Activities.Add (delay_activity);
			Activities.Add (ifelse_activity);
		}
Пример #3
0
		public WorkFlowIfElseRule ()
		{
			IfElseActivity ifelse_activity = new IfElseActivity ();
			branch1 = new IfElseBranchActivity ();

			CodeActivity code_branch1 = new CodeActivity ();
			CodeActivity code_branch2 = new CodeActivity ();
			branch2 = new IfElseBranchActivity ();

			code_branch1.Name ="Code1";
			code_branch2.Name ="Code2";
			code_branch1.ExecuteCode += new EventHandler (ExecuteCode1);
			code_branch2.ExecuteCode += new EventHandler (ExecuteCode2);

			branch1.Activities.Add (code_branch1);
			branch2.Activities.Add (code_branch2);

			RuleConditionReference condition1 = new RuleConditionReference ();
			condition1.ConditionName = "Condition1";
			RuleExpressionCondition rc =  new RuleExpressionCondition ("Condition1",
				RulesBinaryOpTest.check_condition);

			definitions.Conditions.Add (rc);
			branch1.Condition = condition1;

			ifelse_activity.Activities.Add (branch1);
			ifelse_activity.Activities.Add (branch2);

			SetValue (RuleDefinitions.RuleDefinitionsProperty, definitions);
			Activities.Add (ifelse_activity);
		}
 private void InitializeComponent()
 {
     this.CanModifyActivities = true;
     System.Workflow.Activities.CodeCondition codecondition1 = new System.Workflow.Activities.CodeCondition();
     System.Workflow.Activities.CodeCondition codecondition2 = new System.Workflow.Activities.CodeCondition();
     this.Airline = new System.Workflow.Activities.CodeActivity();
     this.Car = new System.Workflow.Activities.CodeActivity();
     this.BookingCag = new System.Workflow.Activities.ConditionedActivityGroup();
     codecondition1.Condition += new System.EventHandler<System.Workflow.Activities.ConditionalEventArgs>(this.AirlineCondition);
     //
     // Airline
     //
     this.Airline.Name = "Airline";
     this.Airline.ExecuteCode += new System.EventHandler(this.Airline_ExecuteCode);
     this.Airline.SetValue(System.Workflow.Activities.ConditionedActivityGroup.WhenConditionProperty, codecondition1);
     codecondition2.Condition += new System.EventHandler<System.Workflow.Activities.ConditionalEventArgs>(this.CarCondition);
     //
     // Car
     //
     this.Car.Name = "Car";
     this.Car.ExecuteCode += new System.EventHandler(this.Car_ExecuteCode);
     this.Car.SetValue(System.Workflow.Activities.ConditionedActivityGroup.WhenConditionProperty, codecondition2);
     //
     // BookingCag
     //
     this.BookingCag.Activities.Add(this.Car);
     this.BookingCag.Activities.Add(this.Airline);
     this.BookingCag.Name = "BookingCag";
     //
     // SimpleConditionedActivityGroupWorkflow
     //
     this.Activities.Add(this.BookingCag);
     this.Name = "SimpleConditionedActivityGroupWorkflow";
     this.CanModifyActivities = false;
 }
Пример #5
0
        	public SimpleWorkFlow ()
		{
			CodeActivity ca1 = new CodeActivity ();
			ca1.ExecuteCode += new EventHandler (ExecuteCode1);
			ca1.ExecuteCode += new EventHandler (ExecuteCode2);
			Activities.Add (ca1);
		}
 private void InitializeComponent()
 {
     this.CanModifyActivities = true;
     this.code1 = new System.Workflow.Activities.CodeActivity();
     this.delay1 = new System.Workflow.Activities.DelayActivity();
     this.code2 = new System.Workflow.Activities.CodeActivity();
     // 
     // code1
     // 
     this.code1.Name = "code1";
     this.code1.ExecuteCode += new System.EventHandler(this.OnCode1ExecuteCode);
     // 
     // delay1
     // 
     this.delay1.Name = "delay1";
     this.delay1.TimeoutDuration = System.TimeSpan.Parse("00:00:05");
     // 
     // code2
     // 
     this.code2.Name = "code2";
     this.code2.ExecuteCode += new System.EventHandler(this.OnCode2ExecuteCode);
     // 
     // DelayWorkflow
     // 
     this.Activities.Add(this.code1);
     this.Activities.Add(this.delay1);
     this.Activities.Add(this.code2);
     this.Name = "PersistenceServicesWorkflow";
     this.CanModifyActivities = false;
 }
Пример #7
0
            public override ValidationErrorCollection Validate(ValidationManager manager, object obj)
            {
                ValidationErrorCollection errors = new ValidationErrorCollection();

                CodeActivity code = obj as CodeActivity;

                if (code == null)
                {
                    throw new InvalidOperationException();
                }

                // This violates the P || C validation condition, but we are compiling with csc.exe here!
                if (code.GetInvocationList <EventHandler>(CodeActivity.ExecuteCodeEvent).Length == 0 &&
                    code.GetBinding(CodeActivity.ExecuteCodeEvent) == null)
                {
                    Hashtable hashtable = code.GetValue(WorkflowMarkupSerializer.EventsProperty) as Hashtable;
                    if (hashtable == null || hashtable["ExecuteCode"] == null)
                    {
                        errors.Add(ValidationError.GetNotSetValidationError("ExecuteCode"));
                    }
                }

                errors.AddRange(base.Validate(manager, obj));
                return(errors);
            }
Пример #8
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.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;
 }
Пример #9
0
		public void GetActivityByNameAndParent ()
		{
			SequentialWorkflowActivity sq = new SequentialWorkflowActivity ();
			IfElseActivity ifelse_activity = new IfElseActivity ();
			IfElseBranchActivity branch1 = new IfElseBranchActivity ();
			CodeActivity code_branch1 = new CodeActivity ();
			CodeActivity code_branch2 = new CodeActivity ();
			IfElseBranchActivity branch2 = new IfElseBranchActivity ();
			Activity activity;

			code_branch1.Name ="Code1";
			code_branch2.Name ="Code2";
			ifelse_activity.Name = "IfElse";
			sq.Name = "Root";
			branch1.Activities.Add (code_branch1);
			branch2.Activities.Add (code_branch2);
			ifelse_activity.Activities.Add (branch1);
			ifelse_activity.Activities.Add (branch2);
			sq.Activities.Add (ifelse_activity);

			// Getting Code1 activity from root
			activity = sq.GetActivityByName ("Code1", true);
			Assert.AreEqual (code_branch1, activity, "C1#1");

			activity = sq.GetActivityByName ("Code1", false);
			Assert.AreEqual (code_branch1, activity, "C1#2");

			// Getting Root activity from IfElse
			activity = ifelse_activity.GetActivityByName ("Root", true);
			Assert.AreEqual (null, activity, "C1#3");

			activity = ifelse_activity.GetActivityByName ("Root", false);
			Assert.AreEqual (sq, activity, "C1#4");

			// Getting Root activity from Code1
			activity = code_branch1.GetActivityByName ("Root", true);
			Assert.AreEqual (null, activity, "C1#5");

			activity = code_branch1.GetActivityByName ("Root", false);
			Assert.AreEqual (sq, activity, "C1#6");

			// Getting Ifelse activity from Code1
			activity = code_branch1.GetActivityByName ("IfElse", true);
			Assert.AreEqual (null, activity, "C1#7");

			activity = code_branch2.GetActivityByName ("IfElse", false);
			Assert.AreEqual (ifelse_activity, activity, "C1#8");

			// Parent checks
			Assert.AreEqual (ifelse_activity, branch1.Parent, "C1#9");
			Assert.AreEqual (ifelse_activity, branch2.Parent, "C1#10");
			Assert.AreEqual (null, sq.Parent, "C1#11");
		}
        private void InitializeComponent()
        {
            Name = "MonitorJobs";
            CanModifyActivities = true;

            MonitorJobsCodeActivity = new System.Workflow.Activities.CodeActivity();
            MonitorJobsCodeActivity.Name = "MonitorSmaJobsCodeActivity";
            MonitorJobsCodeActivity.ExecuteCode += new System.EventHandler(MonitorJobsCodeActivity_ExecuteCode);
            Activities.Add(MonitorJobsCodeActivity);

            CanModifyActivities = false;
        }
Пример #11
0
        void Container0()
        {
            //ReceiveActivity.CanCreateInstance
            //<snippet0>
            ReceiveActivity receiveRequestShippingQuote;
            CodeActivity    doAcceptQuoteRequest;

            doAcceptQuoteRequest        = new System.Workflow.Activities.CodeActivity();
            receiveRequestShippingQuote = new System.Workflow.Activities.ReceiveActivity();

            receiveRequestShippingQuote.Activities.Add(doAcceptQuoteRequest);
            receiveRequestShippingQuote.CanCreateInstance = true;
            //</snippet0>
        }
        private void InitializeComponent()
        {
            Name = "StartRunbook";

            CanModifyActivities = true;

            StartRunbookCodeActivity = new System.Workflow.Activities.CodeActivity();
            StartRunbookCodeActivity.Name = "StartRunbookCodeActivity";
            StartRunbookCodeActivity.ExecuteCode += new System.EventHandler(this.StartRunbookCodeActivity_ExecuteCode);
            Activities.Add(StartRunbookCodeActivity);

            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();
     Sage.SalesLogix.Process.Activities.RelativeDateTime relativedatetime1 = new Sage.SalesLogix.Process.Activities.RelativeDateTime();
     System.Workflow.Activities.Rules.RuleSetReference rulesetreference1 = new System.Workflow.Activities.Rules.RuleSetReference();
     this.createToDo1 = new Sage.SalesLogix.Process.Activities.CreateToDo();
     this.codeActivity1 = new System.Workflow.Activities.CodeActivity();
     this.policyActivity1 = new System.Workflow.Activities.PolicyActivity();
     activitybind1.Name = "Workflow2";
     activitybind1.Path = "CurrentEntity.Id";
     activitybind2.Name = "Workflow2";
     activitybind2.Path = "CurrentEntity.ModifyUser";
     //
     // createToDo1
     //
     this.createToDo1.ActivityDescription = "Created from Process";
     this.createToDo1.Description = "Created from Process";
     this.createToDo1.Name = "createToDo1";
     relativedatetime1.BaseDateTime = new System.DateTime(2008, 10, 2, 0, 0, 0, 0);
     relativedatetime1.Offset = System.TimeSpan.Parse("00:00:00");
     relativedatetime1.RelativeTo = Sage.SalesLogix.Process.Activities.RelativeTo.UtcNow;
     this.createToDo1.StartDate = relativedatetime1;
     this.createToDo1.SetBinding(Sage.SalesLogix.Process.Activities.CreateActivityBase.AccountIdProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind1)));
     this.createToDo1.SetBinding(Sage.SalesLogix.Process.Activities.CreateActivityBase.UserIdProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind2)));
     //
     // codeActivity1
     //
     this.codeActivity1.Name = "codeActivity1";
     this.codeActivity1.ExecuteCode += new System.EventHandler(this.codeActivity1_ExecuteCode);
     //
     // policyActivity1
     //
     this.policyActivity1.Name = "policyActivity1";
     rulesetreference1.RuleSetName = "Rule Set1";
     this.policyActivity1.RuleSetReference = rulesetreference1;
     //
     // Workflow2
     //
     this.Activities.Add(this.policyActivity1);
     this.Activities.Add(this.codeActivity1);
     this.Activities.Add(this.createToDo1);
     this.Description = "y 2nd Workflow";
     this.EntityId = null;
     this.EntityType = typeof(Sage.Entity.Interfaces.IAccount);
     this.Name = "Workflow2";
     this.CanModifyActivities = false;
 }
Пример #14
0
		public void TestClearContains ()
		{
			ActivityCollection ac = new ActivityCollection (new ParallelActivity ());
			CodeActivity ca1 = new CodeActivity ();
			CodeActivity ca2 = new CodeActivity ();
			CodeActivity ca3 = new CodeActivity ();
			ac.Add (ca1);
			ac.Add (ca2);
			Assert.AreEqual (true, ac.Contains (ca2), "C2#1");
			Assert.AreEqual (false, ac.Contains (ca3), "C2#2");
			Assert.AreEqual (2, ac.Count, "C2#3");
			ac.Clear ();
			Assert.AreEqual (false, ac.Contains (ca3), "C2#4");
			Assert.AreEqual (0, ac.Count, "C2#5");
		}
Пример #15
0
		public void TestAddRemove ()
		{
			ActivityCollection ac = new ActivityCollection (new ParallelActivity ());
			CodeActivity ca1 = new CodeActivity ();
			CodeActivity ca2 = new CodeActivity ();
			CodeActivity ca3 = new CodeActivity ();
			ac.Add (ca1);
			Assert.AreEqual (1, ac.Count, "C1#1");
			ac.Add (ca2);
			Assert.AreEqual (2, ac.Count, "C1#2");
			ac.Add (ca3);
			Assert.AreEqual (3, ac.Count, "C1#3");
			ac.Remove (ca2);
			Assert.AreEqual (2, ac.Count, "C1#4");
			ac.RemoveAt (0);
			Assert.AreEqual (1, ac.Count, "C1#5");
			Assert.AreEqual (ca3, ac[0], "C1#6");
		}
 private void InitializeComponent()
 {
     this.CanModifyActivities = true;
     System.Workflow.Activities.Rules.RuleConditionReference ruleconditionreference1 = new System.Workflow.Activities.Rules.RuleConditionReference();
     this.VPApproval = new System.Workflow.Activities.CodeActivity();
     this.ManagerApproval = new System.Workflow.Activities.CodeActivity();
     this.ifElseBranch2 = new System.Workflow.Activities.IfElseBranchActivity();
     this.ifElseBranch1 = new System.Workflow.Activities.IfElseBranchActivity();
     this.ifElse1 = new System.Workflow.Activities.IfElseActivity();
     //
     // VPApproval
     //
     this.VPApproval.Name = "VPApproval";
     this.VPApproval.ExecuteCode += new System.EventHandler(this.VPApprovalHandler);
     //
     // ManagerApproval
     //
     this.ManagerApproval.Name = "ManagerApproval";
     this.ManagerApproval.ExecuteCode += new System.EventHandler(this.ManagerApprovalHandler);
     //
     // ifElseBranch2
     //
     this.ifElseBranch2.Activities.Add(this.VPApproval);
     this.ifElseBranch2.Name = "ifElseBranch2";
     //
     // ifElseBranch1
     //
     this.ifElseBranch1.Activities.Add(this.ManagerApproval);
     ruleconditionreference1.ConditionName = "OrderValueCheck";
     this.ifElseBranch1.Condition = ruleconditionreference1;
     this.ifElseBranch1.Name = "ifElseBranch1";
     //
     // ifElse1
     //
     this.ifElse1.Activities.Add(this.ifElseBranch1);
     this.ifElse1.Activities.Add(this.ifElseBranch2);
     this.ifElse1.Name = "ifElse1";
     //
     // IfElseWorkflow
     //
     this.Activities.Add(this.ifElse1);
     this.Name = "IfElseWorkflow";
     this.CanModifyActivities = false;
 }
Пример #17
0
            public override ValidationErrorCollection Validate(ValidationManager manager, object obj)
            {
                ValidationErrorCollection errors = new ValidationErrorCollection();
                CodeActivity activity            = obj as CodeActivity;

                if (activity == null)
                {
                    throw new InvalidOperationException();
                }
                if ((activity.GetInvocationList <EventHandler>(CodeActivity.ExecuteCodeEvent).Length == 0) && (activity.GetBinding(CodeActivity.ExecuteCodeEvent) == null))
                {
                    Hashtable hashtable = activity.GetValue(WorkflowMarkupSerializer.EventsProperty) as Hashtable;
                    if ((hashtable == null) || (hashtable["ExecuteCode"] == null))
                    {
                        errors.Add(ValidationError.GetNotSetValidationError("ExecuteCode"));
                    }
                }
                errors.AddRange(base.Validate(manager, obj));
                return(errors);
            }
		public void TestActivitySaveLoadMethods () {
			CodeActivity expected = new CodeActivity ("TestCode");

			byte [] serialized;
			using (MemoryStream ms = new MemoryStream ()) {
				expected.Save (ms);
				ms.Position = 0L;
				serialized = ms.ToArray ();
			}

			Activity actual = null;
			using (MemoryStream ms2 = new MemoryStream (serialized)) {
				ms2.Position = 0L;
				actual = Activity.Load (ms2, null);
			}

			Assert.IsNotNull (actual, "#C2#1");
			Assert.IsTrue (actual is CodeActivity, "#C2#2");
			Assert.AreEqual (expected.Name, actual.Name, "#C2#3");
			Assert.AreEqual (expected.QualifiedName, ((CodeActivity)actual).QualifiedName, "#C2#4");
		}
Пример #19
0
        	public SimpleWorkFlowDelay ()
		{
			CanModifyActivities = true;
			CodeCondition codecondition1 = new CodeCondition ();
			BackUpFile = new CodeActivity ();
			WhileFilesToBackup = new WhileActivity ();
			DelaySystemReady = new DelayActivity ();

			BackUpFile.ExecuteCode += new EventHandler (BackUpFile_ExecuteCode);

			WhileFilesToBackup.Activities.Add(BackUpFile);
			codecondition1.Condition += new EventHandler <ConditionalEventArgs>(MoreFiles);

			WhileFilesToBackup.Condition =  codecondition1;

			DelaySystemReady.TimeoutDuration = TimeSpan.Parse ("00:00:02");

			Activities.Add (DelaySystemReady);
			Activities.Add (WhileFilesToBackup);
			Name = "SimpleWorkFlowDelay";
			CanModifyActivities = false;
		}
 private void InitializeComponent()
 {
     this.CanModifyActivities = true;
     this.ExtractAttachments = new System.Workflow.Activities.CodeActivity();
     Persist = new PersistOnClose();
     //
     // Persit
     //
     this.Persist.Name = "Persist";
     //
     // ExtractAttachments
     //
     this.ExtractAttachments.Name = "ExtractAttachments";
     this.ExtractAttachments.ExecuteCode += new System.EventHandler(this.ExtractAttachmentsExecuteCode);
     //
     // ExtractIPAttachments
     //
     this.Activities.Add(Persist);
     this.Activities.Add(this.ExtractAttachments);
     this.Name = "ExtractIPAttachments";
     this.CanModifyActivities = false;
 }
 private void InitializeComponent()
 {
     this.CanModifyActivities = true;
     this.delayActivity2 = new System.Workflow.Activities.DelayActivity();
     this.codeActivity2 = new System.Workflow.Activities.CodeActivity();
     this.delayActivity1 = new System.Workflow.Activities.DelayActivity();
     this.codeActivity1 = new System.Workflow.Activities.CodeActivity();
     //
     // delayActivity2
     //
     this.delayActivity2.Name = "delayActivity2";
     this.delayActivity2.TimeoutDuration = System.TimeSpan.Parse("00:00:05");
     //
     // codeActivity2
     //
     this.codeActivity2.Name = "codeActivity2";
     this.codeActivity2.ExecuteCode += new System.EventHandler(this.codeActivity2_ExecuteCode);
     //
     // delayActivity1
     //
     this.delayActivity1.Name = "delayActivity1";
     this.delayActivity1.TimeoutDuration = System.TimeSpan.Parse("00:00:05");
     //
     // codeActivity1
     //
     this.codeActivity1.Name = "codeActivity1";
     this.codeActivity1.ExecuteCode += new System.EventHandler(this.codeActivity1_ExecuteCode);
     //
     // Workflow1
     //
     this.Activities.Add(this.codeActivity1);
     this.Activities.Add(this.delayActivity1);
     this.Activities.Add(this.codeActivity2);
     this.Activities.Add(this.delayActivity2);
     this.Name = "Workflow1";
     this.CanModifyActivities = false;
 }
Пример #22
0
        public bool OnCodeActivityAdded()
        {

            CodeActivity codeActivity = new CodeActivity();

            ActivityProperties activityPropertiesForm = new ActivityProperties();
            activityPropertiesForm.ShowDialog();
            if (activityPropertiesForm.Result == DialogResult.OK)
            {
                foreach (Activity activity in this.rootActivity.Activities)
                {
                    if (activity.Name.Equals(activityPropertiesForm.ActivityName, StringComparison.OrdinalIgnoreCase))
                    {
                        MessageBox.Show(this.parent, "Cannot add new CodeActivity. The CodeActivity with name '" + activityPropertiesForm.ActivityName + "' already exists.", this.parent.Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
                        return false;
                    }
                }

                codeActivity.Name = activityPropertiesForm.ActivityName;
                codeActivity.Description = activityPropertiesForm.Description;

                this.rootActivity.Activities.Add(codeActivity);
                this.designerHost.RootComponent.Site.Container.Add(codeActivity);
                this.workflowView.Update();
            }

            return true;
        }
Пример #23
0
        // Loads precreated workflow. The function is similar to the above function except
        // instead of creating an empty workflow we create workflow with contents
        internal void LoadDefaultWorkflow()
        {
            Clear();

            this.designSurface = new WorkflowDesignSurface(this);
            WorkflowLoader loader = new WorkflowLoader();
            this.designSurface.BeginLoad(loader);
            
            this.designerHost = GetService(typeof(IDesignerHost)) as IDesignerHost;
            if (this.designerHost != null)
            {
                this.rootActivity = (SequentialWorkflowActivity)this.designerHost.CreateComponent(typeof(SequentialWorkflowActivity));
                this.rootActivity.Name = "Service1";

                CodeActivity codeActivity1 = new CodeActivity();
                this.rootActivity.Activities.Add(codeActivity1);
                this.designerHost.RootComponent.Site.Container.Add(codeActivity1);

                this.workflowView = new WorkflowView(this.designSurface as IServiceProvider);
                this.workflowView.AddDesignerMessageFilter(new CustomMessageFilter(this.designSurface as IServiceProvider, this.workflowView, loader));

                Controls.Add(this.workflowView);
                this.designerHost.Activate();

                ISelectionService selectionService = (ISelectionService)GetService(typeof(ISelectionService));
                if (selectionService != null)
                {
                    selectionService.SelectionChanged += new EventHandler(OnSelectionChanged);
                    IComponent[] selection = new IComponent[] { rootActivity };
                    selectionService.SetSelectedComponents(selection);
                }
            }
        }
 /// <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.Activities.CodeCondition codecondition1 = new System.Workflow.Activities.CodeCondition();
     this.logToHistoryListActivity2 = new Microsoft.SharePoint.WorkflowActions.LogToHistoryListActivity();
     this.logToHistoryListActivity1 = new Microsoft.SharePoint.WorkflowActions.LogToHistoryListActivity();
     this.ifElseBranchActivity2 = new System.Workflow.Activities.IfElseBranchActivity();
     this.IfContractNumberGenerated = new System.Workflow.Activities.IfElseBranchActivity();
     this.ifElseActivity1 = new System.Workflow.Activities.IfElseActivity();
     this.CNGeneration = new System.Workflow.Activities.CodeActivity();
     //
     // logToHistoryListActivity2
     //
     this.logToHistoryListActivity2.Duration = System.TimeSpan.Parse("-10675199.02:48:05.4775808");
     this.logToHistoryListActivity2.EventId = Microsoft.SharePoint.Workflow.SPWorkflowHistoryEventType.WorkflowComment;
     this.logToHistoryListActivity2.HistoryDescription = "Unable to generate contract number";
     this.logToHistoryListActivity2.HistoryOutcome = "";
     this.logToHistoryListActivity2.Name = "logToHistoryListActivity2";
     this.logToHistoryListActivity2.OtherData = "";
     this.logToHistoryListActivity2.UserId = -1;
     //
     // logToHistoryListActivity1
     //
     this.logToHistoryListActivity1.Duration = System.TimeSpan.Parse("-10675199.02:48:05.4775808");
     this.logToHistoryListActivity1.EventId = Microsoft.SharePoint.Workflow.SPWorkflowHistoryEventType.WorkflowComment;
     this.logToHistoryListActivity1.HistoryDescription = "New contract number was generated";
     activitybind1.Name = "GenerateContractNumber";
     activitybind1.Path = "ContactNumberGenerated";
     this.logToHistoryListActivity1.Name = "logToHistoryListActivity1";
     this.logToHistoryListActivity1.OtherData = "";
     this.logToHistoryListActivity1.UserId = -1;
     this.logToHistoryListActivity1.SetBinding(Microsoft.SharePoint.WorkflowActions.LogToHistoryListActivity.HistoryOutcomeProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind1)));
     //
     // ifElseBranchActivity2
     //
     this.ifElseBranchActivity2.Activities.Add(this.logToHistoryListActivity2);
     this.ifElseBranchActivity2.Name = "ifElseBranchActivity2";
     //
     // IfContractNumberGenerated
     //
     this.IfContractNumberGenerated.Activities.Add(this.logToHistoryListActivity1);
     codecondition1.Condition += new System.EventHandler<System.Workflow.Activities.ConditionalEventArgs>(this.IsCNGenerated);
     this.IfContractNumberGenerated.Condition = codecondition1;
     this.IfContractNumberGenerated.Name = "IfContractNumberGenerated";
     //
     // ifElseActivity1
     //
     this.ifElseActivity1.Activities.Add(this.IfContractNumberGenerated);
     this.ifElseActivity1.Activities.Add(this.ifElseBranchActivity2);
     this.ifElseActivity1.Name = "ifElseActivity1";
     //
     // CNGeneration
     //
     this.CNGeneration.Name = "CNGeneration";
     this.CNGeneration.ExecuteCode += new System.EventHandler(this.CNGeneration_ExecuteCode);
     //
     // GenerateContractNumber
     //
     this.Activities.Add(this.CNGeneration);
     this.Activities.Add(this.ifElseActivity1);
     this.Name = "GenerateContractNumber";
     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;
 }
		private void InitializeComponent ()
		{
			CanModifyActivities = true;
			CodeCondition codecondition1 = new CodeCondition ();
			ProofReadSetStateQualityNotOK = new SetStateActivity ();
			ProofReadSetStateQualityOK = new SetStateActivity ();
			ProofReadElseBranchActivity2 = new IfElseBranchActivity ();
			ProofReadElseBranch = new IfElseBranchActivity ();
			PrintFinalizationCode = new CodeActivity ();
			PrintSetState = new SetStateActivity ();
			PrintCode = new CodeActivity ();
			PrintDelay = new DelayActivity ();
			ProofReadIfElse = new IfElseActivity ();
			ProofReadDelay = new DelayActivity ();
			CreateInitCode = new CodeActivity ();
			DocumentSetState = new SetStateActivity ();
			CodeDocument = new CodeActivity ();
			CreateDelay = new DelayActivity ();
			PrintFinalization = new StateFinalizationActivity ();
			PrintEventDriven = new EventDrivenActivity ();
			ProofReadEventDriven = new EventDrivenActivity ();
			CreateInitialization = new StateInitializationActivity ();
			CreateDriven = new EventDrivenActivity ();
			End = new StateActivity ();
			Print = new StateActivity ();
			ProofRead = new StateActivity ();
			Create = new StateActivity ();

			// ProofReadSetStateQualityNotOK
			ProofReadSetStateQualityNotOK.Name = "ProofReadSetStateQualityNotOK";
			ProofReadSetStateQualityNotOK.TargetStateName = "Print";

			// ProofReadSetStateQualityOK
			ProofReadSetStateQualityOK.Name = "ProofReadSetStateQualityOK";
			ProofReadSetStateQualityOK.TargetStateName = "End";

			// ProofReadElseBranchActivity2
			ProofReadElseBranchActivity2.Activities.Add (ProofReadSetStateQualityNotOK);
			ProofReadElseBranchActivity2.Name = "ProofReadElseBranchActivity2";

			// ProofReadElseBranch
			ProofReadElseBranch.Activities.Add (ProofReadSetStateQualityOK);
			codecondition1.Condition += new EventHandler <ConditionalEventArgs> (ProofReadIfElseConditionFunction);
			ProofReadElseBranch.Condition = codecondition1;
			ProofReadElseBranch.Name = "ProofReadElseBranch";

			// PrintFinalizationCode
			PrintFinalizationCode.Name = "PrintFinalizationCode";
			PrintFinalizationCode.ExecuteCode += new EventHandler (PrintFinalizationCodeFunction);

			// PrintSetState
			PrintSetState.Name = "PrintSetState";
			PrintSetState.TargetStateName = "End";

			// PrintCode
			PrintCode.Name = "PrintCode";
			PrintCode.ExecuteCode += new EventHandler (PrintCodeFunction);

			// PrintDelay
			PrintDelay.Name = "PrintDelay";
			PrintDelay.TimeoutDuration = TimeSpan.Parse ("00:00:02");

			// ProofReadIfElse
			ProofReadIfElse.Activities.Add (ProofReadElseBranch);
			ProofReadIfElse.Activities.Add (ProofReadElseBranchActivity2);
			ProofReadIfElse.Description = "Quality is OK?";
			ProofReadIfElse.Name = "ProofReadIfElse";

			// ProofReadDelay
			ProofReadDelay.Name = "ProofReadDelay";
			ProofReadDelay.TimeoutDuration = TimeSpan.Parse ("00:00:01");

			// CreateInitCode
			CreateInitCode.Name = "CreateInitCode";
			CreateInitCode.ExecuteCode += new EventHandler (CreateInitCodeFunction);

			// DocumentSetState
			DocumentSetState.Name = "DocumentSetState";
			DocumentSetState.TargetStateName = "ProofRead";

			// CodeDocument
			CodeDocument.Name = "CodeDocument";
			CodeDocument.ExecuteCode += new EventHandler (CodeDocumentFunction);

			// CreateDelay
			CreateDelay.Name = "CreateDelay";
			CreateDelay.TimeoutDuration = TimeSpan.Parse ("00:00:01");

			// PrintFinalization
			PrintFinalization.Activities.Add (PrintFinalizationCode);
			PrintFinalization.Name = "PrintFinalization";

			// PrintEventDriven
			PrintEventDriven.Activities.Add (PrintDelay);
			PrintEventDriven.Activities.Add (PrintCode);
			PrintEventDriven.Activities.Add (PrintSetState);
			PrintEventDriven.Name = "PrintEventDriven";

			// ProofReadEventDriven
			ProofReadEventDriven.Activities.Add (ProofReadDelay);
			ProofReadEventDriven.Activities.Add (ProofReadIfElse);
			ProofReadEventDriven.Name = "ProofReadEventDriven";

			// CreateInitialization
			CreateInitialization.Activities.Add (CreateInitCode);
			CreateInitialization.Name = "CreateInitialization";

			// CreateDriven
			CreateDriven.Activities.Add (CreateDelay);
			CreateDriven.Activities.Add (CodeDocument);
			CreateDriven.Activities.Add (DocumentSetState);
			CreateDriven.Name = "CreateDriven";

			// End
			End.Name = "End";

			// Print
			Print.Activities.Add (PrintEventDriven);
			Print.Activities.Add (PrintFinalization);
			Print.Name = "Print";

			// ProofRead
			ProofRead.Activities.Add (ProofReadEventDriven);
			ProofRead.Name = "ProofRead";

			// Create
			Create.Activities.Add (CreateDriven);
			Create.Activities.Add (CreateInitialization);
			Create.Name = "Create";

			// DocumentCreation
			Activities.Add (Create);
			Activities.Add (ProofRead);
			Activities.Add (Print);
			Activities.Add (End);
			CompletedStateName = "End";
			InitialStateName = "Create";
			Name = "DocumentCreation";
			CanModifyActivities = false;
		}
Пример #28
0
        private void btnCreateSequentialWorkflow_Click(Object sender, EventArgs e)
        {
            ConnectionStringSettings persistenceConnectionString = cboPersistenceService.SelectedItem as ConnectionStringSettings;
            ConnectionStringSettings trackingConnectionString = cboTrackingService.SelectedItem as ConnectionStringSettings;
            if (persistenceConnectionString == null)
            {
                MessageBox.Show("No connection string selected for persistence service.", "WFTools Samples",
                    MessageBoxButtons.OK, MessageBoxIcon.Information);

                return;
            }

            String workflowRuntimeKey = String.Format("{0}_{1}_{2}",
                persistenceConnectionString.Name, 
                trackingConnectionString == null ? "None" : trackingConnectionString.Name,
                chkUseLocalTransactions.Checked);

            SampleWorkFlowRuntime workflowRuntime;
            if (!this.loadedWorkflowRuntimes.TryGetValue(workflowRuntimeKey, out workflowRuntime))
            {
                workflowRuntime = new SampleWorkFlowRuntime(persistenceConnectionString,
                    trackingConnectionString, chkUseLocalTransactions.Checked);

                workflowRuntime.WorkflowTerminated += workflowRuntime_WorkflowTerminated;
                workflowRuntime.ServicesExceptionNotHandled += workflowRuntime_ServicesExceptionNotHandled;

                this.loadedWorkflowRuntimes.Add(workflowRuntimeKey, workflowRuntime);
            }

            // create a new sequential workflow
            WorkflowInstance workflowInstance = workflowRuntime.CreateSequentialWorkflow();

            if (chkModifyWorkflow.Checked)
            {
                Activity rootActivity = workflowInstance.GetWorkflowDefinition();
                WorkflowChanges workflowChanges = new WorkflowChanges(rootActivity);

                // modify the workflow
                Activity activityToRemove = workflowChanges.TransientWorkflow.GetActivityByName("codeActivity3");
                CompositeActivity parentActivity = activityToRemove.Parent;

                parentActivity.Activities.Remove(activityToRemove);

                CodeActivity codeActivity = new CodeActivity("TestChangeActivity");
                codeActivity.ExecuteCode +=
                    delegate { Trace.WriteLine("Test Change Activity executed..."); };

                parentActivity.Activities.Add(codeActivity);

                workflowInstance.ApplyWorkflowChanges(workflowChanges);
            }

            workflowInstance.Start();

            ManualWorkflowSchedulerService schedulerService = workflowRuntime.GetService<ManualWorkflowSchedulerService>();
            schedulerService.RunWorkflow(workflowInstance.InstanceId);
        }
Пример #29
0
		public SequentialWorkflow ()
		{
			CodeActivity code = new CodeActivity ();
			code.ExecuteCode += OnCodeExecute;
			Activities.Add (code);
		}
Пример #30
0
 private void InitializeComponent()
 {
     this.CanModifyActivities = true;
     System.Workflow.Activities.Rules.RuleConditionReference ruleconditionreference1 = new System.Workflow.Activities.Rules.RuleConditionReference();
     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.Runtime.CorrelationToken correlationtoken2 = new System.Workflow.Runtime.CorrelationToken();
     System.Workflow.ComponentModel.ActivityBind activitybind4 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.Activities.Rules.RuleConditionReference ruleconditionreference2 = new System.Workflow.Activities.Rules.RuleConditionReference();
     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();
     this.CreateRejectedEmail = new System.Workflow.Activities.CodeActivity();
     this.CreateApprovalEmail = new System.Workflow.Activities.CodeActivity();
     this.IsRejected = new System.Workflow.Activities.IfElseBranchActivity();
     this.IsApproved = new System.Workflow.Activities.IfElseBranchActivity();
     this.onTaskChanged = new Microsoft.SharePoint.WorkflowActions.OnTaskChanged();
     this.log_TaskComplete = new Microsoft.SharePoint.WorkflowActions.LogToHistoryListActivity();
     this.SendStatusEmail = new Microsoft.SharePoint.WorkflowActions.SendEmail();
     this.ifElseActivity = new System.Workflow.Activities.IfElseActivity();
     this.TaskComplete = new Microsoft.SharePoint.WorkflowActions.CompleteTask();
     this.WhileNotApproved = new System.Workflow.Activities.WhileActivity();
     this.log_TaskCreated = new Microsoft.SharePoint.WorkflowActions.LogToHistoryListActivity();
     //this.SendApproverEmail = new Microsoft.SharePoint.WorkflowActions.SendEmail();
     this.onTaskCreated = new Microsoft.SharePoint.WorkflowActions.OnTaskCreated();
     this.CreateAppovalTask = new Microsoft.SharePoint.WorkflowActions.CreateTask();
     this.OnWorkFlowActivated = new Microsoft.SharePoint.WorkflowActions.OnWorkflowActivated();
     //
     // CreateRejectedEmail
     //
     this.CreateRejectedEmail.Name = "CreateRejectedEmail";
     this.CreateRejectedEmail.ExecuteCode += new System.EventHandler(this.CreateRejectedEmail_ExecuteCode);
     //
     // CreateApprovalEmail
     //
     this.CreateApprovalEmail.Name = "CreateApprovalEmail";
     this.CreateApprovalEmail.ExecuteCode += new System.EventHandler(this.CreateApprovalEmail_ExecuteCode);
     //
     // IsRejected
     //
     this.IsRejected.Activities.Add(this.CreateRejectedEmail);
     this.IsRejected.Name = "IsRejected";
     //
     // IsApproved
     //
     this.IsApproved.Activities.Add(this.CreateApprovalEmail);
     ruleconditionreference1.ConditionName = "CheckApprovalStatus";
     this.IsApproved.Condition = ruleconditionreference1;
     this.IsApproved.Name = "IsApproved";
     //
     // onTaskChanged
     //
     activitybind1.Name = "DAF";
     activitybind1.Path = "onTaskChanged_AfterProperties";
     activitybind2.Name = "DAF";
     activitybind2.Path = "onTaskChanged_BeforeProperties";
     correlationtoken1.Name = "taskToken";
     correlationtoken1.OwnerActivityName = "DAF";
     this.onTaskChanged.CorrelationToken = correlationtoken1;
     this.onTaskChanged.Executor = null;
     this.onTaskChanged.Name = "onTaskChanged";
     activitybind3.Name = "CreateAppovalTask";
     activitybind3.Path = "TaskId";
     this.onTaskChanged.Invoked += new System.EventHandler<System.Workflow.Activities.ExternalDataEventArgs>(this.OnApprovalTaskChanged_Invoked);
     this.onTaskChanged.SetBinding(Microsoft.SharePoint.WorkflowActions.OnTaskChanged.TaskIdProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind3)));
     this.onTaskChanged.SetBinding(Microsoft.SharePoint.WorkflowActions.OnTaskChanged.AfterPropertiesProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind1)));
     this.onTaskChanged.SetBinding(Microsoft.SharePoint.WorkflowActions.OnTaskChanged.BeforePropertiesProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind2)));
     //
     // log_TaskComplete
     //
     this.log_TaskComplete.Duration = System.TimeSpan.Parse("-10675199.02:48:05.4775808");
     this.log_TaskComplete.EventId = Microsoft.SharePoint.Workflow.SPWorkflowHistoryEventType.WorkflowComment;
     this.log_TaskComplete.HistoryDescription = "";
     this.log_TaskComplete.HistoryOutcome = "";
     this.log_TaskComplete.Name = "log_TaskComplete";
     this.log_TaskComplete.OtherData = "";
     this.log_TaskComplete.UserId = -1;
     this.log_TaskComplete.MethodInvoking += new System.EventHandler(this.log_TaskComplete_Method);
     //
     // SendStatusEmail
     //
     this.SendStatusEmail.BCC = null;
     this.SendStatusEmail.Body = null;
     this.SendStatusEmail.CC = null;
     correlationtoken2.Name = "workflowToken";
     correlationtoken2.OwnerActivityName = "DAF";
     this.SendStatusEmail.CorrelationToken = correlationtoken2;
     this.SendStatusEmail.From = null;
     this.SendStatusEmail.Headers = null;
     this.SendStatusEmail.IncludeStatus = false;
     this.SendStatusEmail.Name = "SendStatusEmail";
     this.SendStatusEmail.Subject = null;
     this.SendStatusEmail.To = null;
     //
     // ifElseActivity
     //
     this.ifElseActivity.Activities.Add(this.IsApproved);
     this.ifElseActivity.Activities.Add(this.IsRejected);
     this.ifElseActivity.Name = "ifElseActivity";
     //
     // TaskComplete
     //
     this.TaskComplete.CorrelationToken = correlationtoken1;
     this.TaskComplete.Name = "TaskComplete";
     activitybind4.Name = "CreateAppovalTask";
     activitybind4.Path = "TaskId";
     this.TaskComplete.TaskOutcome = null;
     this.TaskComplete.SetBinding(Microsoft.SharePoint.WorkflowActions.CompleteTask.TaskIdProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind4)));
     //
     // WhileNotApproved
     //
     this.WhileNotApproved.Activities.Add(this.onTaskChanged);
     ruleconditionreference2.ConditionName = "WhileCheck";
     this.WhileNotApproved.Condition = ruleconditionreference2;
     this.WhileNotApproved.Name = "WhileNotApproved";
     //
     // log_TaskCreated
     //
     this.log_TaskCreated.Duration = System.TimeSpan.Parse("-10675199.02:48:05.4775808");
     this.log_TaskCreated.EventId = Microsoft.SharePoint.Workflow.SPWorkflowHistoryEventType.WorkflowComment;
     this.log_TaskCreated.HistoryDescription = "";
     this.log_TaskCreated.HistoryOutcome = "";
     this.log_TaskCreated.Name = "log_TaskCreated";
     this.log_TaskCreated.OtherData = "";
     this.log_TaskCreated.UserId = -1;
     this.log_TaskCreated.MethodInvoking += new System.EventHandler(this.logTaskCreated);
     //
     // SendApproverEmail
     //
     //this.SendApproverEmail.BCC = null;
     //this.SendApproverEmail.Body = null;
     //this.SendApproverEmail.CC = null;
     //this.SendApproverEmail.CorrelationToken = correlationtoken2;
     //this.SendApproverEmail.From = null;
     //this.SendApproverEmail.Headers = null;
     //this.SendApproverEmail.IncludeStatus = false;
     //this.SendApproverEmail.Name = "SendApproverEmail";
     //this.SendApproverEmail.Subject = null;
     //this.SendApproverEmail.To = null;
     //
     // onTaskCreated
     //
     activitybind5.Name = "DAF";
     activitybind5.Path = "onTaskCreated_AfterProperties";
     this.onTaskCreated.CorrelationToken = correlationtoken1;
     this.onTaskCreated.Executor = null;
     this.onTaskCreated.Name = "onTaskCreated";
     activitybind6.Name = "CreateAppovalTask";
     activitybind6.Path = "TaskId";
     this.onTaskCreated.SetBinding(Microsoft.SharePoint.WorkflowActions.OnTaskCreated.TaskIdProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind6)));
     this.onTaskCreated.SetBinding(Microsoft.SharePoint.WorkflowActions.OnTaskCreated.AfterPropertiesProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind5)));
     //
     // CreateAppovalTask
     //
     this.CreateAppovalTask.CorrelationToken = correlationtoken1;
     this.CreateAppovalTask.ListItemId = -1;
     this.CreateAppovalTask.Name = "CreateAppovalTask";
     this.CreateAppovalTask.SpecialPermissions = null;
     this.CreateAppovalTask.TaskId = new System.Guid("6d20c38a-2e72-4937-bced-9280e09fd45a");
     activitybind7.Name = "DAF";
     activitybind7.Path = "TaskProperties";
     this.CreateAppovalTask.MethodInvoking += new System.EventHandler(this.CreateAppovalTask_MethodInvoking);
     this.CreateAppovalTask.SetBinding(Microsoft.SharePoint.WorkflowActions.CreateTask.TaskPropertiesProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind7)));
     //
     // OnWorkFlowActivated
     //
     this.OnWorkFlowActivated.CorrelationToken = correlationtoken2;
     this.OnWorkFlowActivated.EventName = "OnWorkflowActivated";
     this.OnWorkFlowActivated.Name = "OnWorkFlowActivated";
     activitybind8.Name = "DAF";
     activitybind8.Path = "workflowProperties";
     this.OnWorkFlowActivated.SetBinding(Microsoft.SharePoint.WorkflowActions.OnWorkflowActivated.WorkflowPropertiesProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind8)));
     //
     // DAF
     //
     this.Activities.Add(this.OnWorkFlowActivated);
     this.Activities.Add(this.CreateAppovalTask);
     this.Activities.Add(this.onTaskCreated);
     //this.Activities.Add(this.SendApproverEmail);
     this.Activities.Add(this.log_TaskCreated);
     this.Activities.Add(this.WhileNotApproved);
     this.Activities.Add(this.TaskComplete);
     this.Activities.Add(this.ifElseActivity);
     this.Activities.Add(this.SendStatusEmail);
     this.Activities.Add(this.log_TaskComplete);
     this.Name = "DAF";
     this.CanModifyActivities = false;
 }
Пример #31
0
 private void InitializeComponent()
 {
     this.CanModifyActivities = true;
     System.Workflow.Activities.Rules.RuleConditionReference ruleconditionreference1 = new System.Workflow.Activities.Rules.RuleConditionReference();
     System.Workflow.ComponentModel.ActivityBind activitybind1 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding1 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding2 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.ComponentModel.ActivityBind activitybind2 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding3 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding4 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.ComponentModel.ActivityBind activitybind3 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding5 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.ComponentModel.ActivityBind activitybind4 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding6 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.ComponentModel.ActivityBind activitybind5 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding7 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.ComponentModel.ActivityBind activitybind6 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding8 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.Activities.Rules.RuleConditionReference ruleconditionreference2 = new System.Workflow.Activities.Rules.RuleConditionReference();
     System.Workflow.Activities.Rules.RuleConditionReference ruleconditionreference3 = new System.Workflow.Activities.Rules.RuleConditionReference();
     System.Workflow.Activities.Rules.RuleConditionReference ruleconditionreference4 = new System.Workflow.Activities.Rules.RuleConditionReference();
     System.Workflow.Activities.Rules.RuleConditionReference ruleconditionreference5 = new System.Workflow.Activities.Rules.RuleConditionReference();
     System.Workflow.Activities.Rules.RuleConditionReference ruleconditionreference6 = new System.Workflow.Activities.Rules.RuleConditionReference();
     System.Workflow.Activities.Rules.RuleConditionReference ruleconditionreference7 = new System.Workflow.Activities.Rules.RuleConditionReference();
     System.Workflow.Activities.Rules.RuleConditionReference ruleconditionreference8 = new System.Workflow.Activities.Rules.RuleConditionReference();
     System.Workflow.Activities.Rules.RuleConditionReference ruleconditionreference9 = new System.Workflow.Activities.Rules.RuleConditionReference();
     System.Workflow.Activities.Rules.RuleConditionReference ruleconditionreference10 = new System.Workflow.Activities.Rules.RuleConditionReference();
     System.Workflow.Activities.Rules.RuleConditionReference ruleconditionreference11 = new System.Workflow.Activities.Rules.RuleConditionReference();
     System.Workflow.Activities.Rules.RuleConditionReference ruleconditionreference12 = new System.Workflow.Activities.Rules.RuleConditionReference();
     System.Workflow.Activities.Rules.RuleConditionReference ruleconditionreference13 = new System.Workflow.Activities.Rules.RuleConditionReference();
     System.Workflow.Activities.Rules.RuleConditionReference ruleconditionreference14 = new System.Workflow.Activities.Rules.RuleConditionReference();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding9 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding10 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding11 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.ComponentModel.ActivityBind activitybind7 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding12 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.ComponentModel.ActivityBind activitybind8 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding13 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.ComponentModel.ActivityBind activitybind9 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding14 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.Activities.Rules.RuleConditionReference ruleconditionreference15 = new System.Workflow.Activities.Rules.RuleConditionReference();
     System.Workflow.ComponentModel.ActivityBind activitybind10 = new System.Workflow.ComponentModel.ActivityBind();
     System.Workflow.ComponentModel.WorkflowParameterBinding workflowparameterbinding15 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     this.setStateActivity3 = new System.Workflow.Activities.SetStateActivity();
     this.AuthFailed = new System.Workflow.Activities.CallExternalMethodActivity();
     this.SetMenuState = new System.Workflow.Activities.SetStateActivity();
     this.ifElseBranchActivity2 = new System.Workflow.Activities.IfElseBranchActivity();
     this.ifElseBranchActivity1 = new System.Workflow.Activities.IfElseBranchActivity();
     this.callExternalMethodActivity7 = new System.Workflow.Activities.CallExternalMethodActivity();
     this.setStateActivity10 = new System.Workflow.Activities.SetStateActivity();
     this.callExternalMethodActivity11 = new System.Workflow.Activities.CallExternalMethodActivity();
     this.codeActivity2 = new System.Workflow.Activities.CodeActivity();
     this.callExternalMethodActivity12 = new System.Workflow.Activities.CallExternalMethodActivity();
     this.callExternalMethodActivity2 = new System.Workflow.Activities.CallExternalMethodActivity();
     this.callExternalMethodActivity3 = new System.Workflow.Activities.CallExternalMethodActivity();
     this.callExternalMethodActivity5 = new System.Workflow.Activities.CallExternalMethodActivity();
     this.setStateActivity9 = new System.Workflow.Activities.SetStateActivity();
     this.ViewCurrentCardNumber = new System.Workflow.Activities.CallExternalMethodActivity();
     this.SetSelectLanguageState = new System.Workflow.Activities.SetStateActivity();
     this.setStateActivity1 = new System.Workflow.Activities.SetStateActivity();
     this.ExitFromBalance = new System.Workflow.Activities.SetStateActivity();
     this.ViewCurrentPin = new System.Workflow.Activities.CallExternalMethodActivity();
     this.ifElseActivity1 = new System.Workflow.Activities.IfElseActivity();
     this.setStateActivity8 = new System.Workflow.Activities.SetStateActivity();
     this.codeActivity1 = new System.Workflow.Activities.CodeActivity();
     this.setStateActivity4 = new System.Workflow.Activities.SetStateActivity();
     this.setStateActivity5 = new System.Workflow.Activities.SetStateActivity();
     this.codeActivity8 = new System.Workflow.Activities.CodeActivity();
     this.setStateActivity7 = new System.Workflow.Activities.SetStateActivity();
     this.codeActivity7 = new System.Workflow.Activities.CodeActivity();
     this.setStateActivity6 = new System.Workflow.Activities.SetStateActivity();
     this.codeActivity5 = new System.Workflow.Activities.CodeActivity();
     this.ifElseBranchActivity13 = new System.Workflow.Activities.IfElseBranchActivity();
     this.ifElseBranchActivity12 = new System.Workflow.Activities.IfElseBranchActivity();
     this.ifElseBranchActivity11 = new System.Workflow.Activities.IfElseBranchActivity();
     this.ifElseBranchActivity10 = new System.Workflow.Activities.IfElseBranchActivity();
     this.ifElseBranchActivity9 = new System.Workflow.Activities.IfElseBranchActivity();
     this.ifElseBranchActivity6 = new System.Workflow.Activities.IfElseBranchActivity();
     this.ifElseBranchActivity5 = new System.Workflow.Activities.IfElseBranchActivity();
     this.ifElseBranchActivity8 = new System.Workflow.Activities.IfElseBranchActivity();
     this.ifElseBranchActivity7 = new System.Workflow.Activities.IfElseBranchActivity();
     this.ifElseBranchActivity4 = new System.Workflow.Activities.IfElseBranchActivity();
     this.ifElseBranchActivity3 = new System.Workflow.Activities.IfElseBranchActivity();
     this.cancellationHandlerActivity1 = new System.Workflow.ComponentModel.CancellationHandlerActivity();
     this.compensatableSequenceActivity5 = new System.Workflow.Activities.CompensatableSequenceActivity();
     this.compensatableSequenceActivity4 = new System.Workflow.Activities.CompensatableSequenceActivity();
     this.compensatableSequenceActivity3 = new System.Workflow.Activities.CompensatableSequenceActivity();
     this.compensatableSequenceActivity2 = new System.Workflow.Activities.CompensatableSequenceActivity();
     this.compensatableSequenceActivity1 = new System.Workflow.Activities.CompensatableSequenceActivity();
     this.ifElseActivity5 = new System.Workflow.Activities.IfElseActivity();
     this.handleExternalEventActivity3 = new System.Workflow.Activities.HandleExternalEventActivity();
     this.callExternalMethodActivity6 = new System.Workflow.Activities.CallExternalMethodActivity();
     this.ifElseActivity4 = new System.Workflow.Activities.IfElseActivity();
     this.handleExternalEventActivity2 = new System.Workflow.Activities.HandleExternalEventActivity();
     this.callExternalMethodActivity4 = new System.Workflow.Activities.CallExternalMethodActivity();
     this.callExternalMethodActivity10 = new System.Workflow.Activities.CallExternalMethodActivity();
     this.callExternalMethodActivity8 = new System.Workflow.Activities.CallExternalMethodActivity();
     this.ReadCardIfElse = new System.Workflow.Activities.IfElseActivity();
     this.ReadCardNumber = new System.Workflow.Activities.HandleExternalEventActivity();
     this.DisplayWelcomeMessage = new System.Workflow.Activities.CallExternalMethodActivity();
     this.InitCode = new System.Workflow.Activities.CodeActivity();
     this.ifElseActivity3 = new System.Workflow.Activities.IfElseActivity();
     this.handleExternalEventActivity1 = new System.Workflow.Activities.HandleExternalEventActivity();
     this.callExternalMethodActivity9 = new System.Workflow.Activities.CallExternalMethodActivity();
     this.ifElseActivity2 = new System.Workflow.Activities.IfElseActivity();
     this.GetPinHandle = new System.Workflow.Activities.HandleExternalEventActivity();
     this.callExternalMethodActivity1 = new System.Workflow.Activities.CallExternalMethodActivity();
     this.setStateActivity2 = new System.Workflow.Activities.SetStateActivity();
     this.conditionedActivityGroup1 = new System.Workflow.Activities.ConditionedActivityGroup();
     this.GetActionToDo = new System.Workflow.Activities.HandleExternalEventActivity();
     this.ViewMenuText = new System.Workflow.Activities.CallExternalMethodActivity();
     this.SetAuthState = new System.Workflow.Activities.SetStateActivity();
     this.GetLanguageHandle = new System.Workflow.Activities.HandleExternalEventActivity();
     this.ViewLanguageMenu = new System.Workflow.Activities.CallExternalMethodActivity();
     this.eventDrivenActivity2 = new System.Workflow.Activities.EventDrivenActivity();
     this.stateInitializationActivity3 = new System.Workflow.Activities.StateInitializationActivity();
     this.eventDrivenActivity1 = new System.Workflow.Activities.EventDrivenActivity();
     this.stateInitializationActivity2 = new System.Workflow.Activities.StateInitializationActivity();
     this.handleExternalEventActivity5 = new System.Workflow.Activities.HandleExternalEventActivity();
     this.handleExternalEventActivity6 = new System.Workflow.Activities.HandleExternalEventActivity();
     this.stateInitializationActivity7 = new System.Workflow.Activities.StateInitializationActivity();
     this.stateInitializationActivity5 = new System.Workflow.Activities.StateInitializationActivity();
     this.EnterCardEvent = new System.Workflow.Activities.EventDrivenActivity();
     this.Init = new System.Workflow.Activities.StateInitializationActivity();
     this.MenuOrExit = new System.Workflow.Activities.EventDrivenActivity();
     this.InitBalace = new System.Workflow.Activities.StateInitializationActivity();
     this.GetPin = new System.Workflow.Activities.EventDrivenActivity();
     this.InitAuth = new System.Workflow.Activities.StateInitializationActivity();
     this.stateInitializationActivity1 = new System.Workflow.Activities.StateInitializationActivity();
     this.SelectActionToDo = new System.Workflow.Activities.EventDrivenActivity();
     this.InitMenu = new System.Workflow.Activities.StateInitializationActivity();
     this.GetLanguage = new System.Workflow.Activities.EventDrivenActivity();
     this.InitLanguage = new System.Workflow.Activities.StateInitializationActivity();
     this.EnterNewPin = new System.Workflow.Activities.StateActivity();
     this.EnterOldPin = new System.Workflow.Activities.StateActivity();
     this.NumHandler = new System.Workflow.Activities.EventDrivenActivity();
     this.ActionHandler = new System.Workflow.Activities.EventDrivenActivity();
     this.Deposit = new System.Workflow.Activities.StateActivity();
     this.Withdrawal = new System.Workflow.Activities.StateActivity();
     this.EnterCard = new System.Workflow.Activities.StateActivity();
     this.ViewBalance = new System.Workflow.Activities.StateActivity();
     this.Authenticate = new System.Workflow.Activities.StateActivity();
     this.Final = new System.Workflow.Activities.StateActivity();
     this.Menu = new System.Workflow.Activities.StateActivity();
     this.SelectLanguage = new System.Workflow.Activities.StateActivity();
     //
     // setStateActivity3
     //
     this.setStateActivity3.Name = "setStateActivity3";
     this.setStateActivity3.TargetStateName = "Final";
     //
     // AuthFailed
     //
     this.AuthFailed.InterfaceType = typeof(Interfaces.IFormService);
     this.AuthFailed.MethodName = "AuthFailed";
     this.AuthFailed.Name = "AuthFailed";
     //
     // SetMenuState
     //
     this.SetMenuState.Name = "SetMenuState";
     this.SetMenuState.TargetStateName = "Menu";
     //
     // ifElseBranchActivity2
     //
     this.ifElseBranchActivity2.Activities.Add(this.AuthFailed);
     this.ifElseBranchActivity2.Activities.Add(this.setStateActivity3);
     this.ifElseBranchActivity2.Name = "ifElseBranchActivity2";
     //
     // ifElseBranchActivity1
     //
     this.ifElseBranchActivity1.Activities.Add(this.SetMenuState);
     ruleconditionreference1.ConditionName = "IsAuth";
     this.ifElseBranchActivity1.Condition = ruleconditionreference1;
     this.ifElseBranchActivity1.Name = "ifElseBranchActivity1";
     //
     // callExternalMethodActivity7
     //
     this.callExternalMethodActivity7.InterfaceType = typeof(Interfaces.IFormService);
     this.callExternalMethodActivity7.MethodName = "SendBackMessage";
     this.callExternalMethodActivity7.Name = "callExternalMethodActivity7";
     activitybind1.Name = "BankomatsWorkflow";
     activitybind1.Path = "newPIN";
     workflowparameterbinding1.ParameterName = "message";
     workflowparameterbinding1.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind1)));
     this.callExternalMethodActivity7.ParameterBindings.Add(workflowparameterbinding1);
     //
     // setStateActivity10
     //
     this.setStateActivity10.Name = "setStateActivity10";
     this.setStateActivity10.TargetStateName = "Menu";
     //
     // callExternalMethodActivity11
     //
     this.callExternalMethodActivity11.InterfaceType = typeof(Interfaces.IFormService);
     this.callExternalMethodActivity11.MethodName = "SendBackMessageLine";
     this.callExternalMethodActivity11.Name = "callExternalMethodActivity11";
     workflowparameterbinding2.ParameterName = "message";
     workflowparameterbinding2.Value = "\"Ja pomenjal pin\"";
     this.callExternalMethodActivity11.ParameterBindings.Add(workflowparameterbinding2);
     //
     // codeActivity2
     //
     this.codeActivity2.Name = "codeActivity2";
     this.codeActivity2.ExecuteCode += new System.EventHandler(this.codeActivity2_ExecuteCode_1);
     //
     // callExternalMethodActivity12
     //
     this.callExternalMethodActivity12.InterfaceType = typeof(Interfaces.IFormService);
     this.callExternalMethodActivity12.MethodName = "SendBackMessage";
     this.callExternalMethodActivity12.Name = "callExternalMethodActivity12";
     activitybind2.Name = "BankomatsWorkflow";
     activitybind2.Path = "newPIN";
     workflowparameterbinding3.ParameterName = "message";
     workflowparameterbinding3.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind2)));
     this.callExternalMethodActivity12.ParameterBindings.Add(workflowparameterbinding3);
     //
     // callExternalMethodActivity2
     //
     this.callExternalMethodActivity2.InterfaceType = typeof(Interfaces.IFormService);
     this.callExternalMethodActivity2.MethodName = "SendBackMessage";
     this.callExternalMethodActivity2.Name = "callExternalMethodActivity2";
     workflowparameterbinding4.ParameterName = "message";
     workflowparameterbinding4.Value = "\"Ti sosew\"";
     this.callExternalMethodActivity2.ParameterBindings.Add(workflowparameterbinding4);
     //
     // callExternalMethodActivity3
     //
     this.callExternalMethodActivity3.InterfaceType = typeof(Interfaces.IFormService);
     this.callExternalMethodActivity3.MethodName = "SendBackMessage";
     this.callExternalMethodActivity3.Name = "callExternalMethodActivity3";
     activitybind3.Name = "BankomatsWorkflow";
     activitybind3.Path = "oldPIN";
     workflowparameterbinding5.ParameterName = "message";
     workflowparameterbinding5.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind3)));
     this.callExternalMethodActivity3.ParameterBindings.Add(workflowparameterbinding5);
     //
     // callExternalMethodActivity5
     //
     this.callExternalMethodActivity5.InterfaceType = typeof(Interfaces.IFormService);
     this.callExternalMethodActivity5.MethodName = "SendBackMessage";
     this.callExternalMethodActivity5.Name = "callExternalMethodActivity5";
     activitybind4.Name = "BankomatsWorkflow";
     activitybind4.Path = "oldPIN";
     workflowparameterbinding6.ParameterName = "message";
     workflowparameterbinding6.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind4)));
     this.callExternalMethodActivity5.ParameterBindings.Add(workflowparameterbinding6);
     //
     // setStateActivity9
     //
     this.setStateActivity9.Name = "setStateActivity9";
     this.setStateActivity9.TargetStateName = "EnterNewPin";
     //
     // ViewCurrentCardNumber
     //
     this.ViewCurrentCardNumber.InterfaceType = typeof(Interfaces.IFormService);
     this.ViewCurrentCardNumber.MethodName = "SendBackMessage";
     this.ViewCurrentCardNumber.Name = "ViewCurrentCardNumber";
     activitybind5.Name = "BankomatsWorkflow";
     activitybind5.Path = "currentAccountNumber";
     workflowparameterbinding7.ParameterName = "message";
     workflowparameterbinding7.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind5)));
     this.ViewCurrentCardNumber.ParameterBindings.Add(workflowparameterbinding7);
     //
     // SetSelectLanguageState
     //
     this.SetSelectLanguageState.Name = "SetSelectLanguageState";
     this.SetSelectLanguageState.TargetStateName = "SelectLanguage";
     //
     // setStateActivity1
     //
     this.setStateActivity1.Name = "setStateActivity1";
     this.setStateActivity1.TargetStateName = "Menu";
     //
     // ExitFromBalance
     //
     this.ExitFromBalance.Name = "ExitFromBalance";
     this.ExitFromBalance.TargetStateName = "Final";
     //
     // ViewCurrentPin
     //
     this.ViewCurrentPin.InterfaceType = typeof(Interfaces.IFormService);
     this.ViewCurrentPin.MethodName = "SendBackMessage";
     this.ViewCurrentPin.Name = "ViewCurrentPin";
     activitybind6.Name = "BankomatsWorkflow";
     activitybind6.Path = "tryPIN";
     workflowparameterbinding8.ParameterName = "message";
     workflowparameterbinding8.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind6)));
     this.ViewCurrentPin.ParameterBindings.Add(workflowparameterbinding8);
     //
     // ifElseActivity1
     //
     this.ifElseActivity1.Activities.Add(this.ifElseBranchActivity1);
     this.ifElseActivity1.Activities.Add(this.ifElseBranchActivity2);
     this.ifElseActivity1.Name = "ifElseActivity1";
     //
     // setStateActivity8
     //
     this.setStateActivity8.Name = "setStateActivity8";
     this.setStateActivity8.TargetStateName = "EnterOldPin";
     //
     // codeActivity1
     //
     this.codeActivity1.Name = "codeActivity1";
     this.codeActivity1.ExecuteCode += new System.EventHandler(this.ChangeMenu);
     //
     // setStateActivity4
     //
     this.setStateActivity4.Name = "setStateActivity4";
     this.setStateActivity4.TargetStateName = "Final";
     //
     // setStateActivity5
     //
     this.setStateActivity5.Name = "setStateActivity5";
     this.setStateActivity5.TargetStateName = "Deposit";
     //
     // codeActivity8
     //
     this.codeActivity8.Name = "codeActivity8";
     this.codeActivity8.ExecuteCode += new System.EventHandler(this.ChangeMenu);
     //
     // setStateActivity7
     //
     this.setStateActivity7.Name = "setStateActivity7";
     this.setStateActivity7.TargetStateName = "Withdrawal";
     //
     // codeActivity7
     //
     this.codeActivity7.Name = "codeActivity7";
     this.codeActivity7.ExecuteCode += new System.EventHandler(this.ChangeMenu);
     //
     // setStateActivity6
     //
     this.setStateActivity6.Name = "setStateActivity6";
     this.setStateActivity6.TargetStateName = "ViewBalance";
     //
     // codeActivity5
     //
     this.codeActivity5.Name = "codeActivity5";
     this.codeActivity5.ExecuteCode += new System.EventHandler(this.ChangeMenu);
     //
     // ifElseBranchActivity13
     //
     this.ifElseBranchActivity13.Activities.Add(this.callExternalMethodActivity7);
     this.ifElseBranchActivity13.Name = "ifElseBranchActivity13";
     //
     // ifElseBranchActivity12
     //
     this.ifElseBranchActivity12.Activities.Add(this.callExternalMethodActivity12);
     this.ifElseBranchActivity12.Activities.Add(this.codeActivity2);
     this.ifElseBranchActivity12.Activities.Add(this.callExternalMethodActivity11);
     this.ifElseBranchActivity12.Activities.Add(this.setStateActivity10);
     ruleconditionreference2.ConditionName = "NewPinLenght";
     this.ifElseBranchActivity12.Condition = ruleconditionreference2;
     this.ifElseBranchActivity12.Name = "ifElseBranchActivity12";
     //
     // ifElseBranchActivity11
     //
     this.ifElseBranchActivity11.Activities.Add(this.callExternalMethodActivity2);
     ruleconditionreference3.ConditionName = "PinCompare";
     this.ifElseBranchActivity11.Condition = ruleconditionreference3;
     this.ifElseBranchActivity11.Name = "ifElseBranchActivity11";
     //
     // ifElseBranchActivity10
     //
     this.ifElseBranchActivity10.Activities.Add(this.callExternalMethodActivity3);
     ruleconditionreference4.ConditionName = "NewPinLength";
     this.ifElseBranchActivity10.Condition = ruleconditionreference4;
     this.ifElseBranchActivity10.Name = "ifElseBranchActivity10";
     //
     // ifElseBranchActivity9
     //
     this.ifElseBranchActivity9.Activities.Add(this.setStateActivity9);
     this.ifElseBranchActivity9.Activities.Add(this.callExternalMethodActivity5);
     ruleconditionreference5.ConditionName = "NewPinCompare";
     this.ifElseBranchActivity9.Condition = ruleconditionreference5;
     this.ifElseBranchActivity9.Name = "ifElseBranchActivity9";
     //
     // ifElseBranchActivity6
     //
     this.ifElseBranchActivity6.Activities.Add(this.ViewCurrentCardNumber);
     this.ifElseBranchActivity6.Name = "ifElseBranchActivity6";
     //
     // ifElseBranchActivity5
     //
     this.ifElseBranchActivity5.Activities.Add(this.SetSelectLanguageState);
     ruleconditionreference6.ConditionName = "IsFullCardNumber";
     this.ifElseBranchActivity5.Condition = ruleconditionreference6;
     this.ifElseBranchActivity5.Name = "ifElseBranchActivity5";
     //
     // ifElseBranchActivity8
     //
     this.ifElseBranchActivity8.Activities.Add(this.setStateActivity1);
     ruleconditionreference7.ConditionName = "IsAction2";
     this.ifElseBranchActivity8.Condition = ruleconditionreference7;
     this.ifElseBranchActivity8.Name = "ifElseBranchActivity8";
     //
     // ifElseBranchActivity7
     //
     this.ifElseBranchActivity7.Activities.Add(this.ExitFromBalance);
     ruleconditionreference8.ConditionName = "IsAction1";
     this.ifElseBranchActivity7.Condition = ruleconditionreference8;
     this.ifElseBranchActivity7.Name = "ifElseBranchActivity7";
     //
     // ifElseBranchActivity4
     //
     this.ifElseBranchActivity4.Activities.Add(this.ViewCurrentPin);
     this.ifElseBranchActivity4.Name = "ifElseBranchActivity4";
     //
     // ifElseBranchActivity3
     //
     this.ifElseBranchActivity3.Activities.Add(this.ifElseActivity1);
     ruleconditionreference9.ConditionName = "IsFullPin";
     this.ifElseBranchActivity3.Condition = ruleconditionreference9;
     this.ifElseBranchActivity3.Name = "ifElseBranchActivity3";
     //
     // cancellationHandlerActivity1
     //
     this.cancellationHandlerActivity1.Name = "cancellationHandlerActivity1";
     ruleconditionreference10.ConditionName = "IsAction5";
     //
     // compensatableSequenceActivity5
     //
     this.compensatableSequenceActivity5.Activities.Add(this.codeActivity1);
     this.compensatableSequenceActivity5.Activities.Add(this.setStateActivity8);
     this.compensatableSequenceActivity5.Name = "compensatableSequenceActivity5";
     this.compensatableSequenceActivity5.SetValue(System.Workflow.Activities.ConditionedActivityGroup.WhenConditionProperty, ruleconditionreference10);
     ruleconditionreference11.ConditionName = "IsAction4";
     //
     // compensatableSequenceActivity4
     //
     this.compensatableSequenceActivity4.Activities.Add(this.setStateActivity4);
     this.compensatableSequenceActivity4.Name = "compensatableSequenceActivity4";
     this.compensatableSequenceActivity4.SetValue(System.Workflow.Activities.ConditionedActivityGroup.WhenConditionProperty, ruleconditionreference11);
     ruleconditionreference12.ConditionName = "IsAction3";
     //
     // compensatableSequenceActivity3
     //
     this.compensatableSequenceActivity3.Activities.Add(this.codeActivity8);
     this.compensatableSequenceActivity3.Activities.Add(this.setStateActivity5);
     this.compensatableSequenceActivity3.Name = "compensatableSequenceActivity3";
     this.compensatableSequenceActivity3.SetValue(System.Workflow.Activities.ConditionedActivityGroup.WhenConditionProperty, ruleconditionreference12);
     ruleconditionreference13.ConditionName = "IsAction2";
     //
     // compensatableSequenceActivity2
     //
     this.compensatableSequenceActivity2.Activities.Add(this.codeActivity7);
     this.compensatableSequenceActivity2.Activities.Add(this.setStateActivity7);
     this.compensatableSequenceActivity2.Name = "compensatableSequenceActivity2";
     this.compensatableSequenceActivity2.SetValue(System.Workflow.Activities.ConditionedActivityGroup.WhenConditionProperty, ruleconditionreference13);
     ruleconditionreference14.ConditionName = "IsAction1";
     //
     // compensatableSequenceActivity1
     //
     this.compensatableSequenceActivity1.Activities.Add(this.codeActivity5);
     this.compensatableSequenceActivity1.Activities.Add(this.setStateActivity6);
     this.compensatableSequenceActivity1.Name = "compensatableSequenceActivity1";
     this.compensatableSequenceActivity1.SetValue(System.Workflow.Activities.ConditionedActivityGroup.WhenConditionProperty, ruleconditionreference14);
     //
     // ifElseActivity5
     //
     this.ifElseActivity5.Activities.Add(this.ifElseBranchActivity12);
     this.ifElseActivity5.Activities.Add(this.ifElseBranchActivity13);
     this.ifElseActivity5.Name = "ifElseActivity5";
     //
     // handleExternalEventActivity3
     //
     this.handleExternalEventActivity3.EventName = "GetNewNum";
     this.handleExternalEventActivity3.InterfaceType = typeof(Interfaces.IFormService);
     this.handleExternalEventActivity3.Name = "handleExternalEventActivity3";
     this.handleExternalEventActivity3.Invoked += new System.EventHandler<System.Workflow.Activities.ExternalDataEventArgs>(this.handleExternalEventActivity3_Invoked);
     //
     // callExternalMethodActivity6
     //
     this.callExternalMethodActivity6.InterfaceType = typeof(Interfaces.IFormService);
     this.callExternalMethodActivity6.MethodName = "NewPinCodeInvite";
     this.callExternalMethodActivity6.Name = "callExternalMethodActivity6";
     //
     // ifElseActivity4
     //
     this.ifElseActivity4.Activities.Add(this.ifElseBranchActivity9);
     this.ifElseActivity4.Activities.Add(this.ifElseBranchActivity10);
     this.ifElseActivity4.Activities.Add(this.ifElseBranchActivity11);
     this.ifElseActivity4.Name = "ifElseActivity4";
     //
     // handleExternalEventActivity2
     //
     this.handleExternalEventActivity2.EventName = "GetNewNum";
     this.handleExternalEventActivity2.InterfaceType = typeof(Interfaces.IFormService);
     this.handleExternalEventActivity2.Name = "handleExternalEventActivity2";
     this.handleExternalEventActivity2.Invoked += new System.EventHandler<System.Workflow.Activities.ExternalDataEventArgs>(this.handleExternalEventActivity2_Invoked);
     //
     // callExternalMethodActivity4
     //
     this.callExternalMethodActivity4.InterfaceType = typeof(Interfaces.IFormService);
     this.callExternalMethodActivity4.MethodName = "SendBackMessageLine";
     this.callExternalMethodActivity4.Name = "callExternalMethodActivity4";
     workflowparameterbinding9.ParameterName = "message";
     workflowparameterbinding9.Value = "\"VVedite Starij PIN\"";
     this.callExternalMethodActivity4.ParameterBindings.Add(workflowparameterbinding9);
     //
     // callExternalMethodActivity10
     //
     this.callExternalMethodActivity10.InterfaceType = typeof(Interfaces.IFormService);
     this.callExternalMethodActivity10.MethodName = "SendBackMessageLine";
     this.callExternalMethodActivity10.Name = "callExternalMethodActivity10";
     workflowparameterbinding10.ParameterName = "message";
     workflowparameterbinding10.Value = "\"я деписоти \"";
     this.callExternalMethodActivity10.ParameterBindings.Add(workflowparameterbinding10);
     //
     // callExternalMethodActivity8
     //
     this.callExternalMethodActivity8.InterfaceType = typeof(Interfaces.IFormService);
     this.callExternalMethodActivity8.MethodName = "SendBackMessageLine";
     this.callExternalMethodActivity8.Name = "callExternalMethodActivity8";
     workflowparameterbinding11.ParameterName = "message";
     workflowparameterbinding11.Value = "\"WidtDraw\"";
     this.callExternalMethodActivity8.ParameterBindings.Add(workflowparameterbinding11);
     //
     // ReadCardIfElse
     //
     this.ReadCardIfElse.Activities.Add(this.ifElseBranchActivity5);
     this.ReadCardIfElse.Activities.Add(this.ifElseBranchActivity6);
     this.ReadCardIfElse.Name = "ReadCardIfElse";
     //
     // ReadCardNumber
     //
     this.ReadCardNumber.EventName = "GetNewNum";
     this.ReadCardNumber.InterfaceType = typeof(Interfaces.IFormService);
     this.ReadCardNumber.Name = "ReadCardNumber";
     this.ReadCardNumber.Invoked += new System.EventHandler<System.Workflow.Activities.ExternalDataEventArgs>(this.GetInputCardNumber);
     //
     // DisplayWelcomeMessage
     //
     this.DisplayWelcomeMessage.InterfaceType = typeof(Interfaces.IFormService);
     this.DisplayWelcomeMessage.MethodName = "WelcomeMessage";
     this.DisplayWelcomeMessage.Name = "DisplayWelcomeMessage";
     //
     // InitCode
     //
     this.InitCode.Name = "InitCode";
     this.InitCode.ExecuteCode += new System.EventHandler(this.WorkFlowInit);
     //
     // ifElseActivity3
     //
     this.ifElseActivity3.Activities.Add(this.ifElseBranchActivity7);
     this.ifElseActivity3.Activities.Add(this.ifElseBranchActivity8);
     this.ifElseActivity3.Name = "ifElseActivity3";
     //
     // handleExternalEventActivity1
     //
     this.handleExternalEventActivity1.EventName = "GetNewAction";
     this.handleExternalEventActivity1.InterfaceType = typeof(Interfaces.IFormService);
     this.handleExternalEventActivity1.Name = "handleExternalEventActivity1";
     activitybind7.Name = "BankomatsWorkflow";
     activitybind7.Path = "buffer";
     workflowparameterbinding12.ParameterName = "e";
     workflowparameterbinding12.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind7)));
     this.handleExternalEventActivity1.ParameterBindings.Add(workflowparameterbinding12);
     //
     // callExternalMethodActivity9
     //
     this.callExternalMethodActivity9.InterfaceType = typeof(Interfaces.IFormService);
     this.callExternalMethodActivity9.MethodName = "ViewBalance";
     this.callExternalMethodActivity9.Name = "callExternalMethodActivity9";
     activitybind8.Name = "BankomatsWorkflow";
     activitybind8.Path = "CurrentAvailableBalance";
     workflowparameterbinding13.ParameterName = "accountAvailableBalance";
     workflowparameterbinding13.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind8)));
     activitybind9.Name = "BankomatsWorkflow";
     activitybind9.Path = "CurrentTotalBalance";
     workflowparameterbinding14.ParameterName = "accountTotalBalance";
     workflowparameterbinding14.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind9)));
     this.callExternalMethodActivity9.ParameterBindings.Add(workflowparameterbinding13);
     this.callExternalMethodActivity9.ParameterBindings.Add(workflowparameterbinding14);
     //
     // ifElseActivity2
     //
     this.ifElseActivity2.Activities.Add(this.ifElseBranchActivity3);
     this.ifElseActivity2.Activities.Add(this.ifElseBranchActivity4);
     this.ifElseActivity2.Name = "ifElseActivity2";
     //
     // GetPinHandle
     //
     this.GetPinHandle.EventName = "GetNewNum";
     this.GetPinHandle.InterfaceType = typeof(Interfaces.IFormService);
     this.GetPinHandle.Name = "GetPinHandle";
     this.GetPinHandle.Invoked += new System.EventHandler<System.Workflow.Activities.ExternalDataEventArgs>(this.GetInputPin);
     //
     // callExternalMethodActivity1
     //
     this.callExternalMethodActivity1.InterfaceType = typeof(Interfaces.IFormService);
     this.callExternalMethodActivity1.MethodName = "DisplayAuthMenu";
     this.callExternalMethodActivity1.Name = "callExternalMethodActivity1";
     //
     // setStateActivity2
     //
     this.setStateActivity2.Name = "setStateActivity2";
     this.setStateActivity2.TargetStateName = "EnterCard";
     //
     // conditionedActivityGroup1
     //
     this.conditionedActivityGroup1.Activities.Add(this.compensatableSequenceActivity1);
     this.conditionedActivityGroup1.Activities.Add(this.compensatableSequenceActivity2);
     this.conditionedActivityGroup1.Activities.Add(this.compensatableSequenceActivity3);
     this.conditionedActivityGroup1.Activities.Add(this.compensatableSequenceActivity4);
     this.conditionedActivityGroup1.Activities.Add(this.compensatableSequenceActivity5);
     this.conditionedActivityGroup1.Activities.Add(this.cancellationHandlerActivity1);
     this.conditionedActivityGroup1.Name = "conditionedActivityGroup1";
     ruleconditionreference15.ConditionName = "IsValidMenuAction";
     this.conditionedActivityGroup1.UntilCondition = ruleconditionreference15;
     //
     // GetActionToDo
     //
     this.GetActionToDo.EventName = "GetNewAction";
     this.GetActionToDo.InterfaceType = typeof(Interfaces.IFormService);
     this.GetActionToDo.Name = "GetActionToDo";
     activitybind10.Name = "BankomatsWorkflow";
     activitybind10.Path = "buffer";
     workflowparameterbinding15.ParameterName = "e";
     workflowparameterbinding15.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind10)));
     this.GetActionToDo.ParameterBindings.Add(workflowparameterbinding15);
     //
     // ViewMenuText
     //
     this.ViewMenuText.InterfaceType = typeof(Interfaces.IFormService);
     this.ViewMenuText.MethodName = "DisplayMenu";
     this.ViewMenuText.Name = "ViewMenuText";
     //
     // SetAuthState
     //
     this.SetAuthState.Name = "SetAuthState";
     this.SetAuthState.TargetStateName = "Authenticate";
     //
     // GetLanguageHandle
     //
     this.GetLanguageHandle.EventName = "GetNewAction";
     this.GetLanguageHandle.InterfaceType = typeof(Interfaces.IFormService);
     this.GetLanguageHandle.Name = "GetLanguageHandle";
     //
     // ViewLanguageMenu
     //
     this.ViewLanguageMenu.InterfaceType = typeof(Interfaces.IFormService);
     this.ViewLanguageMenu.MethodName = "DisplayLanguage";
     this.ViewLanguageMenu.Name = "ViewLanguageMenu";
     //
     // eventDrivenActivity2
     //
     this.eventDrivenActivity2.Activities.Add(this.handleExternalEventActivity3);
     this.eventDrivenActivity2.Activities.Add(this.ifElseActivity5);
     this.eventDrivenActivity2.Name = "eventDrivenActivity2";
     //
     // stateInitializationActivity3
     //
     this.stateInitializationActivity3.Activities.Add(this.callExternalMethodActivity6);
     this.stateInitializationActivity3.Name = "stateInitializationActivity3";
     //
     // eventDrivenActivity1
     //
     this.eventDrivenActivity1.Activities.Add(this.handleExternalEventActivity2);
     this.eventDrivenActivity1.Activities.Add(this.ifElseActivity4);
     this.eventDrivenActivity1.Name = "eventDrivenActivity1";
     //
     // stateInitializationActivity2
     //
     this.stateInitializationActivity2.Activities.Add(this.callExternalMethodActivity4);
     this.stateInitializationActivity2.Name = "stateInitializationActivity2";
     //
     // handleExternalEventActivity5
     //
     this.handleExternalEventActivity5.EventName = "GetNewNum";
     this.handleExternalEventActivity5.InterfaceType = typeof(Interfaces.IFormService);
     this.handleExternalEventActivity5.Name = "handleExternalEventActivity5";
     //
     // handleExternalEventActivity6
     //
     this.handleExternalEventActivity6.EventName = "GetNewAction";
     this.handleExternalEventActivity6.InterfaceType = typeof(Interfaces.IFormService);
     this.handleExternalEventActivity6.Name = "handleExternalEventActivity6";
     //
     // stateInitializationActivity7
     //
     this.stateInitializationActivity7.Activities.Add(this.callExternalMethodActivity10);
     this.stateInitializationActivity7.Name = "stateInitializationActivity7";
     //
     // stateInitializationActivity5
     //
     this.stateInitializationActivity5.Activities.Add(this.callExternalMethodActivity8);
     this.stateInitializationActivity5.Name = "stateInitializationActivity5";
     //
     // EnterCardEvent
     //
     this.EnterCardEvent.Activities.Add(this.ReadCardNumber);
     this.EnterCardEvent.Activities.Add(this.ReadCardIfElse);
     this.EnterCardEvent.Name = "EnterCardEvent";
     //
     // Init
     //
     this.Init.Activities.Add(this.InitCode);
     this.Init.Activities.Add(this.DisplayWelcomeMessage);
     this.Init.Name = "Init";
     //
     // MenuOrExit
     //
     this.MenuOrExit.Activities.Add(this.handleExternalEventActivity1);
     this.MenuOrExit.Activities.Add(this.ifElseActivity3);
     this.MenuOrExit.Name = "MenuOrExit";
     //
     // InitBalace
     //
     this.InitBalace.Activities.Add(this.callExternalMethodActivity9);
     this.InitBalace.Name = "InitBalace";
     //
     // GetPin
     //
     this.GetPin.Activities.Add(this.GetPinHandle);
     this.GetPin.Activities.Add(this.ifElseActivity2);
     this.GetPin.Name = "GetPin";
     //
     // InitAuth
     //
     this.InitAuth.Activities.Add(this.callExternalMethodActivity1);
     this.InitAuth.Name = "InitAuth";
     //
     // stateInitializationActivity1
     //
     this.stateInitializationActivity1.Activities.Add(this.setStateActivity2);
     this.stateInitializationActivity1.Name = "stateInitializationActivity1";
     //
     // SelectActionToDo
     //
     this.SelectActionToDo.Activities.Add(this.GetActionToDo);
     this.SelectActionToDo.Activities.Add(this.conditionedActivityGroup1);
     this.SelectActionToDo.Name = "SelectActionToDo";
     //
     // InitMenu
     //
     this.InitMenu.Activities.Add(this.ViewMenuText);
     this.InitMenu.Name = "InitMenu";
     //
     // GetLanguage
     //
     this.GetLanguage.Activities.Add(this.GetLanguageHandle);
     this.GetLanguage.Activities.Add(this.SetAuthState);
     this.GetLanguage.Name = "GetLanguage";
     //
     // InitLanguage
     //
     this.InitLanguage.Activities.Add(this.ViewLanguageMenu);
     this.InitLanguage.Name = "InitLanguage";
     //
     // EnterNewPin
     //
     this.EnterNewPin.Activities.Add(this.stateInitializationActivity3);
     this.EnterNewPin.Activities.Add(this.eventDrivenActivity2);
     this.EnterNewPin.Name = "EnterNewPin";
     //
     // EnterOldPin
     //
     this.EnterOldPin.Activities.Add(this.stateInitializationActivity2);
     this.EnterOldPin.Activities.Add(this.eventDrivenActivity1);
     this.EnterOldPin.Name = "EnterOldPin";
     //
     // NumHandler
     //
     this.NumHandler.Activities.Add(this.handleExternalEventActivity5);
     this.NumHandler.Name = "NumHandler";
     //
     // ActionHandler
     //
     this.ActionHandler.Activities.Add(this.handleExternalEventActivity6);
     this.ActionHandler.Name = "ActionHandler";
     //
     // Deposit
     //
     this.Deposit.Activities.Add(this.stateInitializationActivity7);
     this.Deposit.Name = "Deposit";
     //
     // Withdrawal
     //
     this.Withdrawal.Activities.Add(this.stateInitializationActivity5);
     this.Withdrawal.Name = "Withdrawal";
     //
     // EnterCard
     //
     this.EnterCard.Activities.Add(this.Init);
     this.EnterCard.Activities.Add(this.EnterCardEvent);
     this.EnterCard.Name = "EnterCard";
     //
     // ViewBalance
     //
     this.ViewBalance.Activities.Add(this.InitBalace);
     this.ViewBalance.Activities.Add(this.MenuOrExit);
     this.ViewBalance.Name = "ViewBalance";
     //
     // Authenticate
     //
     this.Authenticate.Activities.Add(this.InitAuth);
     this.Authenticate.Activities.Add(this.GetPin);
     this.Authenticate.Name = "Authenticate";
     //
     // Final
     //
     this.Final.Activities.Add(this.stateInitializationActivity1);
     this.Final.Name = "Final";
     //
     // Menu
     //
     this.Menu.Activities.Add(this.InitMenu);
     this.Menu.Activities.Add(this.SelectActionToDo);
     this.Menu.Name = "Menu";
     //
     // SelectLanguage
     //
     this.SelectLanguage.Activities.Add(this.InitLanguage);
     this.SelectLanguage.Activities.Add(this.GetLanguage);
     this.SelectLanguage.Name = "SelectLanguage";
     //
     // BankomatsWorkflow
     //
     this.Activities.Add(this.SelectLanguage);
     this.Activities.Add(this.Menu);
     this.Activities.Add(this.Final);
     this.Activities.Add(this.Authenticate);
     this.Activities.Add(this.ViewBalance);
     this.Activities.Add(this.EnterCard);
     this.Activities.Add(this.Withdrawal);
     this.Activities.Add(this.Deposit);
     this.Activities.Add(this.ActionHandler);
     this.Activities.Add(this.NumHandler);
     this.Activities.Add(this.EnterOldPin);
     this.Activities.Add(this.EnterNewPin);
     this.CompletedStateName = null;
     this.DynamicUpdateCondition = null;
     this.InitialStateName = "EnterCard";
     this.Name = "BankomatsWorkflow";
     this.CanModifyActivities = false;
 }
Пример #32
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.ComponentModel.WorkflowParameterBinding workflowparameterbinding1 = new System.Workflow.ComponentModel.WorkflowParameterBinding();
     System.Workflow.Activities.CodeCondition codecondition1 = new System.Workflow.Activities.CodeCondition();
     this.NotAuthorizedC2 = new System.Workflow.Activities.CodeActivity();
     this.NotAuthorizedC1 = new System.Workflow.Activities.CodeActivity();
     this.NotAuthorized2 = new System.Workflow.ComponentModel.FaultHandlerActivity();
     this.NotAuthorized1 = new System.Workflow.ComponentModel.FaultHandlerActivity();
     this.ExpireAuthorization = new System.Workflow.Activities.CodeActivity();
     this.AutorizationTimer = new System.Workflow.Activities.DelayActivity();
     this.cancellationHandlerActivity3 = new System.Workflow.ComponentModel.CancellationHandlerActivity();
     this.AuthorizationFailed = new System.Workflow.ComponentModel.FaultHandlersActivity();
     this.Rejected = new System.Workflow.Activities.HandleExternalEventActivity();
     this.AutorizationFailed = new System.Workflow.ComponentModel.FaultHandlersActivity();
     this.cancellationHandlerActivity2 = new System.Workflow.ComponentModel.CancellationHandlerActivity();
     this.Authorized = new System.Workflow.Activities.HandleExternalEventActivity();
     this.AuthorizationExpired = new System.Workflow.Activities.EventDrivenActivity();
     this.AuthorizationRejected = new System.Workflow.Activities.EventDrivenActivity();
     this.AuthorizationAccepted = new System.Workflow.Activities.EventDrivenActivity();
     this.WaitForResponse = new System.Workflow.Activities.ListenActivity();
     this.Warrant = new System.Workflow.Activities.WhileActivity();
     this.NotifyRequest = new CodeFactory.Workflow.SendEmailActivity();
     this.AuthorizationRequested = new System.Workflow.Activities.SequenceActivity();
     //
     // NotAuthorizedC2
     //
     this.NotAuthorizedC2.Name = "NotAuthorizedC2";
     this.NotAuthorizedC2.ExecuteCode += new System.EventHandler(this.HandleAuthorizationException);
     //
     // NotAuthorizedC1
     //
     this.NotAuthorizedC1.Name = "NotAuthorizedC1";
     this.NotAuthorizedC1.ExecuteCode += new System.EventHandler(this.HandleAuthorizationException);
     //
     // NotAuthorized2
     //
     this.NotAuthorized2.Activities.Add(this.NotAuthorizedC2);
     this.NotAuthorized2.FaultType = typeof(System.Workflow.Activities.WorkflowAuthorizationException);
     this.NotAuthorized2.Name = "NotAuthorized2";
     //
     // NotAuthorized1
     //
     this.NotAuthorized1.Activities.Add(this.NotAuthorizedC1);
     this.NotAuthorized1.FaultType = typeof(System.Workflow.Activities.WorkflowAuthorizationException);
     this.NotAuthorized1.Name = "NotAuthorized1";
     //
     // ExpireAuthorization
     //
     this.ExpireAuthorization.Name = "ExpireAuthorization";
     this.ExpireAuthorization.ExecuteCode += new System.EventHandler(this.ExpireAuthorization_ExecuteCode);
     //
     // AutorizationTimer
     //
     this.AutorizationTimer.Name = "AutorizationTimer";
     this.AutorizationTimer.TimeoutDuration = System.TimeSpan.Parse("00:00:00");
     this.AutorizationTimer.InitializeTimeoutDuration += new System.EventHandler(this.AuthorizationTimer_Initialize);
     //
     // cancellationHandlerActivity3
     //
     this.cancellationHandlerActivity3.Name = "cancellationHandlerActivity3";
     //
     // AuthorizationFailed
     //
     this.AuthorizationFailed.Activities.Add(this.NotAuthorized2);
     this.AuthorizationFailed.Name = "AuthorizationFailed";
     activitybind1.Name = "AuthorizeEntries";
     activitybind1.Path = "Authorizers";
     //
     // Rejected
     //
     this.Rejected.EventName = "AuthorizationRejected";
     this.Rejected.InterfaceType = typeof(CodeFactory.Wiki.Workflow.IWikiServiceProvider);
     this.Rejected.Name = "Rejected";
     this.Rejected.Invoked += new System.EventHandler<System.Workflow.Activities.ExternalDataEventArgs>(this.Rejected_Invoked);
     this.Rejected.SetBinding(System.Workflow.Activities.HandleExternalEventActivity.RolesProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind1)));
     //
     // AutorizationFailed
     //
     this.AutorizationFailed.Activities.Add(this.NotAuthorized1);
     this.AutorizationFailed.Name = "AutorizationFailed";
     //
     // cancellationHandlerActivity2
     //
     this.cancellationHandlerActivity2.Name = "cancellationHandlerActivity2";
     activitybind2.Name = "AuthorizeEntries";
     activitybind2.Path = "Authorizers";
     //
     // Authorized
     //
     this.Authorized.EventName = "AuthorizationAccepted";
     this.Authorized.InterfaceType = typeof(CodeFactory.Wiki.Workflow.IWikiServiceProvider);
     this.Authorized.Name = "Authorized";
     workflowparameterbinding1.ParameterName = "e";
     this.Authorized.ParameterBindings.Add(workflowparameterbinding1);
     this.Authorized.Invoked += new System.EventHandler<System.Workflow.Activities.ExternalDataEventArgs>(this.Authorized_Invoked);
     this.Authorized.SetBinding(System.Workflow.Activities.HandleExternalEventActivity.RolesProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind2)));
     //
     // AuthorizationExpired
     //
     this.AuthorizationExpired.Activities.Add(this.AutorizationTimer);
     this.AuthorizationExpired.Activities.Add(this.ExpireAuthorization);
     this.AuthorizationExpired.Name = "AuthorizationExpired";
     //
     // AuthorizationRejected
     //
     this.AuthorizationRejected.Activities.Add(this.Rejected);
     this.AuthorizationRejected.Activities.Add(this.AuthorizationFailed);
     this.AuthorizationRejected.Activities.Add(this.cancellationHandlerActivity3);
     this.AuthorizationRejected.Name = "AuthorizationRejected";
     //
     // AuthorizationAccepted
     //
     this.AuthorizationAccepted.Activities.Add(this.Authorized);
     this.AuthorizationAccepted.Activities.Add(this.cancellationHandlerActivity2);
     this.AuthorizationAccepted.Activities.Add(this.AutorizationFailed);
     this.AuthorizationAccepted.Name = "AuthorizationAccepted";
     //
     // WaitForResponse
     //
     this.WaitForResponse.Activities.Add(this.AuthorizationAccepted);
     this.WaitForResponse.Activities.Add(this.AuthorizationRejected);
     this.WaitForResponse.Activities.Add(this.AuthorizationExpired);
     this.WaitForResponse.Name = "WaitForResponse";
     //
     // Warrant
     //
     this.Warrant.Activities.Add(this.WaitForResponse);
     codecondition1.Condition += new System.EventHandler<System.Workflow.Activities.ConditionalEventArgs>(this.EvaluateAuthorization);
     this.Warrant.Condition = codecondition1;
     this.Warrant.Name = "Warrant";
     //
     // NotifyRequest
     //
     this.NotifyRequest.Bcc = null;
     this.NotifyRequest.Body = null;
     this.NotifyRequest.CC = null;
     this.NotifyRequest.Description = "Notifica al autorizador de la solicitud recibida.";
     this.NotifyRequest.From = "*****@*****.**";
     this.NotifyRequest.Name = "NotifyRequest";
     this.NotifyRequest.Port = 25;
     this.NotifyRequest.ReplyTo = null;
     this.NotifyRequest.SmtpHost = "localhost";
     this.NotifyRequest.Subject = null;
     this.NotifyRequest.To = "*****@*****.**";
     this.NotifyRequest.SendingEmail += new System.EventHandler(this.NotifyRequest_SendingEmail);
     //
     // AuthorizationRequested
     //
     this.AuthorizationRequested.Activities.Add(this.NotifyRequest);
     this.AuthorizationRequested.Activities.Add(this.Warrant);
     this.AuthorizationRequested.Name = "AuthorizationRequested";
     //
     // AuthorizeEntries
     //
     this.Activities.Add(this.AuthorizationRequested);
     this.Name = "AuthorizeEntries";
     this.Initialized += new System.EventHandler(this.InitializeProcessing);
     this.CanModifyActivities = false;
 }
        private void InitializeComponent()
        {
            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;
        }