Extract the ST information from an N1 loop and populate a flat file

If you’ve ever had problems with using looping on an N1 loop extracting the ship-to information if the ship-to is notin the first loop, this might help.

Old way of doing it.

New way of doing it.

Here’s the functiod logic.

Public Function ReturnSTInfo_1(ByVal IterationSTring_1 As String, ByVal N104_1 As String) As String
Dim BeginningIndexValue_1 As Integer
Dim EndingIndexValue_1 As Integer
Dim LengthOfElement_1 As Integer
BeginningIndexValue_1 = System.Convert.ToInt32(IterationSTring_1.Substring((IterationSTring_1.IndexOf(“ST”) – 2), 1))
EndingIndexValue_1 = BeginningIndexValue_1 + 1
If N104_1.IndexOf(System.Convert.ToString(EndingIndexValue_1) + “*”) = -1 Then

Return N104_1.Substring((N104_1.IndexOf(System.Convert.ToString(BeginningIndexValue_1) + “*”) + 2))

Else

LengthOfElement_1 = (N104_1.IndexOf(System.Convert.ToString(EndingIndexValue_1) + “*”)) – (N104_1.IndexOf(System.Convert.ToString(BeginningIndexValue_1) + “*”) + 2)
Return N104_1.Substring((N104_1.IndexOf(System.Convert.ToString(BeginningIndexValue_1) + “*”) + 2), LengthOfElement_1)

End If
End Function

XML Tools

Goal:
To describethe design time experiencein BizTalk R2EDI.
Overview:
XML Toolsextension hosted in Visual Studio is used to provide design time support to users to improve usability of EDI Schemas and also assist in the validation and generation ofBTS EDIartifacts.The 3 main functions are “Validate Schema“, “Validate Instance“and “Generate Instance“.
To perform these3 functions,a user needs to followseries of […]

BizTalk: Accumulating messages in MessageBox, Lifespan of the messages

I hit this problem when were creating the orchestration to periodically poll the outer service. The orchestration was with loop inside.
The problem was I created the message inside this loop. And the instance of this message were not disposed after each cycle.
The orchestration was createdfor running long time without restart. That means that this orchestration was collecting enormous amount those indisposed messages. And all those messages were inside the MessageBox, of course. It was wrong!
After long and very interesting investigation the issue was resolved.
The source of the problem was in the transactional scope where I created the indisposable message. This scope was inside the loop.
It is interesting but a lifespan of the message created inside the transactional scope and themessage created outside the transactional scope is different. The first one is disposed only after closing the orchestration instance. The second one is disposed after last using. (I think so but could not find a hint in the BizTalk information sea.)
After discovering this the fix was simple. I moved the loop inside the transaction scope.

BAM EventStream in PipelineTesting

BAM EventStream in PipelineTesting

Last night someone brought to my attention that the current versions of PipelineTesting always
return null from the IPipelineContext.GetEventStream() method.
This is expected to return an EventStream object
so that pipeline components can write to BAM, but I never had bothered looking it
up before.

I’ve now fixed this so that the property returns an EventStream-derived class that
simply swallows all calls to it silently, to avoid tying the library to having any
specific BAM infrastructure in place, and this will be included in the next version
of the library.

Is this good enough? Is there anyone who would prefer to have a way to override this
behavior so that a real, connected BAM EventStream object is provided? Does someone
need a way to check as part of the test assertions that specific events were indeed
written to the EventStream? If so, I may look into a way to support this nicely, otherwise,
I’ll leave it as is for now.

technorati PipelineTesting, BizTalk
Server

VSLive! Austin Information

Thanks to everyone who attended my session today at VSLive! Austin. If you’re

interested, here are some relevant links:

  • Codebase

  • Flash recording of the Intro

    to C# 3.0 Talk

If you have friends who you’d like to share the talk with, please feel free to forward

the link above to my screen cast of it.


Tim Rayburn is a consultant for Sogeti in the Dallas/Fort

Worth market.

My Recent "Tour" of the Microsoft Central Region

My Recent "Tour" of the Microsoft Central Region

My friend Chris

Koenigrecently put up a post called “Microsoft Central Region – Who (and where)

are you?” in which he shared the above image which I thought was worth re-sharing

here. So what does this image show? It shows the “sub areas” within Microsoft’s

Central Region where the Evangelism teams focus. Chris, our Developer Evangelist

from Dallas, covers Texas, Oklahoma, Arkansas, and Louisiana. Recently they’ve

added some help for him in the geographically vast area via J Sawyer based in Houston.

Both Houston and Dallas are huge markets for Microsoft and as such having a DE based

in each of these cities will help run Chris a little less ragged.

Now, many of my readers are based in the Dallas/Fort Worth area, and we’re spoiled

because we see Chris on a regular basis because he is based here.

But it is important to remember that he’s just as responsible for the Little Rock,

or Northwest Arkansas groups (not to mention Lubbock group) as he is for those in

D/FW.

I was reviewing this map and realized that in the last several week’s I’ve hit most

of these areas, in fact all but the “Midwest Area”. I’ve covered:

  • North Central

    • Minneapolis BizTalk 2006 R2 Launch

    • Heartland Developer Conference

  • Heartland Area

    • Memphis Day of .NET

  • South Central

    • Little Rock .NET User Group

    • VSLive! Austin

    • Houston BizTalk 2006 R2 Launch

Here is what I can tell you after all traveling:

  • My favorite Marriott hotel chain is the Fairfield Inn chain. Good breakfast

    (unlike Courtyards) and bright, happy rooms.

  • My wife believes I’ve forgotten how to get home.

  • My boss believes I’ve forgotten I’m a billable consultant.

  • I believe that I’m seriously looking forward to vacation next week.


Tim Rayburn is a consultant for Sogeti in the Dallas/Fort

Worth market.