Kola

I want to edit my xoml workflow using "WorkflowDesignerControl" (Workflow Designer Re-hosting sample ref: http://wf.netfx3.com/files/folders/design_time/entry1923.aspx) after deployment of application. In that I have to add a new State activity with EventDriven obviously with HandleExternalEvent activity to the existing StateMachine Workflow. For the HandleExternalEvent activity i have to set my interface handler method which is available in MyWorkflow.dll, here I can only refer the workflow1.xoml.

How can I set the EventName and Interface properties to the HandleExternalEvent Activity with the WorkflowDesignerControl Also tried adding the MyWorkflow.dll reference to the WorkflowDesignerControl project, but no use.

Thanks,

Kola



Re: Windows Workflow Foundation Setting HandleExternalEvent activity Interface, EventName property with WorkflowDesignerControl (Designer Re-hosting sample)

kmhsad

Hi ,

You need to add MyWorkflow.dll to DesignerLoaderHost .

internal sealed class WorkflowLoader : WorkflowDesignerLoader

{

protected override void Initialize()

{

base.Initialize();

// Add all the services to the loaderhost

IDesignerLoaderHost host = LoaderHost;

if (host != null)

{

TypeProvider typeProvider = new TypeProvider(host);

typeProvider.AddAssemblyReference(typeof(System.EventHandler).Assembly.Location);

typeProvider.AddAssemblyReference(typeof(System.ComponentModel.AttributeCollection).Assembly.Location);

typeProvider.AddAssemblyReference(typeof(System.Workflow.ComponentModel.CompositeActivity).Assembly.Location);

typeProvider.AddAssemblyReference(typeof(System.Workflow.Activities.SequentialWorkflowActivity).Assembly.Location);

typeProvider.AddAssemblyReference("MyWorkflow.dll"); // Add your reference. Parameter is Path

host.AddService(typeof(ITypeProvider), typeProvider, true);

// Other service

}

}

}

If you want to add reference dynamically , you make TypeProvider variable for public . And then create one custom form which can get Reference Path , pass TypeProvider pass to this form and add reference at this form . I hope this can help your problem .

Please let me know about this which is helpful or not .






Re: Windows Workflow Foundation Setting HandleExternalEvent activity Interface, EventName property with WorkflowDesignerControl (Designer Re-hosting sample)

Kola

Hi,

I have tried this add MyWorkflow.dll to DesignerLoaderHost, still i m not getting the Interface from MyWorkflow.dll. Is there anyother things i need to add

--

Kola





Re: Windows Workflow Foundation Setting HandleExternalEvent activity Interface, EventName property with WorkflowDesignerControl (Designer Re-hosting sample)

kmhsad

Hi Kola ,

If you have tried this add MyWorkflow.dll to DesignerLoaderHost , can't see this interface . Please check your Interface (Local Service) Access Level . If you do with public and do correctly , you can see this interface from MyWorkflow.dll . I hope you can solve your problem .






Re: Windows Workflow Foundation Setting HandleExternalEvent activity Interface, EventName property with WorkflowDesignerControl (Designer Re-hosting sample)

Kola

hmm... i changed interface access type to public, still i m not seeing the interface in the designer control. "Sample.MyWorkflow.dll" is the assembly namespace, in that i have interface in "Sample.Workflow.Interfaces" namespace, do i need to add anything else

Thanks,

Kola





Re: Windows Workflow Foundation Setting HandleExternalEvent activity Interface, EventName property with WorkflowDesignerControl (Designer Re-hosting sample)

kmhsad

Hi,

Have your interface put [ExternalDataExchange] attribute if you don't put this attribute in your interface , can't see your interface . if this is not helpful you , please upload or send mail to me your coding for interface class .

Thanks






Re: Windows Workflow Foundation Setting HandleExternalEvent activity Interface, EventName property with WorkflowDesignerControl (Designer Re-hosting sample)

Kola

Hi,

I have sent you the code for MyWorkflow, please check ur mail.

Thanks,

Kola





Re: Windows Workflow Foundation Setting HandleExternalEvent activity Interface, EventName property with WorkflowDesignerControl (Designer Re-hosting sample)

kmhsad

Hi Kola ,

I replied mail to you with your project , Please check your mail and try it again .

Please let me know that this is helpful for you .

Cheer .






Re: Windows Workflow Foundation Setting HandleExternalEvent activity Interface, EventName property with WorkflowDesignerControl (Designer Re-hosting sample)

Tom Lake - MSFT

Also take a look at the post at http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=1076723&SiteID=1.




Re: Windows Workflow Foundation Setting HandleExternalEvent activity Interface, EventName property with WorkflowDesignerControl (Designer Re-hosting sample)

Kola

Thank you very much...Now i m getting, given physical path of the DLL.

typeProvider.AddAssemblyReference(@"C:\Windows Workflow Foundation\Examples\DesignerRehosting\2007-05-18\Designer Rehosting\WorkflowDesignerControl\bin\Debug\MyWorkflow\MyWorkflow.dll");

Thanks,

Kola