|
using System;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Collections;
using System.Drawing;
using System.Linq;
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
{
public sealed partial class MailFactory: SequentialWorkflowActivity
{
//use to hold the input parameter
private string customer = string.Empty;
public string orderNumber = string.Empty;
public string Customer
{
get { return customer; }
set { customer = value; }
}
public MailFactory()
{
InitializeComponent();
}
private void InitWorkflow(object sender, EventArgs e)
{
//Simula a analisys of the customer to get the order nummer
//now is hard-wired to one order
orderNumber = "B1234567";
idInstance = this.WorkflowInstanceId;
}
public static DependencyProperty idInstanceProperty = DependencyProperty.Register("idInstance", typeof(System.Guid), typeof(CorrelationDemo.MailFactory));
[DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
[BrowsableAttribute(true)]
[CategoryAttribute("Misc")]
public Guid idInstance
{
get
{
return ((System.Guid)(base.GetValue(CorrelationDemo.MailFactory.idInstanceProperty)));
}
set
{
base.SetValue(CorrelationDemo.MailFactory.idInstanceProperty, value);
}
}
public String EmailAddressProvider = default(System.String);
public String EmailAddressCustomer = default(System.String);
public String NotificationMessageProvider = default(System.String);
public String NotificationMessageCustomer = default(System.String);
private void FillProviderNotification(object sender, EventArgs e)
{
NotificationMessageProvider = string.Format("The Provider Address is {0}", EmailAddressProvider);
}
private void FillCustomerNotification(object sender, EventArgs e)
{
NotificationMessageCustomer = string.Format("The Customer Address is {0}", EmailAddressCustomer);
}
}
}
|
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.
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 adviser, first in Argentina and from 2003 to 2010, in Germany as External consultant in DWS Luxembourg, AIXTRON AG and Shell Deutschland GmbH and from 2010 to 2012 in Mexico working for Twenty Century Fox, and Mexico Stock Exchange (BMV). From 2013 to now in USA, Florida, First in FAME Inc. and now as Senior Software Engineer in Spirit Airlines.