Service - Unit Packing: Difference between revisions

From Izara Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
= Overview =
= Overview =


Handler service for the packing unit that represents multiple standard units packed into a single trackable unit, eg carton.
Handler service for the packing unit that groups multiple standard units packed into a single trackable unit, eg carton or container.


= Repository =
= Repository =
Line 7: Line 7:
https://bitbucket.org/izara-supply-units/izara-supply-units-unit-packing
https://bitbucket.org/izara-supply-units/izara-supply-units-unit-packing


= DynamoDB tables =
= Notes =


== [[Standard Config Table Per Service]] ==
* unitPacking can themselves be added to other unitPackings
* When a Unit has a inPackingUnit relationship, it cannot have another inPackingUnit added, ie one unit can only be packed inside one unitPacking
* multiple unitStandards used in a [[Service - Transform Units]] operation that are also inPackingUnit must all be inside the same unitPacking, and any resulting unitStandards will add inPackingUnit to the same unitPacking
* When a unit is added to a unitPacking it can change currentSupplyLocation to oldSupplyLocation, then use the unitPackings currentSupplyLocation for location changes until it is removed from the unitPacking, at which time the unit adds a currentSupplyLocation matching the unitPacking at time of removal


=== Configuration tags ===
= objectSchemas =  


<syntaxhighlight lang="JavaScript">
<syntaxhighlight lang="JavaScript">
{
{
configTag: "SupplyGraphServiceName"
objectType: "unitPacking",
configKey: "SupplyGraphServiceName"
extendObjType: {
configValue: xxx // eg: "SupplyGraph"
serviceTag: "unitManager",
}
objectType: "unit",
},
storageResources:{
"xxx":{
storageType: "graph",
graphServerTag: "xx",
}
},
fieldNames: {
// from stage objectType
},
identifiers: [
// from stage objectType
]
},
</syntaxhighlight>
</syntaxhighlight>


<syntaxhighlight lang="JavaScript">
<syntaxhighlight lang="JavaScript">
{
[
configTag: "UnitManagerServiceName"
  {
configKey: "UnitManagerServiceName"
    "inPackingUnit": {
configValue: xxx // eg: "UnitManager"
      storageResources:{
}
"xxx":{
storageType: "graph",
graphServerTag: "xx",
}
      },
      links: [
        {
          storageResourceTags: ["xxx"],
          canDelete: true,
          from: {
            objType: {
              serviceTag: "unitManager",
              objectType: "unit"
            },
            linkType: "many",
          },
          to: {
            objType: {
              serviceTag: "unitPacking",
              objectType: "unitPacking"
            },
            linkType: "one",
          }
        }
      ]
    }
  }
]
</syntaxhighlight>
</syntaxhighlight>


== LogicalResults ==
* Units current unitPacking


[[Standard LogicalResults Per Service]]
<syntaxhighlight lang="JavaScript">
 
[
= Notes =
  {
    "oldInPackingUnit": {
      storageResources:{
"xxx":{
storageType: "graph",
graphServerTag: "xx",
}
      },
      fieldNames: {
"fromTimestamp": {
  type: "timestamp",
  requiredOnCreate: true,
},
"toTimestamp": {
  type: "timestamp",
  requiredOnCreate: true,
}
}, 
      links: [
        {
          storageResourceTags: ["xxx"],
          canDelete: true,
          from: {
            objType: {
              serviceTag: "unitManager",
              objectType: "unit"
            },
            linkType: "one",
          },
          to: {
            objType: {
              serviceTag: "unitPacking",
              objectType: "unitPacking"
            },
            linkType: "many",
          }
        }
      ]
    }
  }
]
</syntaxhighlight>


* Unit Packings can themselves be added to other Unit Packings
* old inPackingUnit for a unit, maintains packing history for a unit
* When a Unit is in a Unit Packing, it cannot be added to another Unit Packing
* when a unit is removed from a unitPacking the inPackingUnit link is removed and an oldInPackingUnit is created (the unit can then be added to a new unitPacking if needed)


= Working documents =
= Working documents =

Latest revision as of 12:28, 16 February 2025

Overview

Handler service for the packing unit that groups multiple standard units packed into a single trackable unit, eg carton or container.

Repository

https://bitbucket.org/izara-supply-units/izara-supply-units-unit-packing

Notes

  • unitPacking can themselves be added to other unitPackings
  • When a Unit has a inPackingUnit relationship, it cannot have another inPackingUnit added, ie one unit can only be packed inside one unitPacking
  • multiple unitStandards used in a Service - Transform Units operation that are also inPackingUnit must all be inside the same unitPacking, and any resulting unitStandards will add inPackingUnit to the same unitPacking
  • When a unit is added to a unitPacking it can change currentSupplyLocation to oldSupplyLocation, then use the unitPackings currentSupplyLocation for location changes until it is removed from the unitPacking, at which time the unit adds a currentSupplyLocation matching the unitPacking at time of removal

objectSchemas

{
	objectType: "unitPacking",
	extendObjType: {
		serviceTag: "unitManager",
		objectType: "unit",
	},
	storageResources:{
		"xxx":{
			storageType: "graph",
			graphServerTag: "xx",
		}
	},
	fieldNames: {
		// from stage objectType
	},
	identifiers: [
		// from stage objectType
	]
},
[
  {
    "inPackingUnit": {
      storageResources:{
		"xxx":{
			storageType: "graph",
			graphServerTag: "xx",
		}
      },
      links: [
        {
          storageResourceTags: ["xxx"],
          canDelete: true,
          from: {
            objType: {
              serviceTag: "unitManager",
              objectType: "unit"
            },
            linkType: "many",
          },
          to: {
            objType: {
              serviceTag: "unitPacking",
              objectType: "unitPacking"
            },
            linkType: "one",
          }
        }
      ]
    }
  }
]
  • Units current unitPacking
[
  {
    "oldInPackingUnit": {
      storageResources:{
		"xxx":{
			storageType: "graph",
			graphServerTag: "xx",
		}
      },
      fieldNames: {
			"fromTimestamp": {
			  type: "timestamp",
			  requiredOnCreate: true,
			},
			"toTimestamp": {
			  type: "timestamp",
			  requiredOnCreate: true,
			}
		},   
      links: [
        {
          storageResourceTags: ["xxx"],
          canDelete: true,
          from: {
            objType: {
              serviceTag: "unitManager",
              objectType: "unit"
            },
            linkType: "one",
          },
          to: {
            objType: {
              serviceTag: "unitPacking",
              objectType: "unitPacking"
            },
            linkType: "many",
          }
        }
      ]
    }
  }
]
  • old inPackingUnit for a unit, maintains packing history for a unit
  • when a unit is removed from a unitPacking the inPackingUnit link is removed and an oldInPackingUnit is created (the unit can then be added to a new unitPacking if needed)

Working documents

Unit Standard