- 8 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 Logging Service determine how to process events and messages.

The following tables show all assignable context options that determine run-time behaviour for the Logging Service:

From 5.1 the context keys start with ExtendedProperties/1.0 in erlier version the name was IM.DefaultProperties/1.0 that will continue to work but for new development you should use ExtendedProperties/1.0 key.

1. Control Message/Payload

The following context values control the processing of the message payload

# Category Name Data
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.1 Message Type Name

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

Note: Target namespace should be versioned, using /1.0 or /2016/05/17 notation to provide uniqueness

1.2 Extract Message Type Name from message/payload

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

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

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

1.3 FileName

Pre-sets the name used as a filename 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

2. Repository Binding

# 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 for an Integration:

  • 3a. Integration Name
    • Service relation
      • 4a. Name
      • 4b. System
      • 4c. Direction
    • Contract relation
      • 5a. Name
      • 5b. System

This function is available from Nodinite version 4.3.0.72

3a Integration name

Set the name for the Integration.

Note: Integration is only created when either a Service or a Contract is created

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

4 Service Relation

Set of properties needed to create a Service within Nodinite

4a. 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

4b. System Name

Set the name for the System.

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

4c. Service Direction

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

Context key ExtendedProperties/1.0#ServiceDirection optional
Value: string or int from the table below:

string int
'None' -2
'Unknown' -1
'Receive' 0
'Send' 1
'TwoWayReceive' 10
'TwoWaySend' 11

This function is available from Nodinite version 4.3.0.72 and fully functional from version 5.0.0.0

2.0 Repository Binding

Use this instead of the other 2.1 - 2.5 context properties to set all information about the Context key ExtendedProperties/1.0#RepositoryBinding

Repository Binding - Service Relations Example of a logged event at Integration INT004 - Bank (2 Way) in the System Mule, Service is Receive Quotes, Transport Contract name will be set to Receive Quotes via JSON The Service origin of the event is Broker A - Get Quote in System Broker A. The Service Receive Quotes will in the integration platform Mule (System) publish this message and be picked up by the Service Bank - Loan Request which in this example is a Two-Way send service.

{
	"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",
			"Direction": "TwoWaySend"
		}]
	}
}

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 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 will be created if it does not already exists.

2.2.c Service Direction

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

Context key ExtendedProperties/1.0#ServiceDirection is optional
Value: string or int from table below

2.2 Service Relation to a external Service

This Service is an external Service to bind a Service Relation to

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 will be created if it does not already exists.

2.4 Service Relation to a internal Service

This Service is an internal Service within the same System to bind a Service Relation to

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 will be used instead.

Context key ExtendedProperties/1.0#InternalServiceRelationDirection is optional
Value: string or int from table below

2.5 Contract

Set of properties needed to assign a Contract (For Nodinite with Contract enabled Integration is also set for the Contract)

The following properties can be set for Contract:

  • Contract Name
  • System Name

Note: When sending a Contract you are also supposed to send information about connected Service

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. Data type is string. If the Contract does not already exist, it will be 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. Datatype is string. If the System does not already exist, it will be created.

3. Event properties

3.1 Log Text

If the context property ExtendedProperties/1.0#LogText is set and no LogText is set for the Log Event the LogText value will be set as log text for the event.


Next Step

Logging Service
Log Agents