Tag Archives: Recipes

Adventures in Extending the Service Factory

I’ve been trying to add a couple of additional projects and item templates to the Service Factory for workflows and workflow activities. I thought I’d try to use the same techniques that the Service Factory was using to dynamically bind the menu options using the ProjectIsInRoleReference helper in the Binding.xml recipe.


So I did the following:

  1. 1. Added new roles WorkflowRole and ActivitiesRole to the file WSSF\Modeling.CodeGeneration\Source\Enums\ServiceFactoryRoleType.cs. I did this so that the Project Mapping helpers would incorporate the new roles into the ProjectMappingTable and get picked up by the ProjectIsInRoleReference helper.
  2. 2. Added the project templates to Templates\Projects.
  3. 3. Added the projects to the WCF and ASMX.vstemplate files.
  4. 4. Added new item templates to Templates\Items to use when the user selects the menu option to create a workflow or activity.
  5. 5. Added unbound recipes to unfold the templates. I used the CreateTranslator recipe as an example.
  6. 6. Added actions to the Binding.xml using the RefCreator and the ProjectIsInRoleReference just like the action for the CreateTranslator recipe.


When I created a new ASMX or WCF Implementation project, the new projects templates got unfolded without issue. But when I right clicked on either the workflow or activities project I did not see the menu options to launch the recipes on the context menu.


At first I thought maybe the ProjectIsInRoleReference helper was not working, but I added debug output to indicate whether it found a match or not and everything was showing up correctly.


So I was at a loss as to why the menu options didn’t show up. I even tried to bind the recipes to the projects but still no luck. I dug out the older Extensibility Walkthroughs from the Service Factory CTP and there was an example for adding a new recipe through the binding.xml file. It seems that because we are testing in the Experimental Hive you need to run the following command to reset the context menus:

devenv /rootsuffix Exp /Setup


Once I ran the command and then restarted Visual Studio under the experimental hive the menu options showed up.  This behavior is not really apparent and I couldn’t find anything in the GAX/GAT documentation. I think that has a lot to do with the fact that running under the experimental hive is rather new for GAX/GAT and until the Service Factory you had to use the Clarius SFT to run under the experimental hive.


Guidance Development Tools

Guidance includes so many different types of documents; Help, How-Tos, FAQs, Checklists, Code Examples, Design Patterns, and Guidelines to name just a few that coming up with a standard way to develop the needed guidance is a hard task to do from scratch. Luckily Microsoft’s patterns & practices group has a tool that can simplify a lot of this for you.


The Microsoft patterns & practice’s Guidance Explorer provides a one stop shop for discovering, developing and publishing high quality development guidance. The project web site is located at http://www.codeplex.com/guidanceExplorer. There you can find the latest release of the tool as well as links to existing guidance examples developed by the team.


The tool includes an editor which provides standardized templates for many of the types of guidance you may want to include in your factory. The editor also includes the ability to add custom data to each guidance item for filtering by Technology, Category, Topic and Rule Type.


How I see this tool being used is pretty simple. As part of the factory development process the guidance developer creates the various guidance items using Guidance Explorer and then exports them to HTML for inclusion into the factory contents. The factory developer then includes links to the files as part of the recipes using the <DocumentationLinks> tag. Now when ever a consumer of the factory invokes a recipe the Guidance Navigator can navigate to the document relating to the action just taken. This could be anything; a checklist of what steps need to be taken in the process; a how-to article on the use of a model just created or even code examples of how to use the library just added to the project.


Another way to apply this tool to factory development is by incorporating the web edition of the tool. It provides a read-only version of the Guidance Explorer that can utilize an on-line store allowing all of your guidance to be in one place. The web edition could be launched in a separate pane within Visual Studio to provide the full guidance library to the factory consumer as they use the factory. They can perform searches for specific topics, filter on a particular category or use the Guidance Navigation pane to browse all of the sections at their leisure.

In my opinion this is a must have tool in any factory developers toolkit, check it out.