Visual Studio Development Bookmark and Share   
 index > Visual Studio Guidance Automation Toolkit > Get to properties when expanding templates Is there a way
 

Get to properties when expanding templates Is there a way

I have a question, At this moment I have the following stuff in my recipe :

<!-- The arguments we need to ask the user for this recipe -->

<Argument Name="InputSchema" Type="Logica.Guidance.BizTalk.SchemaItemProperties, Logica.Guidance.BizTalk">

<Converter Type="Logica.Guidance.BizTalk.Converters.SchemaPickerConverter, Logica.Guidance.BizTalk" />

</Argument>

<Argument Name="ServiceRequestSchema" Type="Logica.Guidance.BizTalk.SchemaItemProperties, Logica.Guidance.BizTalk">

<Converter Type="Logica.Guidance.BizTalk.Converters.SchemaPickerConverter, Logica.Guidance.BizTalk" />

</Argument>

<Argument Name="ServiceResponseSchema" Type="Logica.Guidance.BizTalk.SchemaItemProperties, Logica.Guidance.BizTalk">

<Converter Type="Logica.Guidance.BizTalk.Converters.SchemaPickerConverter, Logica.Guidance.BizTalk" />

</Argument>

Now this has to do with BizTalk and Guidance. The Schemapicker is a picker to get a specific class. This class is based on a BizTalk schema. A BizTalk Schema is represented in several ways inside BizTalk Orchestrations. So this class has several properties that emit those valeus.

Below are some samples :

<!-- Set up the value providers for a Schema Dottet Name -->

<Argument Name="InputSchemaDottedName">

<ValueProvider Type="Evaluator" Expression="$(InputSchema.Orchestration_Type_Name)">

<MonitorArgument Name="InputSchema" />

</ValueProvider>

</Argument>

<!-- Now Set up the valueproviders for the Destination Nodes in the map-->

<Argument Name="InputSchemaDestinationNode">

<ValueProvider Type="Evaluator" Expression="$(InputSchema.Map_Destination_Node)">

<MonitorArgument Name="InputSchema" />

</ValueProvider>

</Argument>

<!-- Now Set up the valueproviders for the Source Nodes in the map -->

<Argument Name="InputSchemaSourceNode">

<ValueProvider Type="Evaluator" Expression="$(InputSchema.Map_Source_Node)">

<MonitorArgument Name="InputSchema" />

</ValueProvider>

</Argument>

<!-- Set up the short names for the map filenames Otherwise the mapname would be too long ! -->

<Argument Name="InputSchemaShortname">

<ValueProvider Type="Evaluator" Expression="$(InputSchema.Map_Short_Name)">

<MonitorArgument Name="InputSchema" />

</ValueProvider>

</Argument>

And i have several others as well. So when Creating a recipe I really have to create LOTS of arguments to be able to generate an orchestration and its maps.

I was curious if it is possible to skip all those arguments and use the properties directly in my templates and T4 templates.

So i want mytemplate to look like :

<om:Element Type="MessageDeclaration" OID="87aaafc4-2b16-426c-a649-285cde96511a" ParentLink="ServiceDeclaration_MessageDeclaration" LowerBound="7.1" HigherBound="8.1">

<omStick out tongueroperty Name="Type" Value="$InputSchema.Orchestration_Type_Name$" />

<omStick out tongueroperty Name="ParamDirection" Value="Ref" />

<omStick out tongueroperty Name="ReportToAnalyst" Value="True" />

<omStick out tongueroperty Name="Name" Value="msgWPInternalTrigger_InternalCopy" />

<omStick out tongueroperty Name="Signal" Value="True" />

</om:Element>

instead of

<om:Element Type="MessageDeclaration" OID="87aaafc4-2b16-426c-a649-285cde96511a" ParentLink="ServiceDeclaration_MessageDeclaration" LowerBound="7.1" HigherBound="8.1">

<omStick out tongueroperty Name="Type" Value="$InputSchemaDottedName$" />

<omStick out tongueroperty Name="ParamDirection" Value="Ref" />

<omStick out tongueroperty Name="ReportToAnalyst" Value="True" />

<omStick out tongueroperty Name="Name" Value="msgWPInternalTrigger_InternalCopy" />

<omStick out tongueroperty Name="Signal" Value="True" />

</om:Element>

And I want my T4 Template to look like :

<mapsource Name="BizTalk Map" BizTalkServerMapperTool_Version="2.0" Version="2" XRange="100" YRange="420" OptimizeValueMapping="yes">

<#= this.InputSchema.Map_Source_Node#>

<#= this.DestinationRootName #>

<Pages />

</mapsource>

instead of

<mapsource Name="BizTalk Map" BizTalkServerMapperTool_Version="2.0" Version="2" XRange="100" YRange="420" OptimizeValueMapping="yes">

<#= this.SourceRootName #>

<#= this.DestinationRootName #>

<Pages />

</mapsource>

Is there anyone who knows if this is possible ?

Well0549  Wednesday, April 09, 2008 1:38 PM
Hi Well,
no, it's not possible when the template is unfolded the argument are converted to strings, so at that point the $xxx$ is replaced with its xxx.ToString() value.

hth.
jose.
Jose Escrich  Friday, April 11, 2008 4:58 PM
Hi Well,
no, it's not possible when the template is unfolded the argument are converted to strings, so at that point the $xxx$ is replaced with its xxx.ToString() value.

hth.
jose.
Jose Escrich  Friday, April 11, 2008 4:58 PM

You can use google to search for other answers

Custom Search

More Threads

• updating receipe arguments in a "ForEach" action
• Exception -- Object reference not set to an instance of an object.
• Unable to uninstall or reinstall SCSF
• Reference Errors..
• Unable to install Guidance Automation Extensions July 2007 CTP
• Application Block Software Factory templates don't appear in VS 2008
• Boolean Condition Doesn´t Work
• Calling Parent CDocument
• Error in Web Service Software Factory Recipe - CreateASMXSolution
• Testing a web site Using Visual studio 2005