Skip to content
Documentation
Updated 3 minutes to read
Markdown

Message Context Key Search Field Expression Plugin

Section titled “ Message Context Key Search Field Expression Plugin”

The Message Context Key plugin returns the value of one context property of a Log Event, looked up by its exact key. There's no pattern and no parsing: the whole value becomes the Search Field value. Use it when a context property already holds exactly the value you want, such as an order number or a file name set by the sender.

  • ✅ Simplest way to read a context value: enter the key, get the value
  • ✅ Reads only the context properties; the message body is never read

Message Context Key returns Northwind Traders from the CustomerName context key, animated walkthrough (7.12)
Animated walkthrough: the key CustomerName on the context of a logged Order-to-Cash order confirmation returns the value Northwind Traders, as it is.

Message Context Key and the four RegEx plugins cover the combinations of where the text is and what part of it you want. For every plugin, see Choose a plugin.

Your data You want Use
One context value (you know the key) The value as it is, no pattern Message Context Key (this page)
One context value (you know the key) The whole match of a pattern RegEx on Message Context
One context value (you know the key) Only the part inside a capturing group ( ) RegEx on Message Context with capturing groups
XML stored in a context value An XPath result XPath on Message Context
Message body The whole match of a pattern RegEx
Message body Only the part inside a capturing group RegEx with capturing groups
Several keys that match a pattern Their values Formula with context(regex('…'))

Select Message Context Key in the Type list and enter the key in the Expression field.

Type list open with the Expression Types, among them Message Context Key (7.12)
The Message Context Key plugin in the Type list.

  • The Expression is the key itself, not a pattern. Write it exactly as it's logged: the key is case-sensitive, so customername doesn't find CustomerName.
  • The whole value is returned as it is, for example a full file path.
  • BizTalk context properties are logged as namespace#property, for example http://schemas.microsoft.com/BizTalk/2003/file-properties#ReceivedFileName.
  • Context properties and the reserved keys are described in Context Options. Properties that the ContextPropertiesFilters System Parameter removes aren't kept, so don't base a Search Field on them.
  • To test, add the key and its value on the Message Context tab of Test Expression. When the key is missing, the test reports Processed with warning: The Expression yields no result:

Test Expression result: Processed with warning, The Expression yields no result (7.12)
Test result when the key isn't among the context properties.

Configure and test the expression as described in Add or manage Search Field and Test Your Expression.

Example 1: Return the value of a custom context key

Section titled “Example 1: Return the value of a custom context key”
Key Value
ProductOfTheYear Nodinite
ProductOfTheYear
Nodinite

Test Expression for Message Context Key returning Nodinite from the ProductOfTheYear context key (7.12)
Test Expression: the value of ProductOfTheYear from the Message Context tab.

Example 2: Return the full path of the file that BizTalk received

Section titled “Example 2: Return the full path of the file that BizTalk received”
Key Value
http://schemas.microsoft.com/BizTalk/2003/file-properties#ReceivedFileName C:\Integration\In\Orders\PO_4711.xml
http://schemas.microsoft.com/BizTalk/2003/file-properties#ReceivedFileName
C:\Integration\In\Orders\PO_4711.xml

To keep only the file name PO_4711.xml, use RegEx on Message Context with ([^\\]+$).

Message Context Key test: the BizTalk ReceivedFileName key returns the full file path (7.12)
The full namespace#property key returns the logged value as it is.

...

Version:
Release date: N/A
Loading...

Explore Nodinite for 30 days – completely free

  • Find out why this is the leading O&M software
  • Prove your business case
  • Test the self-service for the business side

Loading...

See how Nodinite resolves your technical issues, in a LIVE Demo!

Once you submit this request:

  • We will give you a short call to understand the issues you want to tackle.
  • Understand solutions you have tried and why were you not happy with them.
  • Book a convenient slot for a LIVE demo!

Loading...