Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Orchestation/Receive Shape Filter
- This topic has 3 replies, 1 voice, and was last updated 9 years, 3 months ago by
community-content.
-
AuthorPosts
-
-
December 20, 2006 at 12:40 PM #17020
Is it possible to use wild card filters on a receive shape within an orchestration? The Receive port for this shape is using "Direct Binding" so within my receive shape I would like to specify a filter based on a promoted property.
In my case I am using a TopXML POP3 Adapter so the following property is promoted when emails are received: BTSUtils.Mail.Schemas.Properties.Mailheader.subject . I would like the orchestration to be involked when ever this subject line == "Routine XXXXXXX" The X's refer to an order number that comes in and this a unique number. Is it possible to attach a wild card character after the "Routine" to ensure that as long as the subject contains "Routine" and anything else this orchestration will be involked. I have tried BTSUtils.Mail.Schemas.Properties.Mailheader.subject == "*Routine*" but when I send in a message I get a Routing Failure.
Any ideas?
Thanks,
wearsy
-
December 20, 2006 at 8:35 PM #17034
Not really any easy way to do it… What I would do is create a custom pipeline component and resided after the Xml Disassembler. I’d read the email subject property and then either edit it or set the text to another property. It could be as simple as having .net code to check if your Routine XXX exists and set a custom property isRoutine and then all you have to do is filter on isRoutine. Make sense?
All in all, this should only be a few lines of code. Guessing 10 to 20 total.
Make sure you sue the BizTalk Pipeline Wizard. It’s a huge time saver.
Oh, guess you could also do the sample type of thing in a Orchestration. Easer to code, but not the right place to do this I’d say.
-
December 21, 2006 at 9:53 AM #17046
Thanks Stephen for the reply.
I noticed that when I use the >= predicate that it seems to work. I need to do some more testing.
I guess the initial problem stems from having multiple orchestrations pull email from the same mail box. So what I was thinking of doing was that I would have one receive port/location that would poll this inbox looking for messages of a particular keyword in the Subject. As mentioned I am using the TopXml POP3 receive adapter that allows for regular expressions. However it will just look for keywords in the message and then determine whether to down load where as what I was noticing in the filter expression it was only the standard predicates. What I did do was change the Receive port's keywords to include ROUTINE|TEST (so the subject must contain either ROUTINE or TEST for the email to be retrieved) I subsequently created two subscriptions…one for the ROUTINE 123456 emails to go to an orchestration and one that had "TESTS" go to a Send port subscription based upon the promoted property.
On the surface it looks like it is working, however I need to do some more testing as it almost seems too good to be true.
But, otherwise I may use the method that you described above.
-
March 6, 2007 at 4:49 PM #17870
I was able to confirm the behaviour of this filter with Microsoft Premier Support. The Filter Expression uses a dictionarly comparision meaning that the predicate will work but you need to be careful not to "over include" items that you do not want. For instance if you wanted to include ROUTINE ###### you could have a filter that works like this promotedProperty >= ROUTINE 0 and promotedProperty <=999999
Not the best solution but it does work depending upon requirements.
-
-
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.