Service - Stock Location Manager: Difference between revisions

From Izara Wiki
Jump to navigation Jump to search
(Created page with "= 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 Loc ation 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-manag...")
 
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
= Overview =
= 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 Loc ation Standard]] handling simple quantities remaining in stock per stock location record.
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.
The Stock Location Manager service handles shared orchestration of Stock Location Handler services.
Line 53: Line 53:
<syntaxhighlight lang="JavaScript">
<syntaxhighlight lang="JavaScript">
{
{
nodeLabel: "{StockLocationManagerLib.STOCKLOCATION_GRAPH_NODE_LABEL}", // "stockLocation"
nodeLabel: "{stockLocationSharedLib.consts.STOCKLOCATION_GRAPH_NODE_LABEL}", // "stockLocation"
schema: {
schema: {
identifier: true,
identifier: true,
Line 70: Line 70:
</syntaxhighlight>
</syntaxhighlight>


== Basic node schemas ==
=== Versioned data ===
 
==== stockLocationSettings ====
 
<syntaxhighlight lang="JavaScript">
{
properties: {
locationName: xx, // user defined name for stock location
},
}
</syntaxhighlight>
 
== Basic node schemas (?) ==


<syntaxhighlight lang="JavaScript">
<syntaxhighlight lang="JavaScript">
Line 93: Line 105:
* [[Service - Orders Graph]]
* [[Service - Orders Graph]]


=== Schema comes from [[NPM module - Izara Core - Property Node|BasicNodeSchemaLib]] ===
=== 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
 
== Translate Ids - stockLocation to sellOffer ==


# deliveryMethodPropertyLabel
* from stockLocationId to sellOfferIds
#* [[Service - Translations Graph]]
# deliveryMethodProperty
#* [[Service - Translations Graph]]


= Complex Filter requests =
= Complex Filter requests =

Latest revision as of 09:49, 4 May 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: "{stockLocationSharedLib.consts.STOCKLOCATION_GRAPH_NODE_LABEL}", // "stockLocation"
	schema: {
		identifier: true,
		restrictProperties: true,
		restrictRelationships: true,
		properties: {
			stockLocationId: {
				identifier: true, // create unique id from translation
			},
			stockLocationHandlerServiceNameTag: {
				immutable: true,
			},
		},
	}
}

Versioned data

stockLocationSettings

{
	properties: {
		locationName: xx, // user defined name for stock location
	},
}

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

Translate Ids - stockLocation to sellOffer

  • from stockLocationId to sellOfferIds

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