working from win form

I have a question.

In the form when pressing the button, the workflow starts

I wrote the following code in the button1_click event. I have used a my service for work with handle external method and callexternalevent activities

Is this correct?

privatevoid Button1_Click(object sender,EventArgs e)

if (wr !=null)

{

wr =newWorkflowRuntime();

wr.StartRuntime();

}

ExternalDataExchangeService dataExchange =newExternalDataExchangeService();

workflowRuntime.AddService(dataExchange);

MyService myService =newMyService();

dataExchange.AddService(myService);

WorkflowInstance wi = wr.CreateWorkflow(typeof(WFizin.izinWorkflow));

wi.Start();

thanks

[1776 byte] By [madenci] at [2007-12-24]
# 1

Yes this looks correct.

Vignesh

VigneshKannappan-MSFT at 2007-10-8 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...

Software Development for Windows Vista

Site Classified