Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Host and Workflow: Two Worlds to Communicate. Part V

, 4 Oct 2008 CPOL
Part V: Intercommunications with a Workflow instance using Correlation parameter
host_wf_comm_P5_1.zip
P5ExampleWithoutCorrelation
CommunicationManager
bin
Properties
CorrelationDemo
bin
CorrelationDemoWF.csproj.user
Properties
Settings.settings
P5ExampleWithoutCorrelation.suo
SendAllEmail
bin
Properties
Settings.settings
host_wf_comm_P5_2.zip
P5ExampleWithCorrelation
CommunicationManager
bin
Properties
CorrelationDemo
bin
CorrelationDemoWF.csproj.user
Properties
Settings.settings
P5ExampleWithCorrelation.suo
SendAllEmail
bin
Properties
Settings.settings
using System;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Collections;
using System.Drawing;
using System.Reflection;
using System.Workflow.ComponentModel.Compiler;
using System.Workflow.ComponentModel.Serialization;
using System.Workflow.ComponentModel;
using System.Workflow.ComponentModel.Design;
using System.Workflow.Runtime;
using System.Workflow.Activities;
using System.Workflow.Activities.Rules;

namespace CorrelationDemo
{
	partial class MailFactory
	{
		#region Designer generated code
		
		/// <summary> 
		/// Required method for Designer support - do not modify 
		/// the contents of this method with the code editor.
		/// </summary>
        [System.Diagnostics.DebuggerNonUserCode]
		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();
            this.sendEmailNotification2 = new CommunicationManager.SendEmailNotification();
            this.sendEmailNotification1 = new CommunicationManager.SendEmailNotification();
            this.synchronizationScopeActivity2 = new System.Workflow.ComponentModel.SynchronizationScopeActivity();
            this.sendEmailToWorkflow2 = new CommunicationManager.SendEmailToWorkflow();
            this.getEmailAddress2 = new CommunicationManager.GetEmailAddress();
            this.synchronizationScopeActivity1 = new System.Workflow.ComponentModel.SynchronizationScopeActivity();
            this.sendEmailToWorkflow1 = new CommunicationManager.SendEmailToWorkflow();
            this.getEmailAddress1 = new CommunicationManager.GetEmailAddress();
            this.seqCustomerEmail = new System.Workflow.Activities.SequenceActivity();
            this.seqProviderEmail = new System.Workflow.Activities.SequenceActivity();
            this.parallelActivity1 = new System.Workflow.Activities.ParallelActivity();
            this.codeInit = new System.Workflow.Activities.CodeActivity();
            // 
            // sendEmailNotification2
            // 
            this.sendEmailNotification2.Name = "sendEmailNotification2";
            activitybind1.Name = "MailFactory";
            activitybind1.Path = "NotificationMessageCustomer";
            activitybind2.Name = "MailFactory";
            activitybind2.Path = "idInstance";
            this.sendEmailNotification2.MethodInvoking += new System.EventHandler(this.FillCustomerNotification);
            this.sendEmailNotification2.SetBinding(CommunicationManager.SendEmailNotification.wfIdProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind2)));
            this.sendEmailNotification2.SetBinding(CommunicationManager.SendEmailNotification.NotificationProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind1)));
            // 
            // sendEmailNotification1
            // 
            this.sendEmailNotification1.Name = "sendEmailNotification1";
            activitybind3.Name = "MailFactory";
            activitybind3.Path = "NotificationMessageProvider";
            activitybind4.Name = "MailFactory";
            activitybind4.Path = "idInstance";
            this.sendEmailNotification1.MethodInvoking += new System.EventHandler(this.FillProviderNotification);
            this.sendEmailNotification1.SetBinding(CommunicationManager.SendEmailNotification.wfIdProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind4)));
            this.sendEmailNotification1.SetBinding(CommunicationManager.SendEmailNotification.NotificationProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind3)));
            // 
            // synchronizationScopeActivity2
            // 
            this.synchronizationScopeActivity2.Activities.Add(this.sendEmailNotification2);
            this.synchronizationScopeActivity2.Name = "synchronizationScopeActivity2";
            this.synchronizationScopeActivity2.SynchronizationHandles = null;
            // 
            // sendEmailToWorkflow2
            // 
            activitybind5.Name = "MailFactory";
            activitybind5.Path = "EmailAddressCustomer";
            this.sendEmailToWorkflow2.Name = "sendEmailToWorkflow2";
            this.sendEmailToWorkflow2.Sender = null;
            this.sendEmailToWorkflow2.Typo = "CUSTOMER";
            this.sendEmailToWorkflow2.SetBinding(CommunicationManager.SendEmailToWorkflow.EmailProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind5)));
            // 
            // getEmailAddress2
            // 
            this.getEmailAddress2.Name = "getEmailAddress2";
            activitybind6.Name = "MailFactory";
            activitybind6.Path = "orderNumber";
            this.getEmailAddress2.typo = "CUSTOMER";
            activitybind7.Name = "MailFactory";
            activitybind7.Path = "idInstance";
            this.getEmailAddress2.SetBinding(CommunicationManager.GetEmailAddress.wfIdProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind7)));
            this.getEmailAddress2.SetBinding(CommunicationManager.GetEmailAddress.orderNumberProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind6)));
            // 
            // synchronizationScopeActivity1
            // 
            this.synchronizationScopeActivity1.Activities.Add(this.sendEmailNotification1);
            this.synchronizationScopeActivity1.Name = "synchronizationScopeActivity1";
            this.synchronizationScopeActivity1.SynchronizationHandles = null;
            // 
            // sendEmailToWorkflow1
            // 
            activitybind8.Name = "MailFactory";
            activitybind8.Path = "EmailAddressProvider";
            this.sendEmailToWorkflow1.Name = "sendEmailToWorkflow1";
            this.sendEmailToWorkflow1.Sender = null;
            this.sendEmailToWorkflow1.Typo = "PROVIDER";
            this.sendEmailToWorkflow1.SetBinding(CommunicationManager.SendEmailToWorkflow.EmailProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind8)));
            // 
            // getEmailAddress1
            // 
            this.getEmailAddress1.Name = "getEmailAddress1";
            activitybind9.Name = "MailFactory";
            activitybind9.Path = "orderNumber";
            this.getEmailAddress1.typo = "PROVIDER";
            activitybind10.Name = "MailFactory";
            activitybind10.Path = "idInstance";
            this.getEmailAddress1.SetBinding(CommunicationManager.GetEmailAddress.wfIdProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind10)));
            this.getEmailAddress1.SetBinding(CommunicationManager.GetEmailAddress.orderNumberProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind9)));
            // 
            // seqCustomerEmail
            // 
            this.seqCustomerEmail.Activities.Add(this.getEmailAddress2);
            this.seqCustomerEmail.Activities.Add(this.sendEmailToWorkflow2);
            this.seqCustomerEmail.Activities.Add(this.synchronizationScopeActivity2);
            this.seqCustomerEmail.Name = "seqCustomerEmail";
            // 
            // seqProviderEmail
            // 
            this.seqProviderEmail.Activities.Add(this.getEmailAddress1);
            this.seqProviderEmail.Activities.Add(this.sendEmailToWorkflow1);
            this.seqProviderEmail.Activities.Add(this.synchronizationScopeActivity1);
            this.seqProviderEmail.Name = "seqProviderEmail";
            // 
            // parallelActivity1
            // 
            this.parallelActivity1.Activities.Add(this.seqProviderEmail);
            this.parallelActivity1.Activities.Add(this.seqCustomerEmail);
            this.parallelActivity1.Name = "parallelActivity1";
            // 
            // codeInit
            // 
            this.codeInit.Name = "codeInit";
            this.codeInit.ExecuteCode += new System.EventHandler(this.InitWorkflow);
            // 
            // MailFactory
            // 
            this.Activities.Add(this.codeInit);
            this.Activities.Add(this.parallelActivity1);
            this.Name = "MailFactory";
            this.CanModifyActivities = false;

		}

		#endregion

        private SynchronizationScopeActivity synchronizationScopeActivity2;
        private CommunicationManager.SendEmailToWorkflow sendEmailToWorkflow2;
        private CommunicationManager.GetEmailAddress getEmailAddress2;
        private SynchronizationScopeActivity synchronizationScopeActivity1;
        private CommunicationManager.SendEmailToWorkflow sendEmailToWorkflow1;
        private CommunicationManager.GetEmailAddress getEmailAddress1;
        private SequenceActivity seqCustomerEmail;
        private SequenceActivity seqProviderEmail;
        private ParallelActivity parallelActivity1;
        private CommunicationManager.SendEmailNotification sendEmailNotification2;
        private CommunicationManager.SendEmailNotification sendEmailNotification1;
        private CodeActivity codeInit;






















    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

freedeveloper
Software Developer (Senior) G-SoftSolutions
United States United States
Jose A. Garcia Guirado, Electronic Engineer, graduated in Havana/Cuba 1982, MCTS, MCSD.NET, MCAD.NET, MCSE. Worked in the Institute for Cybernetics and Mathematics of Academy of Science of Cuba for 8 years; since 1995 working as free software architect, developer and advisor, first in Argentina and from 2003 to 2010, in Germany as External consultant in DWS Luxemburg, AIXTRON AG and Shell Deutschland GmbH and from 2010 to 2012 in in Mexico in Twenty Century Fox, and Mexico Stock Exchange (BMV). Actually as freelance in Florida, USA.
Follow on   Google+

| Advertise | Privacy | Mobile
Web03 | 2.8.141022.1 | Last Updated 4 Oct 2008
Article Copyright 2008 by freedeveloper
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid