- 0 minutes to read

Context options to automate and control logged events during processing in Nodinite

Add any of the documented context values below to a Log Event to help the Nodinite Logging Service determine how to process and present events and messages.

Warning

Beginning with Nodinite 5.1, the name of the context keys start with ExtendedProperties/1.0. In the earlier versions, the name was IM.DefaultProperties/1.0. The old names continue to work for some time, but you should start using the ExtendedProperties/1.0 naming scheme for new development.

1. Control Message/Payload

The following context values control the processing of the message payload

# Context Key Value Applicable Category
1.1 ExtendedProperties/1.0#MessageTypeName string value
1.2 ExtendedProperties/1.0#MessageTypeExtractFromBody true or false
1.3
  • ExtendedProperties/1.0#Filename
  • ExtendedProperties/1.0#FullFilePath
  • Filename
  • FileName
  • filename
  • originalFilename
string value
1.4 ExtendedProperties/1.0#EndPointUri string value
1.5 ExtendedProperties/1.0#Exception string value
1.6 ExtendedProperties/1.0#EndPointName string value

Message Type Name (1.1)

Use to override the logged MessageType name normally extracted from the payload (XML) or provided as part of the Log Event. The name of the Message Type is essential for all logging in Nodinite and must be set for the proper administration of Search Fields and processing by the Logging Service.

Context Key Value
ExtendedProperties/1.0#MessageTypeName https://nodinite.com/Customers/1.0#Batch Any string that that makes the MessageType name unique/distinguishable

Tip

Do version the Target namespace using /1.0 or /2016/05/17 notation as part of the name to provide uniqueness.

Extract Message Type Name from message/payload (1.2)

You can enable/disable the control of how the MessageType name is set by providing a boolean value for the ExtendedProperties/1.0#MessageTypeExtractFromBody property.

If the context property ExtendedProperties/1.0#MessageTypeName is NOT already set, and the ExtendedProperties/1.0#MessageTypeExtractFromBody = true (True or true as a string); Then, the Nodinite Logging Service tries to extract the message type name from the body/payload. This works very well for XML messages where the name of Message Type is translated as TargetNameSpace#RootNodeName.

If you log custom Log Events with XML payloads and provide the ExtendedProperties/1.0#MessageTypeName overriding parameter; The value for this system parameter should be set to false.

Context Key Value
ExtendedProperties/1.0#MessageTypeExtractFromBody true or false, true=enabled, false=disabled

File Name (1.3)

Pre-sets the name used as the file name for a logged event when users perform Resend, Repair and resubmit and Save (Download) operations from within the Web Client.

Context Key Value
ExtendedProperties/1.0#Filename
ExtendedProperties/1.0#FullFilePath
Filename
FileName
filename
originalFilename
Any valid file name with full path read more about valid file paths

Note

To make use of this property, the Log Event must have a body/payload (there must be something to resubmit)

Example Meaning
c:\temp\in\order123.txt Proposed file name in Nodinite is order123.txt and the folder is c:\temp\in\
c:\temp\in\ Proposed file name in Nodinite is auto generated and the folder is c:\temp\in\
c:\temp Proposed file name in Nodinite is temp and the folder is c:\

Webhook (1.4)

Use the Context Property ExtendedProperties/1.0#EndPointUri to control which Webhook to use resending and repairing Log Events.

Review the following essential System Parameter

ResendWebhookSettings

Exception (1.5)

Use the Context Property ExtendedProperties/1.0#Exception to pass a serialized .NET Exception in JSON format.

Endpoint Name (1.6)

Use the Context Property ExtendedProperties/1.0#EndPointName to override the name of the Endpoint.

Repository Binding (2)

# Category Name Values/Example
2.0 ExtendedProperties/1.0#RepositoryBinding Json object bind Transport Contract
2.1.a ExtendedProperties/1.0#IntegrationName INT001 Invoiceflow Northwind to ACME
2.2.a ExtendedProperties/1.0#ServiceName SVC001 Send XML Invoice from Northwind
2.2.b ExtendedProperties/1.0#ServiceSystemName string value
2.2.c ExtendedProperties/1.0#ServiceDirection int or string value
2.3.a ExtendedProperties/1.0#ExternalServiceRelationName SVC001 Send XML Invoice from Northwind
2.3.b ExtendedProperties/1.0#ExternalServiceRelationSystemName string value
2.4.a ExtendedProperties/1.0#InternalServiceRelationName SVC001 Send XML Invoice from Northwind
2.4.b ExtendedProperties/1.0#InternalServiceRelationDirection int or string value
2.5.a ExtendedProperties/1.0#ContractName string value
2.5.b ExtendedProperties/1.0#ContractSystemName string value

Automatically populates the Repository Model and binds the Events' Endpoint + Message Type to a Transport Contract, within a Service.

The following properties can be set to populate an Integration:

  • 2.1.a. Integration Name
    • Service relation
      • 2.2.a. Name
      • 2.2.b. System
      • 2.2.c. Direction
    • Contract relation
      • 2.5.a. Name
      • 2.5.b. System

This feature is available from Nodinite version 4.3.0.72.

2.0 Repository Binding

You can create the Repository entities AND the relation between nearby Services with a single JSON value. You can use this feature instead of the ones listed in 2.1 - 2.5.

  • Context key: ExtendedProperties/1.0#RepositoryBinding

Repository Binding - Service relations
Landscape example with Service relations.

Example of a logged event with a Transport Contract binding:

  • Transport Contract Name: Receive Quotes via JSON. The Message Type and Endpoint are known by the system since they are part of the required fields in the Log Event.
    • Service name: Receive Quotes
      • Direction: Two-WayReceive
      • Target System Name: Mule
    • Integration name: INT004 - Bank (2 Way)
    • ExternalServiceRelations:
      • Service name: Broker A - Get Quote
    • Source System name: Broker A
    • InternalServiceRelations:
      • Service name: Bank - Loan Request (binds internally within the Mule system)
{
	"Name": "Receive Quotes via JSON",
	"Service": {
		"Name": "Receive Quotes",
		"Direction": "TwoWayReceive",
		"System": {
			"Name": "Mule"
		},
		"Integration": {
			"Name": "INT004 - Bank (2 Way)"
		},
		"ExternalServiceRelations": [{
			"Name": "Broker A - Get Quote",
			"System": {
				"Name": "Broker A"
			}
		}],
		"InternalServiceRelations": [{
			"Name": "Bank - Loan Request",
		}]
	}
}

RAW Json where Receive Quotes Service ties to the Log Event.

If you want to test this using the Swagger feature in the Log API, you must pass the data as in the following example:

"ExtendedProperties/1.0#RepositoryBinding": "{\"Name\":\"Receive Quotes via JSON\",\"Service\":{\"Name\":\"Receive Quotes\",\"Direction\":\"TwoWayReceive\",\"System\":{\"Name\":\"Mule\"},\"Integration\":{\"Name\":\"INT004 - Bank (2 Way)\"},\"ExternalServiceRelations\":[{\"Name\":\"Broker A - Get Quote\",\"System\":{\"Name\":\"Broker A\"}}],\"InternalServiceRelations\":[{\"Name\":\"Bank - Loan Request\"}]}}"

Additional example

{
	"Name": "Default",
	"Service": {
		"Name": "Bank - Loan Request",
		"Direction": "TwoWaySend",
		"System": {
			"Name": "Mule"
		},
		"Integration": {
			"Name": "INT004 - Bank (2 Way)"
		},
		"ExternalServiceRelations": [{
			"Name": "Bank Service",
			"System": {
				"Name": "Bank System"
			}
		}],
		"InternalServiceRelations": [ {
			"Name": "Receive Quotes",
		}],
		"BPMs": [ {
			"Name": "Order Flow",
			"Domain": {
				"Name": "Finance"
			},
			"Step": 1,
			"Services": [ {
				"Name": "Receive Quotes",
				"System": {
					"Name": "Bank System"
				},
				"ConnectorType": 1,
				"SourceAttachmentPoint": 1,
				"TargetAttachmentPoint": 1
			} ]
		} ]
	}
}
"ExtendedProperties/1.0#RepositoryBinding": "{\"Name\":\"Default\",\"Service\":{\"Name\":\"Bank - Loan Request\",\"Direction\":\"TwoWaySend\",\"System\":{\"Name\":\"Mule\"},\"Integration\":{\"Name\":\"INT004 - Bank (2 Way)\"},\"ExternalServiceRelations\":[{\"Name\":\"Bank Service\",\"System\":{\"Name\":\"Bank System\"}}],\"InternalServiceRelations\":[{\"Name\":\"Receive Quotes\"}],\"BPMs\":[{\"Name\":\"Order Flow\",\"Domain\":{\"Name\":\"Finance\"},\"Step\":1,\"Services\":[{\"Name\":\"Receive Quotes\",\"System\":{\"Name\":\"Bank System\"},\"ConnectorType\":1,\"SourceAttachmentPoint\":1,\"TargetAttachmentPoint\":1}]}]}}"

2.1 a Integration

2.1 a Name the Integration

Set the unique name for the Integration.

Note

The Integration is only created when either a Service or a Contract is also created.

  • Context key: ExtendedProperties/1.0#IntegrationName
  • Value: string with the Name of the Integration to create like INT001 - X to Y

2.2 Service

Set of properties needed to assign a Service

2.2.a Service Name

Set the name for the Service.

  • Context key: ExtendedProperties/1.0#ServiceName
  • Value: string with the Name of the Service to create like SVC001 - Y

2.2.b System Name

Set the name for the System.

  • Context key: ExtendedProperties/1.0#ServiceSystemName is optional
  • Value: string with the Name of the System this Service is bound to. A new System is created if it does not already exist.

2.2.c Service Direction

Set the direction for the Service. If not set, the direction of the Endpoints is used instead.

  • Context key: ExtendedProperties/1.0#ServiceDirection is optional
  • Value: string or int value from any of the entries in the table below:
string int
'None' -2
'Unknown' -1
'Receive' 0
'Send' 1
'TwoWayReceive' 10
'TwoWaySend' 11

2.2 Service Relation to an External Service

Tie a Service in one System to another Service in another System.

graph LR subgraph "System A" roS1(fa:fa-gear Service 1) end subgraph "System B" roS2(fa:fa-gear Service 2) roS1 --> roS2 end

2.3.a Service Name

Set the name for the Service.

  • Context key: ExtendedProperties/1.0#ExternalServiceRelationName
  • Value: string with the Name of the Service to create like SVC001 - Y

2.3.b System Name

Set the name for the System.

  • Context key: ExtendedProperties/1.0#ExternalServiceRelationSystemName is optional
  • Value: string with the Name of the System this Service is bound to. A new System is created if it does not already exist.

2.4 Service Relation to an Internal Service

Tie a Service in one System to another Service in the same System.

graph LR subgraph "System A" roS1(fa:fa-gear Service 1) --> roS2(fa:fa-gear Service 2) end

2.4.a Service Name

Set the name for the Service.

  • Context key: ExtendedProperties/1.0#InternalServiceRelationName
  • Value: string with the Name of the Service to create like SVC001 - Y

2.4.c Service Direction

Set the direction for the Service. If not set, the direction of the Endpoints is used instead.

  • Context key: ExtendedProperties/1.0#InternalServiceRelationDirection is optional.
  • Value: string or int value as described in the table:
string int
'None' -2
'Unknown' -1
'Receive' 0
'Send' 1
'TwoWayReceive' 10
'TwoWaySend' 11

2.5 Contract

This feature requires that the UseContracts system parameter is set to true.

Set of properties needed to assign a Contract.

The following properties can be set for the Contract:

  • Contract Name
  • System Name

Note

When sending a Contract; You are also supposed to send information about the Service to which the Contract is connected with.

2.5.a. Contract Name

Set the name for the Contract

  • Context key: ExtendedProperties/1.0#ContractName
  • Value: The Name of the Contract. For example, SVC001A - X. The data type is a string. If the Contract does not already exist, it is created.

2.5.b. System Name

Set the name for the System.

  • Context key: ExtendedProperties/1.0#ContractSystemName optional
  • Value: The name of the System the Contract belongs to. The data type is a string. If the System does not already exist, it is created.

3. Event Properties

The following context values control the properties of a Log Event. If you override the default properties with the listed Context Options, a comment is added by the system to the Log Event to help indicate why there is a change.

# Context Key Value Applicable Category
3.1 ExtendedProperties/1.0#LogText string value
3.2 ExtendedProperties/1.0#LogStatus long
ExtendedProperties/1.0#ProcessingServerName string (255)
ExtendedProperties/1.0#ProcessName string (512)
ExtendedProperties/1.0#ProcessingModuleName long
ExtendedProperties/1.0#ProcessingModuleType string (512)
ExtendedProperties/1.0#ProcessingTime int (ms)
ExtendedProperties/1.0#ServiceInstanceActivityId Guid

Log Text (3.1)

Use to set the Log Text property for a Log Event.

  • Context key: ExtendedProperties/1.0#LogText
  • Value: The data type is a string.

Log Text Example

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

Log Status (3.2)

New 5.3.0.40

Overrides the original Log Status and replaces the value for the Log Event. This feature allows you to override the Log Statuses set by the Log Agents, for example, the Nodinite Azure Logic Apps Logging

  • Context key: ExtendedProperties/1.0#LogStatus
  • Value: The expected Data type is long, but a string value is also accepted.

Log Status Example

{"ExtendedProperties/1.0#LogStatus": 42}

Numeric example

or

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

String example


Next Step

Logging Service
Log Agents
Log API - REST-based operations to insert Log Events