Support of WF 4.5 Designer Improvements in Rehosted Scenarios


As you’ve seen in a previous post, we have added a lot of new features in WF 4.5; see this article for more discussion of those features.  A number of those features (e.g. annotations, auto-surround with sequence, etc.) were developed to improve the authoring experience of workflows.

Many of our customers rehost our designer in their own application/domain-specific authoring environments. Naturally then, these customers have asked which of these new WF4.5 designer capabilities are supported when rehosting the designer.

The new designer features that are supported in the rehosted scenario include: 

  • Outline view of workflow items
  • Designer annotations
  • Multi-select
  • Auto-surround with sequence
  • Pan mode
  • Toolbox search

 The ones that are not supported are: 

  • Find
  • C# Expressions

 Please leave us a comment if you have any questions or comments.

Comments (15)

  1. Bayer White says:

    Hey Hani, If I follow the RehostingWFDesigner example but in VS11 beta, and I am not getting the new features (annotations, etc).  I double checked to make sure I was using the WF4.5 assemblies. Is there additional code that should be added? Thanks for the post!

  2. Hani Khoshdel-Nikkhoo says:

    The RehostingWFDesigner sample that you are referring to is a VS2010/.NET 4 sample. In order to enable the new WF 4.5 designer improvements, you would need to take the following steps:

    1) In the Properties of the DesignerRehosting project, choose ".NET Framework 4.5" as the Target Framework

    2) Enable the feature (e.g. Annotations) that you need in the rehosted designer by modifying the RehostingWFDesigner.xaml.cs file as following:

         // create the workflow designer

         WorkflowDesigner wd = new WorkflowDesigner();

         wd.Context.Services.GetService<DesignerConfigurationService>().AnnotationEnabled = true;

         wd.Context.Services.GetService<DesignerConfigurationService>().TargetFrameworkName = new System.Runtime.Versioning.FrameworkName(".NETFramework", new Version(4, 5));

         wd.Load(new Sequence());

  3. Bayer White says:

    Hani,

    Thank you sir…That was the snippit I needed.

  4. Oliver says:

    What about Intellisense? is that supported?

  5. Jurgen Willis says:

    Intellisense is not supported in the rehosted designer scenario.  Intellisense relies on Visual Studio services (which are not available outside of Visual Studio).  It may be possible for you to develop the experience you need by leveraging the Roslyn CTP: msdn.microsoft.com/…/roslyn

  6. Oliver says:

    Jurgen,

    Thank you very much for your answer. Do you have any example of implenting it with Roslyn. I was googling this morning without much luck.

    Thanks

  7. Chris Owczarek says:

    Thanks Hani,

    Do you have any examples that show how to re-host the document outline pane? I'd really like to incorporate this feature in my re-hosted designer implementation code.msdn.microsoft.com/Workflow-Studio-df1d7dc0.

  8. Oliver,

    I don't have any samples of the Roslyn integration, but one of my PMs has done some investigation on this and could discuss the approach with you.  Feel free to send me a note: JWillis…microsoft.com

  9. Christopher,

    I just published a sample that illustrates how the outline view could be enabled in rehosted scenarios:

    code.msdn.microsoft.com/Support-of-WF-45-Designer-68212ed2

  10. Chris Owczarek says:

    Awesome Hani. Many thanks! Will be incorporating these 4.5 features in my version in the near future.

  11. said says:

    can I edit the DisplayName property of a FlowDecision in Rehosted Workflow Designer, I tried to do It but I didn't succeed

  12. Yes, users can edit the DisplayName property of a FlowDecision in rehosted scenarios. What is the error/behavior that you are observing?

  13. Is it possible to highlight/change the color of the Activity connector in the Rehosted workflow designer.

    So that we can show the executed path of the workflow in visual tracking.

    For e.g. http://goo.gl/LF2AI

  14. C# Expressions is not supported. says:

    Really, WHY?

    How to use it if it is not supported in designer?

    Damn, you make a toy and deny to use it.

    Great thanks!

    It is really required please add support of it.

  15. Mark Walls says:

    Why not just recreate this as an open source project around Rosyln? All of this seems hacked together now. The part we all think is really cool is the UI. We should just recreate that around Rosyln and EF and be done with it.