Skip to main content

UpdateRtEntityIfNewerNodeConfiguration

Namespace: Meshmakers.Octo.MeshAdapter.Nodes.Load

UpdateRtEntityIfNewer node configuration. Filters a list of EntityUpdateInfo candidates by comparing each candidate against the existing RT entity that shares the same RtWellKnownName. Older candidates (whose UpdateRtEntityIfNewerNodeConfiguration.ComparisonAttributePath is not strictly greater than the existing entity's value) are skipped from the RT-write path but kept — with the existing RtId — on the all-output path so a downstream archive write can still land the corrected slot in storage.

public record UpdateRtEntityIfNewerNodeConfiguration : NodeConfiguration, INodeConfiguration, IEquatable<NodeConfiguration>, IEquatable<UpdateRtEntityIfNewerNodeConfiguration>

Inheritance Object → NodeConfiguration → UpdateRtEntityIfNewerNodeConfiguration
Implements INodeConfiguration, IEquatable<NodeConfiguration>, IEquatable<UpdateRtEntityIfNewerNodeConfiguration>

Remarks:

This node implements the Lesart-D semantics of the time-range-archive simulation: the RT entity holds the most recent measured value (per (parent, ObisCode) pair, identified by RtWellKnownName); the archive holds the full back-fillable time series. Late-arriving or back-filled slots must not regress the RT snapshot but must still be persisted in the archive.

Behaviour per input entry (carries an EntityModOptions.Insert with a freshly generated RtId; RtWellKnownName is required for the dedup):

No matching existing entity ⇒ pass through as Insert on both outputs.

Existing entity, candidate's comparison value > existing's ⇒ rewrite as Update targeting the existing RtId on both outputs.

Existing entity, candidate's comparison value ≤ existing's ⇒ omitted from UpdateRtEntityIfNewerNodeConfiguration.FilteredOutputPath; emitted on UpdateRtEntityIfNewerNodeConfiguration.OutputPathAll as an Update carrying the existing RtId and the candidate's attributes (so the archive write sees the corrected slot).

Input entries without an RtWellKnownName are passed through as Insert on both outputs (the dedup is structurally impossible).

Race window: the lookup is done in a separate session from the subsequent ApplyChanges@2 write. A concurrent writer between the two would not be detected. Acceptable for the simulation; not a production-grade dedup.

Properties

InputPath

JSONPath to the input List<EntityUpdateInfo<RtEntity>> of candidate updates. Required.

public string InputPath { get; set; }

Property Value

String

FilteredOutputPath

JSONPath where the filtered list is written. Contains only entries that should reach the downstream ApplyChanges@2 (Insert + Update with strictly newer comparison value). Required.

public string FilteredOutputPath { get; set; }

Property Value

String

OutputPathAll

JSONPath where the complete list is written, including skipped entries (with the existing RtId substituted in). Consumed by downstream archive-write nodes that must store every slot even when the RT snapshot is not advanced. Required.

public string OutputPathAll { get; set; }

Property Value

String

ComparisonAttributePath

Attribute path on the candidate's RtEntity.Attributes dictionary that holds the monotonic comparison value (typically a UTC DateTime). Supports nested traversal of record-typed attributes via dot notation, e.g. "TimeRange.From". Required.

public string ComparisonAttributePath { get; set; }

Property Value

String

CandidateAssociationsInputPath

JSONPath to an input List<AssociationUpdateInfo> of candidate parent associations (one per candidate entity, origin pointing at the candidate's freshly-generated RtId). Optional — when set, the node also writes a filtered association list at UpdateRtEntityIfNewerNodeConfiguration.FilteredAssociationsOutputPath that contains only the associations whose origin entity stayed an Insert in the filtered output. Associations whose origin was rewritten to Update or dropped (SKIP) are removed, since the existing entity already has its parent association in the runtime store.

public string CandidateAssociationsInputPath { get; set; }

Property Value

String

FilteredAssociationsOutputPath

JSONPath where the filtered association list is written. Required when UpdateRtEntityIfNewerNodeConfiguration.CandidateAssociationsInputPath is set.

public string FilteredAssociationsOutputPath { get; set; }

Property Value

String

Description

public string Description { get; set; }

Property Value

String

Constructors

UpdateRtEntityIfNewerNodeConfiguration()

Caution

Constructors of types with required members are not supported in this version of your compiler.


public UpdateRtEntityIfNewerNodeConfiguration()