Service - Stock Location Manager: Difference between revisions

From Izara Wiki
Jump to navigation Jump to search
No edit summary
Line 70: Line 70:
</syntaxhighlight>
</syntaxhighlight>


== Basic node schemas ==
== Basic node schemas (?) ==


<syntaxhighlight lang="JavaScript">
<syntaxhighlight lang="JavaScript">
Line 92: Line 92:
* [[Service - Translations Graph]]
* [[Service - Translations Graph]]
* [[Service - Orders Graph]]
* [[Service - Orders Graph]]
=== Relationships ===
<syntaxhighlight lang="JavaScript">
{
relationshipType: "{stockLocationSharedLib.atStockLocationGraphRelationshipType()}", // "at_StockLocation"
schema: {
immutable: true,
restrictProperties: true,
properties: {
originTimestamp: //timestamp the request to create/change this relationship was sent
},
}
}
</syntaxhighlight>
* connects sellOffer to stockLocation


=== Schema comes from [[NPM module - Izara Core - Property Node|BasicNodeSchemaLib]] ===
=== Schema comes from [[NPM module - Izara Core - Property Node|BasicNodeSchemaLib]] ===

Revision as of 14:35, 30 April 2023

Overview

Each Sell Offer (Standard) record points to a Stock Loctation record which is handled by a Service - Stock Location (handlers) service, with Service - Stock Location Standard handling simple quantities remaining in stock per stock location record.

The Stock Location Manager service handles shared orchestration of Stock Location Handler services.

Repository

https://bitbucket.org/izara-market-products/izara-market-products-stock-location-manager

DynamoDB tables

Standard Config Table Per Service

Configuration tags

{
	configKey: "ProductGraphServiceName"
	configTag: "ProductGraphServiceName"
	configValue: xxx // eg: "ProductGraph"
}
{
	configKey: "StockLocationHandlerService"
	configTag: xxx // stockLocationHandlerServiceNameTag, eg: "StockLocationStandard"
	configValue: {
		serviceName: xxx // eg: "StockLocationStandard", this is the actual deployed service name
	}
}

StockLocationRecord

Records which Handler manages each stock location

{
	stockLocationId
	stockLocationHandlerServiceNameTag
}
  • partition key: stockLocationId
  • sort key: (none)

Service - Products Graph

Nodes

{
	nodeLabel: "{StockLocationManagerLib.STOCKLOCATION_GRAPH_NODE_LABEL}", // "stockLocation"
	schema: {
		identifier: true,
		restrictProperties: true,
		restrictRelationships: true,
		properties: {
			stockLocationId: {
				identifier: true, // create unique id from translation
			},
			stockLocationHandlerServiceNameTag: {
				immutable: true,
			},
		},
	}
}

Basic node schemas (?)

{
	nodeLabel: "{StockLocationManagerLib.STOCKLOCATION_GRAPH_NODE_LABEL}"
	schema: {
		identifier: true,
		restrictProperties: true,
		restrictRelationships: true,
		properties: {
			stockLocationId: {
				identifier: true,
			},
			stockLocationHandlerServiceNameTag: {
				immutable: true,
			},
		},
	}
}

Relationships

{
	relationshipType: "{stockLocationSharedLib.atStockLocationGraphRelationshipType()}", // "at_StockLocation"
	schema: {
		immutable: true,
		restrictProperties: true,
		properties: {
			originTimestamp: //timestamp the request to create/change this relationship was sent
		},
	}
}
  • connects sellOffer to stockLocation

Schema comes from BasicNodeSchemaLib

  1. deliveryMethodPropertyLabel
  2. deliveryMethodProperty

Complex Filter requests

  • Not yet used at the Manager level, would send requests to all handlers, could perhaps setup to automatically pass on processLogical requests to all handlers, and not have a processLogical function in the Manager service

Working documents

Stock Location Manager