Wizard Driven Template Unfolding

Topics: General Discussion Forum
Aug 20, 2007 at 5:40 PM
I having an issue implementing an add on to the service factory. I'm hoping someone will have a suggestion.

Let's say I have 3 different Service Factory templates, each template has it's own unfolding recipe. I need to determine which unfold recipe to call based on some selections in a wizard. It's easy to have one wizard call gather data and pass that info to a recipe, but how would can I call a different recipe based on the values returned from the wizard?

Can I call the unfold from code in an Action?

Any suggestions would be appreciated.

Thanks,
Jeff
Developer
Aug 22, 2007 at 6:45 AM
You can call the UnfoldTemplateAction from within an action.
Here is an example:

 using (UnfoldTemplateAction component = new UnfoldTemplateAction())
 {
      base.Container.Add(component);
      component.Template = this.Template;
      component.ItemName = "[Your item name]";
      component.Root = this.Project;  // [Input Argument value]
      component.Execute();
 }
You also have other input arguments in that recipe to specify a destination folder to unfold (DestinationFolder) and some others output parameters in case you need that infromation after executing the current action.

Hope that helps,
Hernan
Sep 18, 2007 at 10:58 AM
Can I know what should be placed in the component.ItemName? Is this the name of the vstemplate or the name of the parameter? Hope you can give me a sample for this one..


hernandelahitte wrote:
You can call the UnfoldTemplateAction from within an action.
Here is an example:

 using (UnfoldTemplateAction component = new UnfoldTemplateAction())
 {
      base.Container.Add(component);
      component.Template = this.Template;
      component.ItemName = "[Your item name]";
      component.Root = this.Project;  // [Input Argument value]
      component.Execute();
 }
You also have other input arguments in that recipe to specify a destination folder to unfold (DestinationFolder) and some others output parameters in case you need that infromation after executing the current action.

Hope that helps,
Hernan