Service - Supply Location Manager

From Izara Wiki
Revision as of 01:23, 17 February 2025 by Sven the Barbarian (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Overview

Each supply location is handled by a Service - Supply Location (handlers) service.

The Supply Location Manager service handles shared orchestration of the Supply Location Handler services and the base supplyLocation objectType.

Repository

https://bitbucket.org/izara-supply-supply-locations/izara-supply-supply-locations-supply-location-manager

DynamoDB tables

SupplyLocationRecord

Records which Handler manages each Stage

{
	supplyLocationId
	supplyLocationHandlerServiceNameTag
}
  • partition key: supplyLocationId
  • sort key: (none)

objectSchemas

{
	objectType: "supplyLocation",
	storageResources:{
		"xxx":{
			storageType: "graph",
			graphServerTag: "xx",
		}
	},
	fieldNames: {
		supplyLocationId: {
			type: "string",
            randomOnCreate: true
		},
	},
	identifiers: [
		{
			fieldName: "supplyLocationId"
		},
	]
},

relationshipSchemas

[
  {
    "currentSupplyLocation": {
      storageResources:{
		"xxx":{
			storageType: "graph",
			graphServerTag: "xx",
		}
      },
      links: [
        {
          storageResourceTags: ["xxx"],
          from: {
            objType: {
              serviceTag: "unitManager",
              objectType: "unit"
            },
            linkType: "one",
          },
          to: {
            objType: {
              serviceTag: "supplyLocation",
              objectType: "supplyLocation"
            },
            linkType: "many",
          }
        }
      ]
    }
  }
]
[
  {
    "oldSupplyLocation": {
      storageResources:{
		"xxx":{
			storageType: "graph",
			graphServerTag: "xx",
		}
      },
      links: [
        {
          storageResourceTags: ["xxx"],
          from: {
            objType: {
              serviceTag: "unitManager",
              objectType: "unit"
            },
            linkType: "one",
          },
          to: {
            objType: {
              serviceTag: "supplyLocation",
              objectType: "supplyLocation"
            },
            linkType: "many",
          }
        }
      ]
    }
  }
]
  • When added to a unitPacking the currentSupplyLocation is replaced to a oldSupplyLocation, and unit uses unitPackings currentSupplyLocation until removed from unitPacking

Working documents

Supply Location Manager