BizTalk Tracking Archive Database ‘Stitcher’ tool

Vishal has written a great tool (very easy to use) that will incrementally
add your current Tracking Archives to a ‘master’ tracking database that has all the
goodies in it for analysis.
BTS
Stitching tool

So in essence you keep your production Tracking database down in size!!!! no
30GB databases please!! (on several occasions it’s been days to reduce
these DBs)
Schedule regular archiving and pruning—> use this tool –> you then have a
regular complete Tracking DB for super analysis.

—– Snippet from the Readme file —–
Once the aggregate database has been setup there are multiple
ways you can add another backup to it.

  1. You explicitly specify the backup file to the sql stored procedure.

  2. You can specify a folder containing a list of backups to the
    sql stored procedure. The stored procedure automatically appends the backups taking
    care of the order in which they need to be uploaded. All backups that have already
    been uploaded or are older than the last one added, will be automatically skipped.

  3. <fully automated> After a setup
    a SQL server agent job is added. You can enable the job and specify the folder location.
    The job automatically runs and appends and new backups
    .

Enjoy,
Mick.

Attending Microsoft SOA and Business Process Conference at Redmond – Day 0

I arrived in Bellevue, Washington on Sunday for the Microsoft SOA and Business Process Conference, the conference officially started tonight with with the Early Registration Reception at Parlor Billards. It was great to catch up with the poeple I had met at last years conference and to finally put faces to the people I have been talking to via the BizTalk MVP monthly conference calls. The next 4 days are packed with lots of BizTalk, BPM and SOA information, I am sure that I will be suffering a good case of information overload by the end of the week.

TimRayburn.CustomFunctoids – FormatDate

Today’s
functoid addresses another classic “scripting” problem within the BizTalk Mapper.

Often when mapping I find that I am being given dates in an established format (often
“yyyyMMdd” the EDI standard) and need to translate that date into another format
used by the destination schema (usually “MM/dd/yyyy”).  A perfectly reasonable
thing to need to do within a data transformation engine.  Normally this would take
a scripting functoid when done correctly (when done incorrectly it can involve a dozen
or more string functoids).  This functoid will add to the Conversion group
and take three parameters, the first is a date, the second is the format in which
the date is currently formatted, and the third is the desired format of the date.

For those more interested in the .NET than the functoid, you will note I used the
little known DateTime.ParseExact in this functoid.  This requires us to provide
an IFormatProvider.  Since BizTalk is a service, I opted to use the System.Threading.Thread.CurrentThread.CurrentCulture. 
The other option would have been CurrentUICulture, but that could provide very strange
results.

Download
TimRayburn.CustomFunctoids v1.0

   10     class FormatDateFunctoid : BaseFunctoid
   11    
{
   12     
   public FormatDateFunctoid()
   13     
   {
   14     
       // Assign a "unique" id
to this functiod
   15     
       this.ID = 24604;
   16 
   17     
       // Setup the resource assembly
to use.
   18     
       SetupResourceAssembly(
   19     
          "TimRayburn.CustomFunctoids.CustomFunctoidsResources",
   20     
          Assembly.GetExecutingAssembly());
   21 
   22     
       SetName("IDS_FORMATDATEFUNCTOID_NAME");
   23     
       SetTooltip("IDS_FORMATDATEFUNCTOID_TOOLTIP");
   24     
       SetDescription("IDS_FORMATDATEFUNCTOID_DESCRIPTION");
   25     
       SetBitmap("IDB_FORMATDATEFUNCTOID_BITMAP");
   26 
   27     
       this.SetMinParams(3);
   28     
       this.SetMaxParams(3);
   29 
   30     
       SetExternalFunctionName(this.GetType().Assembly.FullName,
   31     
          "TimRayburn.CustomFunctoids.FormatDateFunctoid",
   32     
          "FormatDate");
   33 
   34     
       this.Category = FunctoidCategory.Conversion;
   35     
       this.OutputConnectionType
= ConnectionType.AllExceptRecord;
   36 
   37     
       AddInputConnectionType(ConnectionType.AllExceptRecord);
   38     
       AddInputConnectionType(ConnectionType.AllExceptRecord);
   39     
       AddInputConnectionType(ConnectionType.AllExceptRecord);
   40     
   }
   41     
   public string FormatDate(string inDate, string inFormat, string outFormat)
   42     
   {
   43     
       System.Globalization.CultureInfo ci
= 
   44     
          System.Threading.Thread.CurrentThread.CurrentCulture;
   45     
       DateTime lDate =
System.DateTime.ParseExact(inDate, inFormat, ci);
   46     
       return lDate.ToString(outFormat,ci);
   47     
   }
   48    
}
Bindable CheckedListBox

Bindable CheckedListBox

Had all sorts of problems trying to get the Winforms CheckedListBox to data bind properly.  Found this article and code sample that helped:


http://www.codeproject.com/cs/combobox/ExCheckedListBox.asp


Just needed to add a custom function in T-SQL for the reports:


–select * from fnGetCites(4)


ALTER FUNCTION fnGetCites
(
@Code INT
)
RETURNS @ReturnTable TABLE (CityID INT, CityName VARCHAR(50))
AS BEGIN


DECLARE @CityID INT
DECLARE @CityName VARCHAR(50)



–loop in all items in the cites table
DECLARE crsr CURSOR  FOR SELECT CityID,
    CityName
   FROM Cities


OPEN crsr
FETCH NEXT FROM crsr INTO @CityID, @CityName


WHILE @@FETCH_STATUS = 0 BEGIN
 IF (@Code & POWER(2, @CityID- 1)) = POWER(2, @CityID – 1)
 –ADD TO return table
 INSERT INTO @ReturnTable
 VALUES(@CityID, @CityName)


 FETCH NEXT FROM crsr INTO @CityID, @CityName
END



CLOSE crsr
DEALLOCATE crsr
RETURN


END

Case of the missing CR

There are certain cases where a sending application will not send the ending CR as part of the HL7 message.
The HL7 parser will complain at not finding the ending CR, because it continues to look for it past the EB.
The resolution is simply to leave the CR blank in the adapter configuration and the adapter […]

TimRayburn.CustomFunctoids – Trimmed Value Exists

 Today’s functoid is one which I’ve created in the past for several clients working
with BizTalk 2004 and flat files, especially position files.  Often you will
encounter a situation where the disassembler will give you a value of ”        
.  In BTS 2006 you have the option of setting a fill character that
is ignored by the disassembler, but on ’04 you’ve got to deal with this in the map.

The premise then in simple, to avoid the common pattern of a Trim -> Size ->
Greater Than -> Value Mapping we roll up the first three of these into this single
functoid.  The code is presented below, and you can follow the link to the source
code download.

Download
TimRayburn.CustomFunctoids v1.0

    9     class TrimmedValueExistsFunctoid : BaseFunctoid
   10    
{
   11     
   public TrimmedValueExistsFunctoid(): base()
   12     
   {
   13     
       // Assign a "unique" id
to this functiod
   14     
       this.ID = 24603;
   15 
   16     
       // Setup the resource assembly
to use.
   17     
       SetupResourceAssembly(
   18     
          "TimRayburn.CustomFunctoids.CustomFunctoidsResources",
   19     
          Assembly.GetExecutingAssembly());
   20 
   21     
       SetName("IDS_TRIMMEDVALUEEXISTSFUNCTOID_NAME");
   22     
       SetTooltip("IDS_TRIMMEDVALUEEXISTSFUNCTOID_TOOLTIP");
   23     
       SetDescription("IDS_TRIMMEDVALUEEXISTSFUNCTOID_DESCRIPTION");
   24     
       SetBitmap("IDB_TRIMMEDVALUEEXISTSFUNCTOID_BITMAP");
   25 
   26     
       this.SetMinParams(1);
   27     
       this.SetMaxParams(1);
   28 
   29     
       SetExternalFunctionName(this.GetType().Assembly.FullName,
   30     
          "TimRayburn.CustomFunctoids.TrimmedValueExistsFunctoid",
   31     
          "TrimmedValueExists");
   32 
   33     
       this.Category = FunctoidCategory.Logical;
   34     
       this.OutputConnectionType
= ConnectionType.AllExceptRecord;
   35 
   36     
       AddInputConnectionType(ConnectionType.AllExceptRecord);
   37     
   }
   38     
   public string TrimmedValueExists(string inputVal)
   39     
   {
   40     
       if (inputVal.Length.Equals(0))
   41     
          return "true";
   42     
       else
   43     
       {
   44     
          string trimmedVal
= inputVal.Trim();
   45     
          if (trimmedVal.Length.Equals(0))
   46     
               return "true";
   47     
          else
   48     
               return "false";
   49     
       }
   50     
   }
   51    
}