BizTalk Server 2006
(1)
BizTalk
(1)
XMLReceive
(1)
SampleMessage
(1)
Leonidganeline
(1)
E2E6FD15256F
(1)
Sickness
(1)
Myvalue
(1)

Filtering on custom context properties

Asked By Bria
11-Jul-07 11:58 AM
I'm working on sending out an e-mail for error handling in a BizTalk 2006
solution.  The problem I'm trying to address is once we have BizTalk utilized
across our organization we will have several different groups using BizTalk.
I only want to receive e-mails for my orchestrations and ports.  My current
thought is to try and setup promoted context properties on all my schema's to
be used in the filter of my error handling orchestration.  I created a
property schema along with 2 fields (APPLICATION, MESSAGE_TYPE) and set the
property schema base = MessageContextPropertyBase.  I also set the default
value to be my application group.  I then went into my schema and added the
property schema and didn't map any of the values from my message across since
I always want to use the default value specified.   I deploy my solution and
have a receive port setup with the default XML Receive pipeline.  When I stop
my orchestration from running and check the suspended messages I don't see my
custom context values on my message.  Is what I'm attempting possible or is
there a better solution?  Should the promoted properties be added by the
pipeline?  Can I use the default XMLReceive pipeline or do I need to create a
custom one?

Thanks,
Brian

Adding the prop schema to your message schema (even with default values) isn't

Asked By Scott Colestock
11-Jul-07 12:07 PM
Adding the prop schema to your message schema (even with default values)
isn't sufficient to get the behavior you want.  For a
MessageContextPropertyBase property, you don't need to add the property
schema to your message schema at all - but you *do* need to set the context
property explicitly either in a pipeline or in an orchestration (e.g.
mymsg(myprop) = "myvalue";)

As a side note, if the email is for operational purposes (health/sickness of
the system itself as opposed to a business user interaction) you might want
to consider just writing to the event log (perhaps with a custom event
source) and using a tool like MOM to send the email.  Then you can get alert
consolidation, etc.

Scott Colestock
www.traceofthought.net

This works now that I've added a custom pipeline and set my context properties.

Asked By Bria
11-Jul-07 04:36 PM
This works now that I've added a custom pipeline and set my context
properties.  My next problem is how I can access the custom context
properties in my error handling orchestration.  The orchestration takes in a
generic XML document message and when I try to pull up the context properties
in an expression shape it's unable to fine my custom property schema.  For
example:

SampleMessage(CustomSchema.APPLICATION_GROUP)

Please, check- does your Orchestration is in the same namespace as the

Asked By Leonid Ganeline
12-Jul-07 05:14 PM
Please, check
- does your Orchestration is in the same namespace as the Property schema?
- If your message is the multi-part one, you have to use syntax like
SampleMessage.<part_name>(CustomSchema.APPLICATION_GROUP) (try to type '.'
after 'CustomSchema'...)

--
Regards,

Leonid Ganeline

Microsoft Certified Technology Specialist: BizTalk Server 2006
http://geekswithblogs.net/leonidganeline/
Post Question To EggHeadCafe