Home » BizTalk ServerRSS

Filter file based on date

Hi,

I have a process that writes xml files to a share. BizTalk has a couple of subscribers to this file. I need to enhance some functionality here by promoting a datetime value within the file. Only if the current date is greater than the promoted value should the file be processed.

Any ideas?

Thanks

 

5 Answers Found

 

Answer 1

Hi,

One optionis is to have the check in custom pipeline component and promote a (boolean) property i.e. ProcessMessage.  Set its value to true if current date  is greater  than date value you want to compare and false otherwise.  Then you can use this  promoted  property (ProcessMessage) in your send port or orchestration to make decision whether to process  message or not.

Regards,

Tariq Majeed

 

Answer 2

Hi,

You can make a distinguished field in schema for the file. Distinguished fields are usefull when you want to make decisions or to manipulate data in an orchestration. The pipeline disassembler will insert a Written property into the message context for items that are marked as a distinguished field. This is usefull if you are working with an orchestration to process  the file. Other option is to use a promoted  property, as criteria for message routing. Which is available in an orchestration too. Files that need to be processed  are routed to a destination, where this happens (i.e. orchestration or target system). You can create promote properties in schema belonging file  or Tariq suggest not in schema, but in custom pipeline component. Note here that Distinguished fields and promoted properties have to always get Min/Max Occurs = 1. See also MSDN About Message Context Properties. You have a few options here to your scenario.

HTH

Regards,

Steef-Jan Wiggers
MCTS BizTalk Server
http://soa-thoughts.blogspot.com/
If this answers your question please mark it accordingly

 

 

 

Answer 3

Hi Tariq,

Suppose the date  today+2 days. I need the file  to be processed  2 days later....

Not sure i can handle that with the boolean property

 

Answer 4

Hi,

In that case you can use a store-and-forward principle, where you evaluate the date  using promoted  property or distinguished field (as discussed in previous posts). If file  does not have to be processed  than it is stored in database or folder and picked up or submitted the next day.

HTH

Regards,

Steef-Jan Wiggers
MCTS BizTalk Server
http://soa-thoughts.blogspot.com/
If this answers your question please mark it accordingly

 

 

Answer 5

Yes..the store and forward is the only thing that will work. I am proceeding with that approach.
 
 
 

<< Previous      Next >>


Microsoft   |   Windows   |   Visual Studio   |   Follow us on Twitter