1

A lot of our use cases for Biztalk involve simply mapping and routing HL7 2.x messages from one system to another. Implementing maps and associating them to send/recieve ports is generally straightforward, but we also need to do some content based filtering on the sending side.

For example, we may want to only send ADT A04 and ADT A08 messages to system X if the sending facility is any 200 facilities (out of a possible 1000 facilities we have in our organization), but System Y needs ADT A04, A05, A8 for a totally different set of facilities and only for renal patients.

Because we're just routing messages and not really managing business processes here, utilzing orchestrations for the sole purpose to call out to the business rule engine is a little overkill here, especially considering that we'd probably need a seperate orchestration for each ADT type because of how schemas work. Is it possible to implement filter rules like this without using using orchestrations? The filters functionality of send ports looks a little too rudimentary for what we need, but at the same time I'd rather not develop and manage orchestrations.

Filburt
  • 17,626
  • 12
  • 64
  • 115
Jeremy
  • 44,950
  • 68
  • 206
  • 332
  • 1
    I don't have BizTalk installed at the moment, but am confident you can do what you want without orchestrations, just using send port filtering. You can (I believe, it has been a while) call out to the bre from a receive port if needed (custom pipeline code but not too difficult) to get the right promoted properties into place. – David Hall Jun 26 '12 at 15:55
  • 2
    This blog post describes a somewhat similar scenario. It uses a custom pipeline component which calls the BRE and promotes properties to indicate target subscribers: http://blogs.msdn.com/b/paolos/archive/2011/06/01/a-broker-pipeline-component-for-end-to-end-ordered-delivery.aspx – Ian Gilroy Jun 26 '12 at 16:43
  • Or you can use a pre-rolled custom pipeline component. https://brepipelineframework.codeplex.com/ – Dijkgraaf Jul 22 '16 at 03:27

2 Answers2

3

You might be able to do this with property schemas...

You need to create a property schema and include the properties (from the other schemas) that you want to use for routing. Once you deploy the schema, those properties will be available for use as a filter in the send port. Start from here, you should be able to find examples somewhere...

Fabio
  • 730
  • 3
  • 10
  • You are right, but what I found is that the filter functionality in the send port is so clunky to work with if you are dealing with a lot of filters. Additionally if you had a complex filter in mind "((this and this) or (this and this)) and this) you can't define that type of logic through the send port filter, to my knowledge. – Jeremy Jun 28 '12 at 15:52
  • This is how we do it. We don't have very complex filters though. – Jay Jul 10 '12 at 20:04
  • Not ideal, but complex filters could be achieved by assigning higher-level properties to the message in earlier processing. For example, rather than ((IsManager And IsFinance) or (IsAdmin and IsHR)) And IsActive, you could assign an IsActiveFinanceProcessor property using say a BRE receive pipeline. – Matt Mitchell May 23 '14 at 02:29
0

As others have suggested you can use a custom pipeline component to call the Business Rules Engine.

And rather then trying to create your own, there is already an open source one available called the BizTalk Business Rules Engine Pipeline Framework

By calling BRE from the pipeline you can create complex rules which then set simple context properties on which you can route your messages.

Full disclosure: I've worked with the author of that framework when we were both at the same company.

Dijkgraaf
  • 11,049
  • 17
  • 42
  • 54