Wednesday, 8 June 2016

How are you populating Shared Access Key for SB-Messaging adapter configuration using BTDF PortBindingsMaster.xml

How are you populating Shared Access Key for SB-Messaging adapter configuration using BTDF PortBindingsMaster.xml
Answer:
Just to change vt value to 8 like vt-8.

Problem:
<ReceiveLocationTransportTypeData>&lt;CustomProps&gt….&lt;SharedAccessKeyName vt="8"&gt;${SB_SharedAccessKeyName}&lt;/SharedAccessKeyName&gt….&lt;SharedAccessKey vt="11"&gt;${SB_SharedAccessKey}&lt;/SharedAccessKey&gt….</ReceiveLocationTransportTypeData>

In this case SharedAccessKey set to Empty

Solution:
<ReceiveLocationTransportTypeData>&lt;CustomProps&gt….&lt;SharedAccessKeyName vt="8"&gt;${SB_SharedAccessKeyName}&lt;/SharedAccessKeyName&gt….&lt;SharedAccessKey vt="8"&gt;${SB_SharedAccessKey}&lt;/SharedAccessKey&gt….</ReceiveLocationTransportTypeData>

This time shared access key populated properly.



Thursday, 2 June 2016

Check If element exists in BizTalk Orchestration - Handy solution


Most often we need to check some variable and take a call in BizTalk Orchestration to perform some task. If those variables doesn't have any business value/meaning we prefer not use Decide Shape.

I have similar scenario where I need to check whether inbound message has an element in message and populate context property accordingly.    

 I have take a approach check xPath exists in Expression Shape of the orchestration and initialize context property.

Code in Expression shape:

vHaveAttachment = System.Convert.ToString(xpath(msgInternalClaim,"string(//*[local-name()='ClaimLodgementProcess' and namespace-uri()='http://www.acord.org/schema/data/draft/ReusableDataComponents/1']/*[local-name()='ClaimLodgement' and namespace-uri()='http://www.acord.org/schema/data/draft/ReusableDataComponents/1']/*[local-name()='FileAttachment' and namespace-uri()='http://www.acord.org/schema/data/draft/ReusableDataComponents/1'])"));
if(System.String.IsNullOrEmpty(vHaveAttachment))
{
    vHaveAttachment = "Yes";
}
else
{
    vHaveAttachment = "No";
}

Code in Message Assignment shape:
msgInternalOut(TAL.myApp.Integration.Claims.Schema.Common.Attachment) = vHaveAttachment;

Note Property schema of Common.Attachment need to be set "Property Schema Base" as MessageContextPropertyBase.

Doing this once msgInternalOut published together with Attachment context property.

Hope, it help to give a understanding how to use if condition in Orchestration with xPath.
Happy to answer if you have need any clarifications.

Happy coding..


Tuesday, 17 May 2016

BizTalk Pipeline Component >> get ready to use directly from Visual Studio

BizTalk Pipeline Component >> get ready to use directly from Visual Studio

It's bit tedious task to build, gac and copy BizTalk Pipeline Component and again go back build and deploy BizTalk Pipeline..

Here is simple solution to it:

Visual Studio 2010 & BizTalk 2010: Write the below lines in
Project Property >> Build Events >> Post-build event command line (as show in picture below)

CALL "%VS100COMNTOOLS%vsvars32.bat"
gacutil.exe /i "$(TargetPath)"

copy "$(TargetPath)" "C:\Program Files (x86)\Microsoft BizTalk Server 2010\Pipeline Components" /y

Visual Studio 2013 & BizTalk 2013 R2: Write the below lines in
Project Property >> Build Events >> Post-build event command line (as show in picture below, Just Copy and Paste as is)

CALL "%VS120COMNTOOLS%vsvars32.bat"
gacutil.exe /i "$(TargetPath)"
copy "$(TargetPath)" "C:\Program Files (x86)\Microsoft BizTalk Server 2013 R2\Pipeline Components" /y

Hoping it helps to reduces your development hassle.. Happy coding. :) 
leave your feedbacks..