locked
Disable Expand All/Collapse All workflow designer hyperlinks? RRS feed

  • Question

  • Hi,

    In a blog post by Matt Winker (http://blogs.msdn.com/mwinkle/archive/2009/10/20/wf4-designer-enhancements-in-vs-2010-beta-2.aspx), he notes that:

    "Additionally, you can choose to expand or collapse individual nodes, or go to the “Expand All” command in order to expand out the tree.  One thing to note is that we don’t allow expansion inside of a flowchart because we don’t yet have a mechanism that lets me rearrange all of the items around that newly expanded activity.  "

    My question is, will there be a way by the time RTM releases to do expansion within a flow chart?  The flow chart model is what I'll be using exclusively, so I'm quite interesetd in this.

    If there will not be support by the time workflow reaches RTM, is there or will there be a way that we can hide the Expand All/Collapse All hyperlinks?

    Thank you,

    Notre

    Tuesday, December 15, 2009 7:30 PM

Answers

  • The support for expansion/collapse in Flowchart is not something that will be there in time for RTM. I'll let someone familiar with the designer provide guidance on customizability.


    Senior Lead Program Manager, Windows Workflow Foundation http://blogs.msdn.com/kavitak
    • Marked as answer by Notre Thursday, December 17, 2009 5:29 PM
    Tuesday, December 15, 2009 10:39 PM
  • Notre,

    No, expand in place is a feature we are looking at for a subsequent release at this time.

    The reason that the links can't be removed is that they are setting the state of the designer (the flowchart designer decides that it will not react to these changes), and that state is preserved across "breadcrumbing" operations.  To see an example of this, drop a number of sequences inside one another, "breadcrumb" to the most inner one, add a few composite activities and then click "Collapse All"   this sets the global state for collapsed.  You will note that in the current root, all activities are now collapsed.  If you move higher up the stack, you will see that the contents are subsequently collapsed as well.

    If you have the flowchart as the root (click on the flowchart in the breadcrumb bar at the top), you will note that the buttons are disabled.  

    matt 
    Program Manager -- wf designer -- http://blogs.msdn.com/mwinkle
    • Marked as answer by Notre Thursday, December 17, 2009 5:29 PM
    Thursday, December 17, 2009 1:34 AM

All replies

  • The support for expansion/collapse in Flowchart is not something that will be there in time for RTM. I'll let someone familiar with the designer provide guidance on customizability.


    Senior Lead Program Manager, Windows Workflow Foundation http://blogs.msdn.com/kavitak
    • Marked as answer by Notre Thursday, December 17, 2009 5:29 PM
    Tuesday, December 15, 2009 10:39 PM
  • Thank you Kavita.  I look forward to guidance as to customization points, in lieu of having the expansion/collapse functionality for flowchart.  Hopefully the UI links can be removed.

    Notre
    Wednesday, December 16, 2009 12:32 AM
  • Notre,

    No, expand in place is a feature we are looking at for a subsequent release at this time.

    The reason that the links can't be removed is that they are setting the state of the designer (the flowchart designer decides that it will not react to these changes), and that state is preserved across "breadcrumbing" operations.  To see an example of this, drop a number of sequences inside one another, "breadcrumb" to the most inner one, add a few composite activities and then click "Collapse All"   this sets the global state for collapsed.  You will note that in the current root, all activities are now collapsed.  If you move higher up the stack, you will see that the contents are subsequently collapsed as well.

    If you have the flowchart as the root (click on the flowchart in the breadcrumb bar at the top), you will note that the buttons are disabled.  

    matt 
    Program Manager -- wf designer -- http://blogs.msdn.com/mwinkle
    • Marked as answer by Notre Thursday, December 17, 2009 5:29 PM
    Thursday, December 17, 2009 1:34 AM
  • Ok, thanks for the explanation Matt.

    Notre
    Thursday, December 17, 2009 5:28 PM
  • I am looking to expand the specific node in flowchart thru code. Is there any way to achieve this. I was going thru some post & found something ModelItemExtensions could be of use but to my strange, it works with Activities but not with FlowChart.

    ModelService
    modelService = wd.Context.Services.GetService<ModelService>();
     
    IEnumerable<ModelItem> activityCollection = modelService.Find(modelService.Root, typeof(Activity));

    ModelItemExtensions.Focus(activityCollection.ElementAt(6));

    Any suggestions would be appreciable.

    • Edited by Ritesh Jain Wednesday, September 8, 2010 11:19 AM
    Wednesday, September 8, 2010 8:21 AM
  • Just to add to above note.. I am getting the modelitem collection as mentioned in below code instead of using ModelService.Find() method

    ModelItemCollection modelItems = modelService.Root.Content.Collection;

    I needed to use above code as Find() method was hanging the app.

    Wednesday, September 8, 2010 11:17 AM
  • Hi Ritesh,

    You should post your question as a new question in the forum, not add to an existing question (particularly one that is marked as answered).  You'll find you'll get much better visibility and responses by doing this. I stumbled across your question only by accident.

    I don't know about the hanging bit with ModelService.Find().  I've used this without any hanging, although I do find it less performant than walking the children myself, particularly if I just need to examine the immediate child nodes.  I believe (but did not confirmed) Find may perform a deeper search, finding grandchild nodes.

    As for your original question, FlowDecision, FlowSwitch<> and FlowStep all derive from FlowNode, which does not derive from Activity.  That is why you're not finding it.  I believe (although did not confirm) the Flowchart class does its own, internal scheduling of contained FlowNodes, rather than going through the normal WF activity scheduling mechanism.

    Finally, as to how to expand a node, I believe you can send a command to the model item's designer to get it to expand, but I don't know the exact details.  You should post that as a new question to the forum and I'm sure someone will help you.

    Notre

    Wednesday, September 8, 2010 4:06 PM
  • Creating a new post for this.. :)
    Thursday, September 9, 2010 5:01 AM