Jean Hibbert's Blog

.NET Framework, SQL Server and other random thoughts.

Windows Work Flow (WWF) / .Net Framework

I have to say I have been working with WWF for the past few days and I am impressed with this technology. Not only is the designer able to visually build the work flow but the designer is able to execute the work flow also.

By customising the Activities Designer objects, the developer can also manipulate the design time behaviour of the composite and simple activities within the designer. The CompositeActivityDesigner and the ActivityDesigner are base classes that can be used with to provide overridable methods to manipulate the design time features
of thier custom activities.

if (t == null)

throw new NullReferenceException("Cannot display a null transaction");

WorkflowDesignerLoader loader = GetService(typeof(WorkflowDesignerLoader)) as WorkflowDesignerLoader;

if (loader == null)

throw new NullReferenceException("Could not load workflow designer loader");

IDesignerHost designerHost = this.designSurface.GetService(typeof(IDesignerHost)) as IDesignerHost;

CompositeActivity rootActivity = designerHost.RootComponent as CompositeActivity;

.......

loader.AddActivityToDesigner(rootActivity);

The above code loads a set of custom activities into the designer.

Posted: Feb 19 2008, 07:18 PM by jean
Filed under: