Monday, December 5, 2011

Biztalk Server 2010 EDI 999 Functional acknowledgement support

BizTalk Server 2010 Cumulative Update 3 made available recently has included the awaited 999 Functional Acknowledgement support. More can be found in this KB article. 

Sunday, October 23, 2011

Installing Microsoft WebMatrix 2 Beta

Attended a Microsoft Web Camp recently focused on WebMatrix, Html5 and Css3. My first bits of experience with the tool. Will be installing Web Matrix 2.0 beta.

  • Start with the download here.
  • With the Web Platform Installer 4.0,  the installation is not much trouble. 
Fig.1 Web Platform Installer 4.0
  • Click Install and the list of all dependencies are available right away. Note: I had .Net Framework 4.0 pre-installed on my machine.
Fig.2 Web Platform Installation
  • Click Accept and the download and installation starts.
Fig.3 Quick Start MS WebMatrix


Friday, October 21, 2011

Polling using BizTalk WCF Oracle Adapter

Came across this scenario of polling an Oracle table from BizTalk Server 2010 using the WCF Oracle Adapter and a requirement of running a post poll statement which updates the table in one of my forum posts. Used the WCF Consume Adapter Service to do a small POC for this and following are a few steps that I followed.

  • Used the Consume Adapter Service Wizard to connect to the oracle DB using the oracleEBSBinding and create a Service inbound operation for a schema artifact Test table. This will create a set of Schemas and a binding file with a receive port

Fig.1 Consume Adapter Service
  • Next I created the receive port using the auto-generated binding file and then a send port to a file location with a filter to subscribe the messages which will published by the receive port. As shown in Fig.2, I have set the required polledDataAvailableStatement, pollingAction,pollingInput(FOR UPDATE), pollingInterval and postPollStatement(UPDATE) properties on the receive port. The pollingAction can be taken from the metadata of the auto-generated schema. Following is an example(have changed the schema name)
         <xs:documentation>
          <doc:action xmlns:doc="http://schemas.microsoft.com/servicemodel/
            adapters/metadata
           /documentation">Tables/Poll/SCHEMA_NAME/TEST</doc:action> 
         </xs:documentation>

Fig.2 WCF Custom Transport Properties for Receive Port
  • To test this I deployed the auto-generated schemas and started the send port and enabled the receive port. The results in the outbound folder as shown in Fig.3
Fig.3 Outbound Folder.
  • Note that the result of the polling input in this case is after applying the postPollStatement.


Tuesday, October 11, 2011

Debatching Incoming Messages from Biztalk WCF Oracle Adapter

De-batching inbound messages from BizTalk WCF SQL Adapter using TypedPolling has been meticulously explained by Richard here.  Thought about doing something similar with the WCF Oracle Adapter and using the InboundOperationType as Polling. Following are the steps that I undertook to achieve this.

  • Use the consume adapter service to create the auto generated schemas for the select operation on a table in oracle. This step generates a schema and a binding file. 
  • Changed the schema to set the enevlope property to Yes.
Fig1. Envelope schema



  • Added the Body XPath property on the SelectReponse node that is the response with the multiple rows to point to SelectResult, its child record. SelectResponse is the message retured by the WCF Oracle Select operation. Changed the max-occurs to 1 from unbounded for the child record of SelectResult. This will be the type of message generated after de-batching.
Fig.2 Setting body XPath for Envelope schema

  • Sign this project and deploy the schema project.
  • Create a receive port to get the trigger message for getting data from oracle table. Kept it simple at select * from table. This is the message of the auto-generated type Select.
          Sample message :
Fig. 3 Sample XML request for WCF Oracle Adapter.

  • Imported the binding file to create the request response port for the oracle adapter select from table operation. Create a filter on the WCF send receive port so that it picks the trigger message directly from the message box.
Fig. 4 Filter on WCF request response port.

  • Created a send port with a filter BTS.SPName = <<WCF Send Port Name>> to pick the response of WCF send port and drop into a file location.
  • Ran the test with a trigger file. This resulted in the seperate debatched rows being created by the send port created in #7.
Fig.5 Outbound folder containing de-batched rows.


Note: if the auto-generated schema is not changed to envelope the send port created to pick response messages of WCF send receive port will create a single file containing all records.



Thursday, October 6, 2011

Pinning a site in IE9

Pinning is a very good way of getting more site impact. Pinning capabilities can be used to grab attention and pull more users into the site. More info on buildmypinnedsite

Wednesday, October 5, 2011

A Gem of a Technologist Mr. Steve Jobs

For certain Mr. Steve Jobs will be remembered for ages as a great technologist and innovator. A very sad news. My fond respects to the legend .. 

Thursday, September 29, 2011

Install and Run Windows 8 on Mac 10.7 Lion using VMware Fusion

There's a loud buzz for Windows 8 Developer preview released recently. Thought of giving it a try on my Macbook. Following are a few steps:
  • Download the windows 8 developer preview from the Windows Dev Center.
  • Launched the newly bought VMware Fusion 4.
  • Command+N to open the New Virtual Machine Assistant.
Fig. 1

  • Click continue without a disc.
  • Check Use operating system installation disc or image.
    Fig. 2
  • Choose operating system Windows and Version Windows 7 x64
Fig. 3
  • Click Finish and it will ask for saving the VM.
Fig. 4

  • Click on the play button on the VM and it will start the windows 8 installation.
Fig. 5


Fig. 6

Fig. 7 Personalize screen


Fig.8 Preparing your PC screen

Fig. 9 Post Login Start Screen

  • After the complete Windows Install, tried VMware tools and to my utter surprise they installed like charm.
Fig.10 VMware Tools installation

Overall, a different UI for the start and nice options. The mac trackpad just  works well too with the swipe gesture showing the way around.

Tuesday, September 27, 2011

How to use Oracle Stored Proc with XMLType parameters in BizTalk 2010


Had a scenario in one of my projects where in we need to pass XMLType as input parameter and output parameter to a oracle stored procedure. So find some excerpts of the POC in this post.
Following are a few steps that I followed:
1) Created stored procs with XMLType as the input and output parameters.
Fig.1 Oracle Stored Procedure with XMLType parameters

2) Creating the schema's for the Oracle Stored Procedure using the Consume Adapter Service.

Fig.2 Consume Adapter Service

3) Following is the schema generated for the Oracle stored procedure.

Fig.3 BizTalk Auto Generated Schema

4) Created a simple orchestration for picking up the Request File and sending to the Oracle Stored Proc using the auto generated WCF request response port(This gets generated during the Consume Adapter Service).

Fig.4 Sample Orchestration

5) Sample file used for testing is as follows.
Fig.5 Sample File containing XMLType data as a String

6) Sample response file containing the response from the Oracle Stored Proc.

Fig. 6 Response File returned by Oracle Stored Procedure.
Overall, a couple of things to notice that while for using ambientTransactions we need to use a TNS alias. XMLtype is taken as a string so have to take care of the data that goes in the input. Reserved XML characters like '<', '>'. must be replaced with their entity.representations (&lt; and &gt;)

Thursday, September 15, 2011

Microsoft WebMatrix

Have really been intrigued recently by this brand new web development tool from Microsoft that supposedly includes everything we need for our website development including some built in templates. The thing I like most is the open source web applications that we can use to start the website development. And last but not the least, its FREE. More can be found at microsoft/web/. Will be posting more on this. 

.Net Framework 4.5 Developer Preview

With .Net Framework 4.5 Developer Preview, wondering whats in store for BizTalk Server 2010, an R2 update or a vNext. Would be posting more on the new features specially WCF.

Wednesday, September 14, 2011

BizTalk Server 2010 Administrator Training Kit

BizTalk Server 2010 Administrator Training Kit and VHD are great resources for learning about BizTalk Server 2010 administration and can be downloaded from the Microsoft site here. It also provides an option of downloading a Virtual Machine.

Sunday, September 11, 2011

BizTalk Mapper tip to add multiple one to one links from source to destination.

To avoid mapping elements one to one from a source to destination schemas one by one we can use the tip/trick of pressing the Shift Key and then dragging the link from the record node of source schema to the record node of destination schema. As soon as we drop the link the mapper will give us options to select link by structure, link by name and mass copy.
Fig. 1 BizTalk Mapper Tip/Trick.
 Some more BizTalk Mapper Keyboard Shortcuts are available on MSDN here. I often use the ones for search and indicative match.

Friday, September 9, 2011

BizTalk Server 2010 ESB Training Kit and VHD

BizTalk Server 2010 ESB Training Kit and VHD are great resources for learning about ESB Toolkit in BizTalk Server 2010 can be downloaded from the Microsoft site here. It also provides an option of downloading a Virtual Machine.

Copy Name of Element from source to destination in a BizTalk Map

Was question in the forums regarding copying the elements name from a source schema to the destination flat files first row and the values to the other rows.
Following Fig.1 depicts the process by which we can copy the name of the element to a destination node's value. clink on the link and go to Link properties Source Links and change the value to Copy name.

Fig.1 Copy Name of element




















BizTalk XML validator in Decode Stage of the pipeline component

Was a query in the forums about the requirement of using the XML validator component in the decode stage of the receive pipeline component. So thought would do a small test. The XML validator is designed to work in any stage of the pipeline component, except the disassemble and assemble stages. The XML Validator component validates the message against the specified schema or schemas, and if the message does not conform to these schemas, the component raises an error and Messaging Engine places the message in the suspended queue. However, the XML validator does not disassemble the message and if it is used alone in the pipeline component decode stage, the pipeline component might end up being a pass through. To follow up the XML validator in the decode stage we need to have the XML Disassembler component in disassemble stage to actually parse the XML
Fig. 1 is the receive pipeline configuration.
Fig.1 Receive pipeline component

To check the XML validator, tried three failure cases.


  • Different XML


A message received by adapter "FILE" on receive location "RcvLocSampleXML" with URI "D:\Workspace\Bali\SampleXML\Inbound\*.xml" is suspended. 

 Error details: There was a failure executing the receive pipeline: "SampleXML.SampleXMlRcvPipe, SampleXML, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5a23cf5fc2674b2a" Source: "Pipeline " Receive Port: "RcvPortSampleXML" URI: "D:\Workspace\Bali\SampleXML\Inbound\*.xml" Reason: The element 'XMLSample' in namespace 'http://SandboxSchemas.XMLSample' has invalid child element 'FirstNam'. List of possible elements expected: 'FirstName'.  
  • Incorrect data type in one of the elements.
A message received by adapter "FILE" on receive location "RcvLocSampleXML" with URI "D:\Workspace\Bali\SampleXML\Inbound\*.xml" is suspended. 
 Error details: There was a failure executing the receive pipeline: "SampleXML.SampleXMlRcvPipe, SampleXML, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5a23cf5fc2674b2a" Source: "Pipeline " Receive Port: "RcvPortSampleXML" URI: "D:\Workspace\Bali\SampleXML\Inbound\*.xml" Reason: The 'Number' element has an invalid value according to its data type.  

  • Different XML Namespace
A message received by adapter "FILE" on receive location "RcvLocSampleXML" with URI "D:\Workspace\Bali\SampleXML\Inbound\*.xml" is suspended. 
 Error details: There was a failure executing the receive pipeline: "SampleXML.SampleXMlRcvPipe, SampleXML, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5a23cf5fc2674b2a" Source: "Pipeline " Receive Port: "RcvPortSampleXML" URI: "D:\Workspace\Bali\SampleXML\Inbound\*.xml" Reason: The 'http://SandboxSchemas.XMLSample:XMLSampl' element is not declared.  



  • A valid xml but not conforming to the schema.
A message received by adapter "FILE" on receive location "RcvLocSampleXML" with URI "D:\Workspace\Bali\SampleXML\Inbound\*.xml" is suspended. 
 Error details: There was a failure executing the receive pipeline: "SampleXML.SampleXMlRcvPipe, SampleXML, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5a23cf5fc2674b2a" Source: "XML disassembler" Receive Port: "RcvPortSampleXML" URI: "D:\Workspace\Bali\SampleXML\Inbound\*.xml" Reason: No Disassemble stage components can recognize the data.   

Tuesday, September 6, 2011

Cumulative update package 2 for BizTalk Server 2010 and BizTalk Adapter Pack 2010

Cumulative update package 2 for BizTalk Server 2010 and BizTalk Adapter Pack 2010 were released recently.

An Information about BizTalk Server Hotfixes article, which I feel should always be read before we apply the CU packages. 

BizTalk conditional mapping of repeatable records

Was a question in one of the msdn forums, that when mapping repeatable record elements based on a condition to elements of the same record in the destination schema after using the looping functoid, the loop runs only once. In the example in Fig. 1, in the source schema Root1, PHRoot, Record1 and Record2 are all unbounded and in the destination schema RecordDest is also unbounded. Based on element Root1Ele's and Field1's value we need to map Field3 to either FieldGW or FieldLen in the destination. Instinctively we would try to use the looping functoid in such scenarios, but in fact it is not required.

Fig 1. BizTalk conditional mapping scenario
The following was the test sample source and test result.

Source:
<ns0:Root1 xmlns:ns0="http://LoopFunctoid.Schema1">
 <Root1Ele>Root1Ele_0</Root1Ele>
 <PHRoot>
 <FieldRoot>PH</FieldRoot> 
 <Record1>
 <Field1>GW</Field1> 
 <Field2>Field2_0</Field2> 
 </Record1>
 <Record2>
 <Field3>101</Field3> 
 <Field4>Field4_0</Field4> 
 </Record2>
 </PHRoot>
<PHRoot>
 <FieldRoot>PH</FieldRoot> 
 <Record1>
 <Field1>LEN</Field1> 
 <Field2>Field2_0</Field2> 
 </Record1>
 <Record2>
 <Field3>202</Field3> 
 <Field4>Field4_0</Field4> 
 </Record2>
 </PHRoot>
 </ns0:Root1>

Test Result:
<ns0:Root2 xmlns:ns0="http://LoopFunctoid.Schema2">
 <RecordDest>
 <FieldGW>101</FieldGW> 
 <FieldEle>Root1Ele_0</FieldEle> 
 </RecordDest>
 <RecordDest>
 <FieldLen>202</FieldLen> 
 <FieldEle>Root1Ele_0</FieldEle> 
 </RecordDest>
 </ns0:Root2>

BizTalk Table Looping and Table Extractor used for mapping constant values

In this sample, have used table looping functoid and table extractor functoid to create two records with different constant values. The requirement is to create two destination records RecordDest with FieldGW having two constant values viz. 'ABC' and 'DEF', without any link from the source schema.


<ns0:Root2 xmlns:ns0="http://LoopFunctoid.Schema2">

 <RecordDest>
  <FieldGW>ABC</FieldGW> 
  </RecordDest>
  <RecordDest>
  <FieldGW>DEF</FieldGW> 
  </RecordDest>
  </ns0:Root2>

We can achieve this using the table looping and table extractor functoids as depicted in the Fig.1
Fig.1
Following are the configurations of the table looping and table extractor functoids.
Fig.2 Table Looping Functoid Configuration

Fig.3 Table Looping Functoid Configuration

Fig.4 Table Extractor Functoid configuration

BizTalk Server 2010 VHD

Finally, we have a BizTalk Server 2010 VHD available for download here.