Monday, 31 December 2012

BizTalk Error : a correlation may be initialized only once

While Intializing correlation set in Orchestration loop, you might get the following specified error.

Error : "a correlation may be initialized only once"

The solution for this is to add new scope and move your send shape inside scope, Create this correlation set inside this scope, will resolve this errror.

A very good article xplaining this you can find on Rohit Blog. Correlation Error

Friday, 28 December 2012

XPATH Testing TOOL

Hi Friends,

I was working on XML message in BizTalk expression editor for specific business requirement  and wanted to read few values based on XPATH. I was specifying the XPATH in expression editor and then running BizTalk application but unfortunately not able to get the desired response. Tried many time changing XPATH in expression editor But every time changing in BizTalk orchestration and then build/deploy and restart host-instance was too much time consuming process. So thought to write a Simple C# console application to test my XPATH.

But Then I found on internet that There is already an online tool to test your XPATH with input XML message/data. I checked and  it worked for me. Thanks to this it resolved my XPATH problem in just few minutes. So thought share it with all who need it.

XPATH  Tester  :   http://www.xpathtester.com/

Tuesday, 18 December 2012

Javascript Popup with background blocked

Created a simple .aspx page to show Javascript Popup, which will block the background.

To implment this, we need to create.
  1. Css - style for DIV
  2. JavaScript - to support this functionality
  3. DIV tage in .aspx page - used to show/hide on click
  4. Button - to get Event

Following is the simple sample code that, You can use for this fucntionality.

<html>
<
head>
<script type="text/javascript">function showPopUp(el) {
var cvr = document.getElementById("cover")
var dlg = document.getElementById(el)cvr.style.display =
"block"dlg.style.display = "block"if (document.body.style.overflow = "hidden") {cvr.style.width =
"1024"cvr.style.height = "100%"}
}
function closePopUp(el) {
var cvr = document.getElementById("cover")
var dlg = document.getElementById(el)cvr.style.display =
"none"dlg.style.display = "none"document.body.style.overflowY = "scroll"}
</script>

<style type="text/css">#cover {
display: none;
position: absolute;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
background: gray;
filter: alpha(Opacity = 50);
opacity: 0.5;
-moz-opacity: 0.5;
-khtml-opacity: 0.5}
#dialog {
display: none;
left: 100px;
top: 100px;
width: 300px;
height: 300px;
position: absolute;
z-index: 100;
background: white;
padding: 2px;
font: 10pt tahoma;
border: 1px solid gray}
</style>
</
head><
body><
form runat="server"><
div id="cover"></div><
div id="dialog">Popup DIV<br/><input type="text"/><asp:TextBox ID="TextBox1" runat="server"></asp:TextBox><br/><input type="button" value="Submit"/><br/><a href="#" onclick="closePopUp('dialog');">[Close]</a></
div><
a href="#" onclick="showPopUp('dialog');">Show</a></
form></
body></
html>

JavaScript to hide/show DIV

ASP.NET, Toggle DIV on button click

To toggle DIV using javascript,we simply add a button in .aspx page and DIV with menu itme in it. which will toggle based on onclick/onmouseover event.
  1. Add button in .aspx page
<asp:Button ID="Button1" runat="server" Text="Send to my Facebook" Width="20px" OnClientClick="toggle('mnDv');" />

   2.Add DIV  to toggle onclick event
<div id="mnDv" runat="server"><asp:Menu ID="NavigationMenu" runat="server" CssClass="menu" EnableViewState="false" IncludeStyleBlock="false" Orientation="Horizontal"><Items><asp:MenuItem NavigateUrl="~/Default.aspx" Text="Home"/><asp:MenuItem NavigateUrl="~/About.aspx" Text="About"/></Items></asp:Menu></div>
3 .Add Javascript method hide/show DIV

<script type="text/javascript">function toggle(id) {
var o = document.getElementById(id);o.style.display = (o.style.display ==
'none') ? 'block' : 'none';}
</script>
4 . Now click on toggle button to hide/show DIV.
This can also work of  onmouseover event of button.
Enjoy....Happy Coding.

Tuesday, 4 December 2012

BizTalk Debatching message using Custom Pipeline

The following article explain "Splitting/Debatching message using Custom Pipeline component".

Message Splitting, promoting everything happens in Pipeline, So to achieve our output(Splitting) we need to write custom pipeline component. We need to split the message in pipeline component, need get the message based on our Splitting criteria from XML.

Following link explain the creating custom Pipeline component


http://www.codeproject.com/Articles/17140/Debatching-Large-Messages-and-Extending-Flatfile-P

Thanks to blogs.msdn.com and codeproject.com

BizTalk : Accessing context/Promoted properties within maps.


BizTalk does not provide  any asset or control using which we can use Context/Promoted property in maps. It say instead of using specific field of message use entire message as source input to map.

Promoted Property  : This property are used for content based routing, If we want to use any schema field outside the Orchestration then we can promote that field.  Once the property is promoted It will be accessible outside the Orchestration like in send port filter. Based on this promoted property we can make required routing decision.

Now, If some specific  design/development require a Context/Promoted property value in the map then for this case we need to implement a custom functoid  to read a Context/Promoted property value. We can use the following link dll and refer to this project, This link exactly explain how to do this. Instead of developing custom functoid we can use the dll shared on CodePlex and blog.

    - download dll


Thanks to BizTalk247 and Codeplex.com