locked
Best practices and understanding large workflows? Seems to be unmaintainable... RRS feed

  • Question

  • I've been working on a workflow and it's gotten quite large. I constantly need to drill into the activities to find a particular one I was looking for. If I didn't do this entire workflow myself I have no idea how I would be able to find a particular task or activity when there are so many drill downs. The only thing I can see that helps is to properly label each activity and maybe looking at the build output of an actual build.

    There doesn't seem to be any Find mechanism so if I knew a keyword or something about an activity that's 10 drill downs deep I would have no way to find it. What am I doing wrong?

    For instance, in the DefaultTemplate to find the actual MSBuild call on my project you need to drill:

    Run On Agent -> Try, Compile, Test -> Sequence -> Compile, Test & Associate -> Try Compile and Test -> Sequence Compile and Test -> Foreach Configuration in BuildSettings.Platform -> Sequence Compile and Test for Configuration -> If BuildSettings.HasProjectsToBuild -> foreach BuildSetting.ProjectsToBuild -> Try to compile the porject -> Sequence Compile the project -> MSBuild

    Like holy ____... How are people expected to find these things!? Each step has like 3 or 4 choices that can lead you down the wrong path, I'm so confused how these are in any way maintainable?

    Wednesday, July 14, 2010 5:07 PM

Answers

  • The recommended way to create a large workflow is through modularization and composition, which means

    1. Create custom activities for every small logic unit. Usually, doing this in Sequence is a good choice.
    2. Build the large workflow by composing the custom activities together. Usually doing this in flowchart is a good choice.
    If your case, you can try to have some of your compile project logic defined in some custom activities and use the custom activity in your workflow. In this way, you can have a high level understanding of the large workflow. And for details, you can go to the custom activities.

    Right now we don't have any search capability expect for the build-in search dialog in VS which will search on XAML. We are aware of this and consider to implement a workflow designer specific search in the next release. For now, what you can do is using the VS search to find a keyword in XAML and find the match in workflow designer manually.

    • Marked as answer by Andrew_Zhu Thursday, July 22, 2010 3:19 AM
    Wednesday, July 21, 2010 1:55 AM

All replies

  •  

    Also I realize I'm at even more of a disadvantage because for whatever reason I can't figure out, my workflows look this: 

    I've made a forums post about this issue here: http://social.msdn.microsoft.com/Forums/en/tfsbuild/thread/d9516e1d-47d7-4e70-a516-ad99300519d5

    My original question still stand however, even if you can properly see all the grid lines the amount you have to drill down to find something can still become insane.

    Wednesday, July 14, 2010 5:19 PM
  • bump
    Monday, July 19, 2010 12:45 PM
  • Hello,

    I have run into the same issue,  I have alleviated it to some extent by using the FlowChart activity, but I an still running into the same issue eventually, especially when the workflow gets large.  I am trying to form a good method for organizing the workflow elements in a particular project by how close they are to the actual work being done, and this has helped a bit. 

    My latest "try and see" is to build the child activity designers so that they expose a bit of what is going on inside at the designer level, I am hoping this will make it easier to navigate the workflow visually. 

    An example is I have a workflow that turns on a projector via a tcp command, and turns on a backup projector if the main one fails.  I place the lowest activity in a primitives folder in the project, it is a codeactivity that simply issues the command to turn on the projector.  I also have one that checks the status of the projector. The designer for this will be a projector with an icon that indicates whether to power it on or off.

    The next level up I placed in the actuator folder, these workflows are responsibly for conducting a physical activity (turn on the projector, wait, check the state, wait, etc...) Like the primitive, the designer here will have a projector icon with the desired state.

    The higher level I am using to coordinate various actuators (lights, projectors, smoke, etc...) For lack of a better word, I am calling this level SceneConfigurations.  The designer here will be representative of the scene, and I am hoping to get it to combine a projector image with a light, some lighting, etc... so when it is viewed in an upper level workflow, it is apparent that at that point the projector will be powered on, the lights will be off, the smoke machine will be on, and the lasers will be on.

    I am hoping this will alleviate some of the need to drill down, and if the need exists, then it will be easily understood where the user needs to look.

    Of course this is easier said than done, I am running into technical issues (meaning my brain doesn't work right) trying to get the designers figured out, and the wpf bindings, etc working.  I made a post earlier about one such issue with swapping images based on the value of an inargument.

    Anyway, I know this doesn't solve your problem, but it has helped me organize my particular workflows into a fashion that is a bit more logical.

     

    Tuesday, July 20, 2010 1:28 AM
  • The recommended way to create a large workflow is through modularization and composition, which means

    1. Create custom activities for every small logic unit. Usually, doing this in Sequence is a good choice.
    2. Build the large workflow by composing the custom activities together. Usually doing this in flowchart is a good choice.
    If your case, you can try to have some of your compile project logic defined in some custom activities and use the custom activity in your workflow. In this way, you can have a high level understanding of the large workflow. And for details, you can go to the custom activities.

    Right now we don't have any search capability expect for the build-in search dialog in VS which will search on XAML. We are aware of this and consider to implement a workflow designer specific search in the next release. For now, what you can do is using the VS search to find a keyword in XAML and find the match in workflow designer manually.

    • Marked as answer by Andrew_Zhu Thursday, July 22, 2010 3:19 AM
    Wednesday, July 21, 2010 1:55 AM