Ravindar, Biztalk Developer and Administrator

Just another BizTalk blog

Biztalk Tracking data not visible

TrackingData table rows count should usually be close to 0.

but if we see huge count here, it means there is an issue with Tracking host.

SELECT COUNT(*) FROM [BizTalkMsgBoxDb].[dbo].[TrackingData]

create a new host, create a corresponding new host instance and remove the old ones. This should fix the issue

https://jeremiedevillard.wordpress.com/2011/07/01/no-data-in-the-tracked-services-instances-of-the-biztalk-administration-console/

http://www.manuelmeyer.net/2012/03/enable-biztalk-trackingthe-message-was-not-found-in-the-message-box-or-the-tracking-database/

August 17, 2017 Posted by | Uncategorized | Leave a comment

Octopus variable not identifying HTML content

You should define your variable in settings file generator like
#{variable name here | HtmlEscape}

so you should add the escaping character

August 10, 2017 Posted by | Uncategorized | Leave a comment

Purpose of each tables in BiztalkMgmtDb

https://social.technet.microsoft.com/wiki/contents/articles/22940.biztalkmgmtdb-all-table-details.aspx

June 26, 2017 Posted by | Uncategorized | Leave a comment

Loop through a set of variables or set of elements

To loop through a set of specific variable values


<xsl:for-each select="$var1 | $var2 | $var3 ">
<xsl:if test=".!=''">   (to test if the varirable value is not null)

<xsl:value-of select="."/>
<xsl:if test="not(position() = last())">,</xsl:if>   (to avoid last comma)
</xsl:if>

</xsl:for-each>

 

 if you want to loop through a set of node values

<xsl:for-each select="element1Xpath/text() | Element2Xpath/text()| ElementNxpath/text()">
        <xsl:value-of select="."/>
        <xsl:if test="not(position() = last())">,</xsl:if>
      </xsl:for-each>

June 11, 2017 Posted by | Uncategorized | Leave a comment

DanSharp Xml viewer

DanSharp is a another tool to test your xpath queries

https://dansharpxmlviewer.codeplex.com/

June 9, 2017 Posted by | Uncategorized | Leave a comment

Multilevel xpath filtering

when you want to do multilevel filtering, make sure you embed the multilevel element structure in brackets inside the filter box []

 

/*[local-name()=’BankPartyProductChangedEvent’ and namespace-uri()=’test’]/*[local-name()=’DataArea’ and namespace-uri()=’test’]/*[local-name()=’CommonData’ and namespace-uri()=’test’]/*[local-name()=’LocationList’ and namespace-uri()=’test’]/*[local-name()=’Location’ and namespace-uri()=’test’][(*[local-name()=’AddressReference’]/@*[local-name()=’referenceKey’])=’1′]/@*[local-name()=’key’ and namespace-uri()=”]

 

May 25, 2017 Posted by | Uncategorized | Leave a comment

Concatenate repeating node with a delimiter

<xsl:element name="ns0:Dummy">
     <xsl:for-each select="/s0:BankPartyProductChangedEvent/s0:DataArea/s0:PartyList/s0:Party/s0:DataProtectionList/s0:DataProtection">
         <xsl:if test="position()>1">
             <xsl:value-of select="','"/>
         </xsl:if>
         <xsl:value-of select="s0:DataTypeCode/text()"/>
      </xsl:for-each>
<xsl:element>

May 23, 2017 Posted by | Uncategorized | Leave a comment

Convert input message to a string from map

I have seen users asking for a requirement, where they want the entire incoming message to be converted to string and mapped to a node in destination field in BizTalk Map.

You can refer this to achieve it

 

also there is another simple method that you can implement in Inline Xslt

 


<xsl:element name="targetElementname" >

<xsl:text disable-output-escaping ="yes">&lt;![CDATA[</xsl:text>

<xsl:copy-of select="//*[local-name()='TRANSACTION' and namespace-uri()='']"/>  (this is the xpath of the source node  which we want to copy underlying node xml structure)

<xsl:text disable-output-escaping ="yes">]]&gt;</xsl:text>

</xsl:element>

June 11, 2015 Posted by | Uncategorized | Leave a comment

How to create ‘for’ loop in Biztalk map using functiods

http://blogs.msdn.com/b/pedram/archive/2006/12/27/how-to-create-a-for-loop-in-biztalk-mapper.aspx

June 10, 2015 Posted by | Uncategorized | Leave a comment

access Ports from Powershell

A user asked in the forums here how to access ports through wmi.

my sample solution to access ports is below


Microsoft.BizTalk.ExplorerOM.BtsCatalogExplorer catalog = new Microsoft.BizTalk.ExplorerOM.BtsCatalogExplorer();

foreach (Microsoft.BizTalk.ExplorerOM.Application application in catalog.Applications)
            {


                foreach (Microsoft.BizTalk.ExplorerOM.ReceivePort recport in application.ReceivePorts)
                {
                    foreach (Microsoft.BizTalk.ExplorerOM.ReceiveLocation recloc in recport.ReceiveLocations)
                    {
                        System.Console.Write(recloc.Address);
                    }

                }



                foreach (Microsoft.BizTalk.ExplorerOM.SendPort sendport in application.SendPorts)
                {
                    System.Console.Write(sendport.PrimaryTransport.Address);
                }


            }


Also another user asked here wanted to unbound an orchestration completely programmatically. here is the solution

[void] [System.reflection.Assembly]::LoadWithPartialName("Microsoft.BizTalk.ExplorerOM")

#=== Connect to the BizTalk Management database ===#

$Catalog = New-Object Microsoft.BizTalk.ExplorerOM.BtsCatalogExplorer
$Catalog.ConnectionString = "SERVER=.;DATABASE=BizTalkMgmtDb;Integrated Security=SSPI"


$MyApplication = $Catalog.Applications["TestApp"]
$MyApplication.Stop(63)
 $Catalog.SaveChanges()
$orch = $MyApplication.orchestrations

foreach ($CurrentOrchestration in $orch)
{
    $CurrentOrchestration.Host=$null
    $CurrentOrchestration.Status = [Microsoft.BizTalk.ExplorerOM.OrchestrationStatus] "Enlisted"
    
    $CurrentOrchestration.Status = [Microsoft.BizTalk.ExplorerOM.OrchestrationStatus] "Unenlisted"
    
    
    foreach ($CurrentPort in $CurrentOrchestration.Ports)
        {            
                $CurrentPort.ReceivePort=$null
                $CurrentPort.SendPort=$null
         
        }

}
 $Catalog.SaveChanges()

January 9, 2015 Posted by | Uncategorized | Leave a comment