Adding Copy and Paste to SharePoint with the SmartTools

Adding Copy and Paste to SharePoint with the SmartTools

I’ve just uploaded a new extensions to the SmartTools for SharePoint project on CodePlex. This extension adds Copy and Paste functionality to SharePoint Document Libraries. You can download the extension from the Releases section. For more info and screenshots see the CopyPaste Wiki page on CodePlex.

Technorati Tags: sharepoint,wss,moss,copypaste,smarttools,copy,paste

Tips for Using PIDX Schemas in BizTalk Server 2006

Day 3 in my RosettaNet implementation nightmare and I still can’t see the end of the road!

As you may or may not know, the American Petroleum Institute (API) has it’s own set of XML schemas and transport standards know as the Petroleum Industry Data Exchange or PIDX for short. This is the actual “standard” that my current RosettaNet project is really all about. The interesting about these schemas is the fact that they use their own unique namespace and prefix as shown below:

xmlns:pidx=http://www.api.org/pidXML/1.0

Since the BizTalk Mapper tool always generates XML document with the “ns0″ prefix and there is no property you can set to change this, you’ll need to use a little “XSLT slight-of-hand” to get this to work.

Step 1: Create your BizTalk Map as you normally would using the mapper tool.

Step 2: Validate your map and open the xslt generated by BizTalk Server 2006 in your favorite text editor. This file can usually be found in the “\temp\_mapdata” folder.

Step 3: Replace all instances of the namespace prefix “ns0″ with the prefix you require (which in this case is “pidx”) as shown below.

Step 4: Save the result as an .xslt file and include it (or add it) into your BizTalk project.

Step 5: Create a new map using the same source and destination schemas you used in Step 1 but use the external xslt you generated by setting the “Custom XSLT Path” property on your new map.

The results are shown in the figure below. Viola! The “ns0″ namespace prefix has been replaced by the desired “pidx” prefix.

Click below for more information about using external xslt in your maps.

Custom XSLT in BizTalk Maps

Take Away: There is always more than one way to skin a cat! In BTS2006 it may not be obvious how to do something a little unusual.

How to: After disassembling a message, how to know when to exit a processing loop when all messages have been received

How to: After disassembling a message, how to know when to exit a processing loop when all messages have been received

This question and response came up on a forum. I’ve never seen this referenced before so I thought it was worth blogging.

Problem:

BizTalk is receiving a flat file (can contain up to a million records) and doing a disassemble in a pipeline using a flat file schema. The individual messages are processed by a sequential convoy (Singleton) based on a correlation. The orchestration receives the message in a loop that follows the correlation set from the receive port where receive location split the flat file into smaller messages.

To specify a proper exit criteria to exit the loop and stop the convoy I need to know the number of messages in the flat file. But since I am using the default flat file disassembler, I have no clue how many messages are in the file.

Solution:

There’s a property promoted in the last of the disassembled messages in an interchange: BTS.LastInterchangeMessage = true. This tells you the last message in the interchange and in conjunction with BTS.InterchangeSequenceNumber you can tell the total number of messages in the interchange (in case you get them out of order).

Biztalk Solution Factory

Jean-Paul Smit has released a Biztalk Solution Factory on Codeplex. His post about it is here. I joined up on another project , the Biztalk Application Factorya while ago but have been so snowed under with project work that i couldnt really get any contributions there up and running. Jean-Paul also mentions the work done […]