BizTalk Server General - Date fitering on receiveport

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > November 2004 > Date fitering on receiveport





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Date fitering on receiveport
Lars W. Andersen

2004-11-11, 7:46 am

Hi,

I need some design help

I have a stream of data I use for another interface. I would like to
subscribe to some of these data for use in another interface. My stream
outputs data for 90 days but I only need data for today and two days forward
in time.

The data I subscribe to, have a date and a time, but it is not in a datetime
format. They are just string values in elements. E.g.

<date>
<year>2004</year>
<month>10</month>
<day>31</day>
</date>

Can i do something funky in a receiveport filter, like call a datetime
function and return a stringvalue that I match up against each of these
three element?

I would hate to have to map all 9000 messages to a datetime format, just to
get the 300 messages I need.

regards
Lars


Stephen W. Thomas

2004-11-11, 7:46 am

Here is one idea:

You could create a custom Receive Pipeline component that xpaths these
values out of the message. At that point, you can build your datetime
easily. Then, you can do some logic or call an outside component that
determines if you care about that data. This would isolate your business
logic and allow it to change easily, just in case tomorrow you only want 1
day of data.

Then, you could set a custom promoted property like CurrentInfo = “true” or
something more meaningful. This would then be routed to the correct
Orchestration or Send Port.

Hope this helps.

Stephen W. Thomas
http://www.geekswithblogs.net/sthomas



"Lars W. Andersen" wrote:

> Hi,
>
> I need some design help
>
> I have a stream of data I use for another interface. I would like to
> subscribe to some of these data for use in another interface. My stream
> outputs data for 90 days but I only need data for today and two days forward
> in time.
>
> The data I subscribe to, have a date and a time, but it is not in a datetime
> format. They are just string values in elements. E.g.
>
> <date>
> <year>2004</year>
> <month>10</month>
> <day>31</day>
> </date>
>
> Can i do something funky in a receiveport filter, like call a datetime
> function and return a stringvalue that I match up against each of these
> three element?
>
> I would hate to have to map all 9000 messages to a datetime format, just to
> get the 300 messages I need.
>
> regards
> Lars
>
>
>

Lars W. Andersen

2004-11-11, 5:49 pm

Good idea! It sounds like the architecturally right thing to do.

Only problem is ... I havent coded any custom pipelines before and I have a
tight deadline (I know I should have played around with it before I needed
it for real .. just didnt have the time . I'm gonna give it a go though.

Where wwould be the right place to start? I have the pipeline wizard
installed. Is the SDK a good place to start, or are there better ways to
dive into custom pipelines components?

regards
Lars

"Stephen W. Thomas" <StephenWThomas@discussions.microsoft.com> wrote in
message news:E3864AD2-9F88-4D9D-92B1-6ADB68B32E1D@microsoft.com...
> Here is one idea:
>
> You could create a custom Receive Pipeline component that xpaths these
> values out of the message. At that point, you can build your datetime
> easily. Then, you can do some logic or call an outside component that
> determines if you care about that data. This would isolate your business
> logic and allow it to change easily, just in case tomorrow you only want 1
> day of data.
>
> Then, you could set a custom promoted property like CurrentInfo = "true"

or[vbcol=seagreen]
> something more meaningful. This would then be routed to the correct
> Orchestration or Send Port.
>
> Hope this helps.
>
> Stephen W. Thomas
> http://www.geekswithblogs.net/sthomas
>
>
>
> "Lars W. Andersen" wrote:
>
forward[vbcol=seagreen]
datetime[vbcol=seagreen]
to[vbcol=seagreen]


Stephen W. Thomas

2004-11-11, 5:49 pm

Well, with a tight deadline I would probably go directly to looking at
samples and skip the SDK. But, I have not looked at the SDK myself.

The wizard is great and will say you time. I would put all the code in the
Execute method of the pipeline.

Take a look at this MSDN whitepaper:
http://www.microsoft.com/belux/nl/m...s/custompp.mspx
It has source code too. I think it is basically what you want to do, less
the string concatenation of the date.

If you have additional questions, just let me know.

Stephen W. Thomas
http://www.geekswithblogs.net/sthomas


"Lars W. Andersen" wrote:

> Good idea! It sounds like the architecturally right thing to do.
>
> Only problem is ... I havent coded any custom pipelines before and I have a
> tight deadline (I know I should have played around with it before I needed
> it for real .. just didnt have the time . I'm gonna give it a go though.
>
> Where wwould be the right place to start? I have the pipeline wizard
> installed. Is the SDK a good place to start, or are there better ways to
> dive into custom pipelines components?
>
> regards
> Lars
>
> "Stephen W. Thomas" <StephenWThomas@discussions.microsoft.com> wrote in
> message news:E3864AD2-9F88-4D9D-92B1-6ADB68B32E1D@microsoft.com...
> or
> forward
> datetime
> to
>
>
>

Lars W. Andersen

2004-11-12, 2:47 am

Great! Thanks for the input Stephen.

regards
Lars

"Stephen W. Thomas" <StephenWThomas@discussions.microsoft.com> wrote in
message news:D400B7F0-862F-4607-9B77-5222E7AA5256@microsoft.com...
> Well, with a tight deadline I would probably go directly to looking at
> samples and skip the SDK. But, I have not looked at the SDK myself.
>
> The wizard is great and will say you time. I would put all the code in

the
> Execute method of the pipeline.
>
> Take a look at this MSDN whitepaper:
>

http://www.microsoft.com/belux/nl/m...s/custompp.mspx[vbcol=seagreen]
> It has source code too. I think it is basically what you want to do, less
> the string concatenation of the date.
>
> If you have additional questions, just let me know.
>
> Stephen W. Thomas
> http://www.geekswithblogs.net/sthomas
>
>
> "Lars W. Andersen" wrote:
>
have a[vbcol=seagreen]
needed[vbcol=seagreen]
though.[vbcol=seagreen]
business[vbcol=seagreen]
want 1[vbcol=seagreen]
"true"[vbcol=seagreen]
stream[vbcol=seagreen]
datetime[vbcol=seagreen]
these[vbcol=seagreen]
just[vbcol=seagreen]


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com