Forum Replies Created
-
AuthorPosts
-
You can use the map file Map2.btm as below[last]..
Do the following..
1.Create a schemas from ur input xml file given by you.
2.create a map Map2.btm
3.Create a dummy schema as follows
—-Rootnode1
———–Fieldelement[string]
Map the output of scripting functiod to this field element.
4 Create another Map Map3.btm
5.Input schema is the Dummy Schema created above
6.Output Schemas as below
Passenger———Rootnode
—<xs Any element>
Map the field element to the Passenger rootnode…u will get the outputyou mentioned.
you can mail me if still find it difficult…I will mail u the solution.
——————————————–Map2.btm———-
<?xml version="1.0" encoding="utf-16"?>
<!– Generated using BizTalk Mapper on Mon, Jan 22 2007 04:22:19 AM –>
<mapsource Name="BizTalk Map" BizTalkServerMapperTool_Version="2.0" Version="2" XRange="100" YRange="420" OmitXmlDeclaration="Yes" TreatElementsAsRecords="No" OptimizeValueMapping="Yes" GenerateDefaultFixedNodes="Yes" CopyPIs="No" method="xml" xmlVersion="1.0" IgnoreNamespacesForLinks="Yes">
<SrcTree>
<Reference Location=".\StringChar_Input.xsd" />
</SrcTree>
<TrgTree>
<Reference Location=".\Schema2.xsd" />
</TrgTree>
<ScriptTypePrecedence>
<CSharp Enabled="Yes" />
<ExternalAssembly Enabled="Yes" />
<VbNet Enabled="Yes" />
<JScript Enabled="Yes" />
<XsltCallTemplate Enabled="Yes" />
<Xslt Enabled="Yes" />
</ScriptTypePrecedence>
<TreeValues>
<TestValues />
<ConstantValues />
</TreeValues>
<Pages>
<Page Name="Page 1">
<Links>
<Link LinkID="1" LinkFrom="/*[local-name()='<Schema>']/*[local-name()='TestInput']/*[local-name()='BreakDown']/*[local-name()='Line']" LinkTo="1" Label="" />
<Link LinkID="2" LinkFrom="1" LinkTo="3" Label="" />
<Link LinkID="3" LinkFrom="3" LinkTo="4" Label="" />
<Link LinkID="4" LinkFrom="1" LinkTo="6" Label="" />
<Link LinkID="5" LinkFrom="6" LinkTo="5" Label="" />
<Link LinkID="6" LinkFrom="1" LinkTo="2" Label="" />
<Link LinkID="7" LinkFrom="4" LinkTo="2" Label="" />
<Link LinkID="8" LinkFrom="5" LinkTo="2" Label="" />
<Link LinkID="9" LinkFrom="2" LinkTo="7" Label="" />
<Link LinkID="10" LinkFrom="7" LinkTo="/*[local-name()='<Schema>']/*[local-name()='PassengerData1']/*[local-name()='Field']" Label="" />
</Links>
<Functoids>
<Functoid FunctoidID="1" X-Cell="53" Y-Cell="215" Functoid-FID="328" Functoid-Name="Cumulative Concatenate" Label="">
<Input-Parameters>
<Parameter Type="Link" Value="1" Guid="{033CA7BF-0B8A-4FF5-AD81-04680F9AC48D}" />
</Input-Parameters>
</Functoid>
<Functoid FunctoidID="2" X-Cell="57" Y-Cell="215" Functoid-FID="106" Functoid-Name="String Extract" Label="">
<Input-Parameters>
<Parameter Type="Link" Value="6" Guid="{094BEFBA-37BD-44D6-A434-E9857B35A083}" />
<Parameter Type="Link" Value="7" Guid="{0BB8F0D7-08DF-4C23-A9F8-62A51C510258}" />
<Parameter Type="Link" Value="8" Guid="{490276A9-4D39-47B8-9722-0AC5B30E3A32}" />
</Input-Parameters>
</Functoid>
<Functoid FunctoidID="3" X-Cell="54" Y-Cell="213" Functoid-FID="101" Functoid-Name="String Find" Label="">
<Input-Parameters>
<Parameter Type="Link" Value="2" Guid="{FB3CB398-D84F-4A0C-A0E8-AC296FACF4BF}" />
<Parameter Type="Constant" Value="XT" Guid="{5429782D-3043-45B9-81CD-0B68330F0747}" />
</Input-Parameters>
</Functoid>
<Functoid FunctoidID="4" X-Cell="56" Y-Cell="213" Functoid-FID="118" Functoid-Name="Addition" Label="">
<Input-Parameters>
<Parameter Type="Link" Value="3" Guid="{0F92C50A-FB69-47CB-B28A-4F381E44B57E}" />
<Parameter Type="Constant" Value="2" Guid="{906BB748-9C48-436B-8F97-C8D214F6A7D7}" />
</Input-Parameters>
</Functoid>
<Functoid FunctoidID="5" X-Cell="56" Y-Cell="217" Functoid-FID="119" Functoid-Name="Subtraction" Label="">
<Input-Parameters>
<Parameter Type="Link" Value="5" Guid="{8C71F161-B146-4E3D-A316-F9862F6D53A1}" />
<Parameter Type="Constant" Value="1" Guid="{7074AE22-7CA5-4BC1-A0D0-BDB37C44E00E}" />
</Input-Parameters>
</Functoid>
<Functoid FunctoidID="6" X-Cell="54" Y-Cell="217" Functoid-FID="101" Functoid-Name="String Find" Label="">
<Input-Parameters>
<Parameter Type="Link" Value="4" Guid="{6877A8E0-607B-4B34-9E4C-A7539B0F6728}" />
<Parameter Type="Constant" Value="LAST" Guid="{CCFB44D1-CABE-44CC-ADC9-E305723452DE}" />
</Input-Parameters>
</Functoid>
<Functoid FunctoidID="7" X-Cell="59" Y-Cell="215" Functoid-FID="260" Functoid-Name="Scripting" Label="">
<Input-Parameters>
<Parameter Type="Link" Value="9" Guid="{D367F85B-FE51-43FD-83D3-2ECD1D3F21A2}" />
</Input-Parameters>
<ScripterCode>
<Script Language="CSharp"><![CDATA[///*Uncomment the following code for a sample Inline C# function
//that concatenates two inputs. Change the number of parameters of
//this function to be equal to the number of inputs connected to this functoid.*/public string MyConcat(string aString)
{aString = aString.Replace(" ","");
int i = 2 ;
int intIndex = 0;
int intstrCode=0;
int IntPreva2Index=0;
string strcode;
string strnumber;
string strnumberDec;
string strnumberFinal;
string strFinalOutput="<Taxes>";
int a2LastIndex = 0;
do
{
int a2 = aString.IndexOf(".",intIndex);
if (aString.Length – a2LastIndex == 5)
{
i = 3;
}
else
{
strnumberDec = aString.Substring(a2 + 1, 2);
strnumber = aString.Substring(intstrCode, a2 – IntPreva2Index);
strnumberFinal = strnumber + "." + strnumberDec;
strcode = aString.Substring(a2 + 3, 2);
intstrCode = aString.IndexOf(strcode) + 2;
IntPreva2Index = a2 + 5;
intIndex = a2 + 1;
strFinalOutput = strFinalOutput + "<Data><Code>" + strcode + "</Code><Value>" + strnumberFinal + "</Value>";
}
a2LastIndex = a2;} while (i == 2);
strFinalOutput=strFinalOutput+" </Taxes>";
return strFinalOutput;
}]]></Script>
</ScripterCode>
</Functoid>
</Functoids>
</Page>
</Pages>
</mapsource>—————————————————-
You may have already run across this but is a good place to add a reference…MSDN: Database Structure and Jobs
Let's start by heading down the correct path…
You control the INTERNAL schema. You Own it, its yours. So, you map from the "interesting" input schema to your internal schema that you create that puts the data into a clean and manageable format, but only because it's a best practice and the right thing to do. Map your data in the Receive port and handle only the internal schema in your orchestration, if you need one (if not, then great…just use another map to the outbound schema.)
That said, I'd suggest as a starting point a concatenation of the <line> elements and then isolate the pattern that delineates the beginning and end of the data you care about.
Since I know I could break that data down using the FlatFile Schema Wizard, I'm sure there are methods to help you break it down. I'd probably start with string functoids, get frustrated and write a script, before searching BizTalkGurus.com and then Google.
Hope this helps, even a little bit.
You can create a Send Port Group where one Send Port copies the file, and the other(s) handle processing. I have one port copy an input file to "archive", one sends an SMTP notification, and the third sends the file to the "submit" or processing folder, where of course its Received and handled by a pipeline, mapper, and orchestration. Set the filter (such as a Receive port name) in the send port group, not the individual send ports, so your file/message doesn't get deleted before another port can handle it.
Is this what you were looking for?
I was having a lot of trouble with that using Oracle…what most of my current customers use, and decided to use OUT paramaters instead, to make life easier. There are, I'm sure, several dozen other methods at getting at these values, including third party adapters like TopXML. I would suggest trying to add the Out param IF you have some control over the SQL code and there aren't too many fields to return.
I haven't tested too many other ways, so maybe someone else had the answer you're looking for, but I'll keep my eyes open as well.
Of course, you can always access the table directly or use a view if that's an option.
You can use BAM. This will allow you to report on what is happening from the aggregated data – this will not be much use as a validity check in the Orders system and will probably duplicate reports from the Order system.
You can total values in a map. You can use the RecordCount functoid to count the number of orders per file and the CumulativeSum functoid for the total orders value. To sum product quantities or amounts will probably require some custom Xslt in a map as you will need to group products by SKU .
On the field, set Right Justify with a Pad character of 0
Are you running separate host instances?
Yea it does. Thanks a bunch Henry
Sinkablehail,
there's a section in the BizTalk 2006 Recipes book that describes inserting a record into a SQL database, pages 337-358, and there's also a section for calling stored procedures. I highly recommend the book, even though it is expensive at $60 retail. The ISBN is 978-1-59059-711-8 and it was published in 2006.
Hope this helps.
Just create a map and use the Cumulative Sum functiod. I think this will do exactly what you want. You of course will also have to create a schema for the output of the map.
January 19, 2007 at 11:28 AM in reply to: How does biztalk standard edition add up the licenses? #17325I'm fairly sure that the "limit on partners" doesn't apply on BTS 2006. Are you thinking about BTS 2004 requirements?
The "application" takes over, and Standard can only have 5 of them. So, you could manage multiple partner connections in a single "application", it just makes it bit more challenging. The concept of "parties" still exists, and yes, you manage them from the Admin Console. But from a licensing perspective, it shouldn't matter which Edition you use with regards to party count.
[quote user="Henry M."]
Sinkablehail,
yes, use a SQL adapter and you can read & write information to a SQL Server database.
[/quote]
Thanks for the tip Henry. Do you by any chance happen to have any links on creating a sql adapter in Biztalk??
Sinkablehail,
yes, use a SQL adapter and you can read & write information to a SQL Server database.
John,
no, it wasn't related to Share Point; when I was first hacking together the project as a newbie I clicked on something to make "backup" copies. Since I wasn't (then or now) an expert it was accidental rather than a clever developed solution, and I'm almost certain it was related to configuring ports in BT Admin.
-
AuthorPosts