- 6 minutes to read

Context Options

Context Options are context keys with the ExtendedProperties/1.0# prefix that change how the Logging Service processes a Log Event. Add them as key/value pairs to the Context of the event.

The Message Type keys control Step 2 of the processing pipeline (Message Type determination), which decides the Search Field Expressions that are evaluated in Step 3.

Warning

From Nodinite 5.1+, context keys use the ExtendedProperties/1.0 prefix. Legacy IM.DefaultProperties/1.0 keys remain supported, but use the new format for new development.

Reference

Message and Payload

Control how the payload is processed and how the Message Type is determined.

Context Key Value Purpose Details
ExtendedProperties/1.0#MessageTypeName string Forces the Message Type name, overriding auto-detection Message Type Name
ExtendedProperties/1.0#MessageTypeExtractFromBody true / false Enables (true) or disables (false) Message Type extraction from the payload Extract from payload
ExtendedProperties/1.0#Filename
ExtendedProperties/1.0#FullFilePath
Filename / FileName / filename
originalFilename
string (file path) Default filename and folder for Resend, Repair, and Save in the Web Client File Name
ExtendedProperties/1.0#EndPointUri string (URL) Webhook URI used for Resend and Repair (ResendWebhookSettings) Webhook
ExtendedProperties/1.0#Exception string (JSON) Serialized .NET exception, in JSON format
ExtendedProperties/1.0#EndPointName string Overrides the Endpoint name
ExtendedProperties/1.0#Encoding string (name or number) Character encoding of the body New 7.11 Encoding

Repository

Create and bind Repository Model entities (Integrations, Services, Systems, Contracts) from the Log Event. The structure, field tables, and examples live on Repository Binding. Available from Nodinite 4.3.0.72+, and only when the AllowRepositoryAutomapping System Parameter is enabled.

Context Key Value Purpose Details
ExtendedProperties/1.0#RepositoryBinding string (JSON) Creates the complete Repository structure (Service, System, Integration, relations, BPM) with one value; replaces the individual keys below Repository Binding
ExtendedProperties/1.0#IntegrationName string Integration name Individual keys
ExtendedProperties/1.0#ServiceName string Service name Individual keys
ExtendedProperties/1.0#ServiceSystemName string System of the Service Individual keys
ExtendedProperties/1.0#ServiceDirection int or string Direction of the Service Direction values
ExtendedProperties/1.0#ExternalServiceRelationName string Related Service in another System Individual keys
ExtendedProperties/1.0#ExternalServiceRelationSystemName string System of the external related Service Individual keys
ExtendedProperties/1.0#InternalServiceRelationName string Related Service in the same System Individual keys
ExtendedProperties/1.0#InternalServiceRelationDirection int or string Direction of the internal related Service Direction values
ExtendedProperties/1.0#ContractName string Contract name Individual keys
ExtendedProperties/1.0#ContractSystemName string System of the Contract (optional) Individual keys

Event Overrides

Override the default Log Event fields. The system adds comments to the event to indicate overridden values.

Context Key Value Purpose Details
ExtendedProperties/1.0#LogText string Replaces the Log Text shown for the event (the LogText field) Example
ExtendedProperties/1.0#LogStatus long or string Replaces the Log Status code (the LogStatus field) New 5.3.0.40 Log Status
ExtendedProperties/1.0#ProcessingMachineName string (255) Replaces the server name (the ProcessingMachineName field)
ExtendedProperties/1.0#ProcessName string (512) Replaces the process name (the ProcessName field)
ExtendedProperties/1.0#ProcessingModuleName string Replaces the module name (the ProcessingModuleName field)
ExtendedProperties/1.0#ProcessingModuleType string (512) Replaces the module type (the ProcessingModuleType field)
ExtendedProperties/1.0#ProcessingTime int (ms) Replaces the processing duration (the ProcessingTime field)
ExtendedProperties/1.0#ServiceInstanceActivityId Guid Replaces the activity identifier (the ServiceInstanceActivityId field)

Choosing a Value

Message Type Name

Set MessageTypeName so the right Search Fields are extracted when the Message Type can't be detected, or must not be:

  • Non-XML formats (EDI, flat files, JSON without schema) that can't be auto-detected
  • Override auto-detection based on business logic
  • Complex routing scenarios with format-specific handling

Use any unique string, for example https://nodinite.com/Customers/1.0#Batch.

Tip

Version the namespace using /1.0 or /2016/05/17 notation for uniqueness.

For example, a flat file invoice without a Message Type won't extract Search Fields. Setting ExtendedProperties/1.0#MessageTypeName to FlatFileInvoice/1.0 enables extraction of invoice numbers, customer IDs, and amounts.

Extract Message Type from Payload

If ExtendedProperties/1.0#MessageTypeName is not set and MessageTypeExtractFromBody is true, the Logging Service extracts the Message Type from the payload:

  • XML: TargetNameSpace#RootNodeName
  • JSON: Schema identifier properties
  • EDIFACT: UNH segment, formatted by EDIMessageTypeParseString

For example, for region-based routing, set MessageTypeName to Invoice-EU/1.0 and MessageTypeExtractFromBody to false to prevent the XML namespace from overriding your business logic.

File Name

The filename keys pre-set the filename and folder for Resend, Repair, and Save operations in the Web Client. The value is a valid file path (Windows path rules).

Note

Requires a body/payload to function.

Example Result
c:\temp\in\order123.txt Filename: order123.txt, Folder: c:\temp\in\
c:\temp\in\ Auto-generated filename, Folder: c:\temp\in\
c:\temp Filename: temp, Folder: c:\

When a user repairs and resubmits the message to an ActiveMQ queue, the ResubmitContextValuesForActiveMQ System Parameter selects which context properties are attached as message properties.

Webhook

EndPointUri sets the Webhook URI that Resend and Repair send the message to. The Webhook targets themselves, and whether users may edit the URI, are defined in the ResendWebhookSettings System Parameter.

Encoding

Encoding sets the character encoding of the message body for this Log Event New 7.11. Use an encoding name or numeric value from the supported encodings table, for example Windows-1252, 6, or base64:utf-8.

This value has the highest priority: it overrides an encoding named in the XML declaration of the body, the Character encoding of the Endpoint, and the Character encoding of the Message Type. The Logging Service uses it for processing and re-indexing, and the Web Client uses it as the default in View Message, in Stylesheets, and in the Search Field Wizard.

Important

A value that matches none of the supported encodings falls back to UTF-8.

Log Status

New 5.3.0.40 Override the Log Status set by Log Agents (e.g., Azure Logic Apps Logging). Send the code as a number or as a string; see the examples.

Examples

Context Options go in the Context object of a JSON Log Event. The snippets below show the Context object only.

Set the Log Text

{"ExtendedProperties/1.0#LogText": "The node that unites different systems. Or as we call it Nodinite"}

Override the Log Status

As a number:

{"ExtendedProperties/1.0#LogStatus": 42}

As a string:

{"ExtendedProperties/1.0#LogStatus": "42"}

Set the Encoding

{"ExtendedProperties/1.0#Encoding": "UTF-8 (with BOM)"}

Combine Keys

{
  "ExtendedProperties/1.0#MessageTypeName": "FlatFileInvoice/1.0",
  "ExtendedProperties/1.0#MessageTypeExtractFromBody": "false",
  "ExtendedProperties/1.0#Filename": "c:\\temp\\in\\order123.txt",
  "ExtendedProperties/1.0#Encoding": "Windows-1252"
}

For a complete RepositoryBinding value, see the Repository Binding examples.

Next Steps