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

private void Button1_Click(object sender, EventArgs e)

if (wr != null)

{

wr = new WorkflowRuntime();

wr.StartRuntime();

}

ExternalDataExchangeService dataExchange = new ExternalDataExchangeService();

workflowRuntime.AddService(dataExchange);

MyService myService = new MyService();

dataExchange.AddService(myService);

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

wi.Start();

thanks



Answer this question

working from win form

  • fasttrack

    Yes this looks correct.

    Vignesh



  • working from win form