Service - Stage Adjustment

From Izara Wiki
Jump to navigation Jump to search

Overview

Adjustments that are performed on a Unit when it passes into a stage.

Repository

https://bitbucket.org/izara-supply-stages/izara-supply-stages-stage-adjustment

DynamoDB tables

Standard Config Table Per Service

Configuration tags

{
	configTag: "SupplyGraphServiceName"
	configKey: "SupplyGraphServiceName"
	configValue: xxx // eg: "SupplyGraph"
}

LogicalResults

Standard LogicalResults Per Service

adjustmentRules structure

adjustmentRules is an array of adjustments that apply to the Unit moving into this stage, structure:

[
	{
		adjustmentType: "xx" // "set"|"add"|"subtract"|"ifEmpty"|..
		propertyName: "", // name of the Unit's property that is being adjusted
		
		value: "", // the value adjusted by
		// or
		userInput: true, // default true? If set when setting Units to this stage will need to set the value for the adjustment

	},
	//..
]

Graph database

Service - Supply Graph

Nodes

{
	nodeLabel: "{stageAdjustmentLib.STAGE_ADJUSTMENT_GRAPH_NODE_LABEL}", // stageAdjustment
	schema: {
		identifier: true,
		restrictProperties: true,
		restrictRelationships: true,
		properties: {
			adjustmentId: {
				identifier: true, //(random uuid)
			},
		},
	}
}

Versioned data

stageAdjustmentSettings

  • At the moment a stage Adjustment can only be edited by the user who created it (use standard createdBy relationship), in future could make RBAC per stageAdjustment
{
	properties: {
		adjustmentRules: []
	},
}

Relationships

{
	relationshipType: "{stageAdjustmentLib.HAS_STAGE_ADJUSTMENT_GRAPH_REL_TYPE}", // "has_stageAdjustment"
	schema: {
		elementCanBeRemoved: false,
		allPropertiesImmutable: true,
		restrictProperties: true,
		properties: {
			originTimestamp: //timestamp the request to create/change this relationship was sent
		},
	}
}
  • links a Stage to a StageAdjustment
  • one Stage can have multiple StageAdjustments

Working documents

Stage Adjustment