Hello,
I've seen HOL #10 that demonstrates how to rehost the sequential workflow designer in an application other than Visual Studio. I'd be interested in rehosting the state sachine or free form designer outside of Visual Studio. I expect that most of the work would be the same as for the sequential workflow. However, starting with Beta 2, the layout of the state machine / freeform designer is stored in .layout files. I would be interested in knowing how the layout information stored in this file could be observed by the rehosted designer.
Other than the .layout file, does anyone see any additional issues/work to rehost either the state machine or free form designers, above and beyond that necessary to rehost the sequential designer
Thanks,
Notre

Rehosting statemachine / freeform designer
BradDaBug
Thanks Vihang. I take it the threads you referenced are related to other issues with rehosting the state machine workflow designer. Any input from anyone regarding the .layout files
Notre
ebi_faratar
The sampel posted at http://msdn.microsoft.com/library/default.asp url=/library/en-us/dnlong/html/WFDsgnRehst.asp has this complete implementation.
Thanks
Deler
Great! So, to retrieve a layout (one saved as above or generated from VS), would I modify my loader code to call WorkflowDesignerLoader.LoadDesignerLayout(XMLReader layoutReader, out IList layoutLoadErrors)
Thanks,
Notre
John Sheppard
Yes. You can save the layout for the state machine workflow in a layout file using the follwing code in your loader
IDesignerHost
host = (IDesignerHost)GetService(typeof(IDesignerHost));Activity rootActivity = host.RootComponent as Activity;
ActivityDesigner rootdesigner = host.GetDesigner(rootActivity) as ActivityDesigner;
XmlWriter layoutwriter = XmlWriter.Create(@"C:\MyFile.layout");
IList errors = null;
SaveDesignerLayout(layoutwriter, rootdesigner, out errors);
Thanks,
Vihang
Jim Stapleton