Logo
NeoArc Studio

Conflict Types Reference

Complete reference for all transformation conflict types detected during projection mapping, including type conversion, truncation, null handling, precision loss, enum narrowing, pattern mismatch, uniqueness, and multi-input conflicts.

When a source property is mapped to a target property in a projection, the transformation conflict service analyses the property shapes and detects potential data loss, type incompatibilities, and constraint violations. Each conflict includes a severity level, category, human-readable message, and a set of resolution options.

Conflict Model

export type ConflictSeverity = 'error' | 'warning' | 'info';
export type ConflictCategory = 'type' | 'constraint' | 'multi-input';

export interface Conflict {
  ruleId: string;
  severity: ConflictSeverity;
  category: ConflictCategory;
  message: string;
  resolutionOptions: ResolutionOption[];
}

export interface ResolutionOption {
  id: string;
  label: string;
  requiresInput?: boolean;
  inputLabel?: string;
  inputType?: 'text' | 'select' | 'expression';
  selectOptions?: { label: string; value: string }[];
}

Severity Levels

SeverityConnector ColourMeaning
errorRedThe mapping will produce incorrect or impossible results without resolution. The architect must choose a resolution strategy before the mapping can be considered complete.
warningAmberThe mapping may produce data loss or unexpected behaviour. Resolution is recommended but the mapping can proceed.
infoBlueThe mapping is valid but involves a type widening or other notable transformation. No action required.

Conflict Categories

CategoryDescription
typeSource and target properties have different abstract types. Detected by comparing the type field of each PropertyShape.
constraintSource and target have the same or compatible types but differ in constraints (maxLength, nullability, value range, enum values, pattern, uniqueness).
multi-inputMultiple source properties map to a single target property. Requires specifying how the values should be combined.

Type Conflicts

Detected when the source and target abstract types differ. The severity depends on the direction of the conversion.

Safe Type Widenings (info)

The following type conversions are considered safe and produce info-level notifications only. No resolution is required.

Source TypeSafe Target Types
integerstring, text, float, decimal
floatstring, text, decimal
decimalstring, text
booleanstring, text
datestring, text, datetime
uuidstring, text
enumstring, text

Specific Type Conflict Rules

The following type conversions trigger specific conflict rules with tailored resolution options.

Rule IDConversionSeverityResolution Options
type-uuid-to-integeruuid/guid to integererrorCount (aggregation), Count Distinct, Hash to integer, Custom expression
type-string-to-integerstring to integererrorParse (with error handling), Count (aggregation), Custom expression
type-float-to-integerfloat to integerwarningRound, Floor, Ceiling, Truncate
type-decimal-to-floatdecimal to floatwarningAccept precision loss, Custom expression
type-datetime-to-datedatetime to datewarningTruncate time, Accept (time is not meaningful)
type-boolean-to-integerboolean to integerinfoStandard (true=1, false=0), Custom values
type-json-to-stringjson to stringwarningSerialise (JSON.stringify), Extract path (JSON path), Custom expression
type-mismatchAny other type mismatcherrorCast to target type, Custom expression

Constraint Conflicts

Detected when source and target have compatible types but constraints that could cause data loss or rejection.

Rule IDConditionSeverityResolution Options
constraint-truncationSource maxLength exceeds target maxLengthwarningTruncate at target length, Truncate with ellipsis, Reject (fail if exceeds), Use default value
constraint-null-requiredSource is nullable but target is requiredwarningDefault value, Coalesce from another field, Reject nulls (fail pipeline)
constraint-overflowSource maxValue exceeds target maxValuewarningClamp to target max, Reject (fail if exceeds), Use default value, Scale proportionally
constraint-underflowSource minValue is below target minValuewarningClamp to target min, Absolute value, Reject (fail if below), Use default value
constraint-enum-narrowingSource enum values not present in target enumwarningMap each value explicitly, Reject unmapped values, Use default for unmapped, Set unmapped to null
constraint-patternTarget requires a regex pattern the source may not satisfywarningTransform to match pattern (expression), Reject non-matching values, Use default for non-matching
constraint-uniquenessSource is not unique but target requires uniquenesswarningDeduplicate (keep first), Deduplicate (keep last), Deduplicate (aggregate), Reject duplicates

Multi-Input Conflicts

Detected when more than one source property maps to a single target property. The resolution depends on the target type.

Rule IDTarget TypeSeverityResolution Options
multi-input-stringstring or textwarningConcatenate with space, Concatenate with comma, Concatenate with custom separator, First non-null, Last non-null, Custom expression
multi-input-numericinteger, float, or decimalwarningSum, Average, Minimum, Maximum, First non-null, Last non-null, Custom expression
multi-input-generalAny other typewarningFirst non-null, Last non-null, Custom expression

Resolution Persistence

When an architect resolves a conflict, the resolution is stored on the TransformationMapping in the projection document.

export type ResolutionStatus = 'unresolved' | 'resolved' | 'accepted-as-is';

export interface TransformationResolution {
  status: ResolutionStatus;
  typeConversion?: TypeConversionResolution;
  truncation?: TruncationResolution;
  nullHandling?: NullHandlingResolution;
  precision?: PrecisionResolution;
  enumMapping?: EnumMappingResolution;
  multiSource?: MultiSourceResolution;
  notes?: string;
}

Resolution Sub-Types

Resolution TypeFieldsUsed By
TypeConversionResolutionstrategy (string), expression (optional string)type-mismatch, type-string-to-integer, type-json-to-string
TruncationResolutionstrategy ('truncate' | 'ellipsis' | 'reject' | 'default'), defaultValue (optional)constraint-truncation
NullHandlingResolutionstrategy ('default' | 'coalesce' | 'reject'), defaultValue (optional), coalesceField (optional)constraint-null-required
PrecisionResolutionstrategy ('round' | 'floor' | 'ceiling' | 'truncate' | 'reject')type-float-to-integer, type-decimal-to-float
EnumMappingResolutionvalueMappings (Record of source to target), unmappedStrategy ('reject' | 'default' | 'null' | 'pass-through'), defaultValue (optional)constraint-enum-narrowing
MultiSourceResolutionDefined per multi-input conflict resolutionmulti-input-string, multi-input-numeric, multi-input-general

Connector Status Indicators

In the projection editor, each mapping connector line displays a visual indicator based on its conflict status.

StatusVisualMeaning
unresolved-errorRed connector with warning badgeAt least one error-severity conflict has no resolution. Requires architect attention.
unresolved-warningAmber connector with warning badgeAt least one warning-severity conflict has no resolution. Resolution recommended.
resolvedGreen connector with check badgeAll conflicts have been resolved by the architect.
acceptedGreen connector with check badgeAll conflicts have been explicitly accepted as-is (no changes needed).
cleanDefault connector (no badge)No conflicts detected. Source and target are fully compatible.