Problem displaying state machine wf in the workflow monitor

The Activity layout is a mess when diplaying a state machine workflows in the workflow monitor sample (sdk). Is there a solution?

[137 byte] By [wmmihaa] at [2007-12-21]
# 1
If you have rehosted the designer then you must have used the WorkflowDesignerLoader class to load/save the contents of the Workflow into the designer. Your loader class can call protected methods LoadDesignerLayout/SaveDesignerLayout to load/save the layout in either file or string. These methods take XmlReader/XmlWriter.
vihang at 2007-9-10 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 2

What do you mean? All I do is enabling tracking, and copy the workflow assembly file to the same folder as the monitor. Sequential workflow looks fine but activities in state machine workflows seams to loose its positions.

Mikael H?knasson

wmmihaa at 2007-9-10 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 3

Anyone knows a solution to this issue?

I also use a modified version of the Workflow Monitor, which does not apply the layout I made in VS to the design surface. How could I achive that?

jamba8 at 2007-9-10 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 4

This is an answer from _vihang in an other post:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=338343&SiteID=1

Instead of PerformLoad, Can you try doing this in the EndLoad method. Try adding the following code in your loader. This should fix the problem

protected override void OnEndLoad(bool successful, ICollection errors)

{

base.OnEndLoad(successful, errors);

// Load the layout if it exists

string layoutFile = Path.Combine(Path.GetDirectoryName(this.xoml), Path.GetFileNameWithoutExtension(this.xoml) + ".layout");

if (File.Exists(layoutFile))

{

IList loaderrors = null;

using (XmlReader xmlReader = XmlReader.Create(layoutFile))

LoadDesignerLayout(xmlReader, out loaderrors);

}

}

wmmihaa at 2007-9-10 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...
# 5

I dont use xoml, and therefore get an error when tryong "this.xoml". What should be the value of this.xoml?

Thanks

jamba8 at 2007-9-10 > top of Msdn Tech,Software Development for Windows Vista,Windows Workflow Foundation...

Software Development for Windows Vista

Site Classified