Service - Transform Units: Difference between revisions

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


Transformations are used to convert a number of input Units into sets of output Units.
Transformations are used to convert any number of inputUnits into any number of outputUnits.


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


= DynamoDB tables =
== Calculating values ==


== [[Standard Config Table Per Service]] ==
combinationEquation and calculateByProperties fields replace out special tags first then parse through an evaluation library, eg:
* https://mathjs.org/
* https://www.npmjs.com/package/string-math
* https://www.npmjs.com/package/exact-math
* https://www.codeproject.com/Articles/12116/JavaScript-Mathematical-Expression-Evaluator


=== Configuration tags ===
Must make sure equation is validated/sanitized first, be careful/do not use "eval" or "new Function" which can invoke arbritrary commands.


<syntaxhighlight lang="JavaScript">
= Transform request =
{
 
configTag: "SupplyGraphServiceName"
* transformConfig is primarily used as a default template, each unitTransform can adjust almost all details such as units inputted and outputted propertyValues
configKey: "SupplyGraphServiceName"
* user can use the transformConfig inputUnits calculatedProperties to recalc inputUnit property values according to the outputUnits numberOfUnits
configValue: xxx // eg: "SupplyGraph"
* user can set to recalculate outputUnits calculatedProperties according to inputUnits property values
}
* inputUnits array can have multiple elements with the same unitTypeId, this is a guide for frontend to allow multiple units of the same unitType but eg different fabrics to be inputs in the same transformation
</syntaxhighlight>
* outputUnit calculatedProperties will calculate the same for all outputUnit numberOfUnits, can be adjusted manually
* outputUnits array can have multiple elements with the same unitTypeId for eg calcualting cost for sizes of different clothing)


= transformConfig structure =
= transformConfigInputOutput =


<syntaxhighlight lang="JavaScript">
<syntaxhighlight lang="JavaScript">
{
{
inputUnitTypes: {
inputUnits: {
{unitTypeId}: {
unitTypeId: {
stageId: "xx", // optional stage that Units get updated to
stageId: "xx", // optional, stage that applies stageAdjustments to input unit
quantityProperty: "xx", // optional, name of property that is used as quantity to spread across output Units, if none set then quantity is 1
calculatedProperties:{ // calculates changes to inputUnits unitTrackedProperties
splitIntegerOnly: false, // default false, if true splits can only be integers, will not process transformation if split per outputUnit is not integer
unitTypeTrackedPropertyId: {
}, //
integerOnly: false, // default false, if true then calculated splits must be integers, will not process transformation if split per outputUnit are not integers. Maybe can remove and use unitTypeTrackedProperty.precision
quantityReductionSetting: "spread"|"clearPerUnit", // if not all quantityUnitTypeTrackedPropertyId are used up in transformation, do we reduce all numberOfUnits quantity equally, or clear quantity out one unit at a time, frontend uses to calculate initial values
valueUse: 1, // per transformUnitsObject quantity, maybe allow overwriting on frontend
},
// ...
},
},  
//..
},
},
outputUnitTypes: {
outputUnits: [
{unitTypeId}: {
{
stageId: "xx", // required initial stage Units are set to
unitTypeId: "zz",
calculatedProperties: { // calculates a property added to the outputUnits
stageId: "xx", // optional, stage that applies stageAdjustments to output unit
{propertyName}: {
numberOfUnits: 1, // default number of outputUnits to create, calculations are based on this and inputUnit numberOfUnits
calculatedProperties: { // calculates value for unitTypeTrackedProperties added to outputUnits
unitTypeTrackedPropertyId: {
calculationType: "calculateValue", // can add other types later
calculationType: "calculateValue", // can add other types later
combinationEquation: "[propertyA]+[propertyB]", // optional, method of combining multiple calculateByProperties together, defaults to adding/sum
integerOnly: false, // maybe not needed, in unitTypeTrackedProperty.precision
calculateByProperties: [ // can set many inputType properties
combinationEquation: "[calcPropTagA]+[calcPropTagB]", // optional, method of combining multiple calculateByProperties together, defaults to adding/sum
{
calculateByProperties: {
inputUnitTypeId: "xxx", // different unitTypeIds can have different properties/calculations
calcPropTag: { // any string, used in combinationEquation
propertyName: "xxx", // property that gets inserted into calculation
calculationType: "xx", //"calculationPerInputUnit"|"singleValue"
calculation: "[property]*[quantity]", // regExp equation? use a standard format to perform calculation
// if "calculationPerInputUnit"
inputUnitValueUseCalcs:{ // used by frontend to calculate default values per inputUnit instances
inputUnitTypeId: {
unitTypeTrackedPropertyId: "[valueUse]*0.25"
}
},
calculation: "[inputUnitValueUse:{inputUnitTypeId}:{unitTypeTrackedPropertyId}]*[unitTypeTrackedProperty:{inputUnitTypeId}:{unitTypeTrackedPropertyId}]",
// if "singleValue"
defaultValue: "30", // not calculated, user can overwrite defaultValue
round: "round", //optional: "round"|"ceil"|"floor"|..
},
},
// ..
// ..
]
}
},  
},  
//..
//..
Line 52: Line 79:
},  
},  
//..
//..
},
],
 
}
}
</syntaxhighlight>
</syntaxhighlight>


= Transform request =
= objectSchemas =  


* Input Units might have multiple Unit records of the same UnitType, and each record has it's quantityProperty which might be >1
<syntaxhighlight lang="JavaScript">
* All quantityProperty will be used completely in one transformation, no partial quantities handled
{
* Do not differentiate which inputUnits are used on which outputUnits, if want to do that need to split into multiple transformations
objectType: "transformConfig",
* When we calculate calculatedProperties we sum all inputUnits calculations together to work out a value per quantity, then apply the ratio set for each outputUnit to calculate each outputUnits property
addOnDataStructure: [
* outputUnits are split by itemType, but each itemType is split by sets so different calculatedProperties can be done (eg calcualting cost for sizes of different clothing)
{
* each itemType sets the quantity (number of Units) that are created
type:"versionedData",
* each itemType set defaults to even ratio usage of inputUnit total quantity
versionedDataLabel: "transformConfigInputOutput",
* each itemType set can set to override default ratio with a set value (total or per Unit) for each input ItemType, as long as all input quantities are used in full (either by having >0 sets use remaining ratio, or override accurately to use all quantity)
storageResourceTag : "xx",
* if multiple
fieldNames: [
{
fieldName: "inputUnits",
},
{
fieldName: "outputUnits",
},
]
},
],
storageResources:{
"xxx":{
storageType: "graph",
graphServerTag: "xx",
}
},
fieldNames: {
transformConfigId: {
type: "string",
            randomOnCreate: true
},
{
fieldName: "inputUnits",
type: "arrayMixed",
requiredOnCreate: true
validation: {
  itemValidation:{} // for validate item in array
},
},
{
fieldName: "outputUnits",
type: "arrayMixed",
requiredOnCreate: true
validation: {
  itemValidation:{} // for validate item in array
},
},
timingSetting: {
type: "string", // "immediate"|"fixed"|"variable"
},
fixedSeconds: {
type: "numeric", // if timingSetting="fixed" this is the fixed number of seconds the action takes
},
defaultSeconds: {
type: "numeric", // if timingSetting="variable" this is the default number of seconds the action takes
}
},
identifiers: [
{
fieldName: "transformConfigId"
},
]
},
</syntaxhighlight>


= Graph database =
<syntaxhighlight lang="JavaScript">
{
objectType: "unitTransform",
storageResources:{
"xxx":{
storageType: "graph",
graphServerTag: "xx",
}
},
fieldNames: {
unitTransformId: {
type: "string",
            randomOnCreate: true
},
fromTime: {
type: "timestamp",
},
toTime: {
type: "timestamp",
},
},
identifiers: [
{
fieldName: "unitTransformId"
},
]
},
</syntaxhighlight>


== [[Service - Supply Graph]]==
* Is created each time a transformUnit action is applied to units
 
=== Nodes ===


<syntaxhighlight lang="JavaScript">
<syntaxhighlight lang="JavaScript">
{
{
nodeLabel: "{transformUnitsLib.TRANSFORM_UNITS_GRAPH_NODE_LABEL}", // transformUnits
objectType: "transformUnitChangeLocation",
schema: {
storageResources:{
identifier: true,
"xxx":{
restrictProperties: true,
storageType: "graph",
restrictRelationships: true,
graphServerTag: "xx",
properties: {
}
transformConfigId: {
},
identifier: true, //(random uuid)
fieldNames: {
},
transformUnitchangeLocationId: {
type: "string",
            randomOnCreate: true
},
},
identifiers: [
{
fieldName: "transformUnitchangeLocationId"
},
},
}
]
}
},
</syntaxhighlight>
</syntaxhighlight>
* One transform units task


* links a unitTransform to a from and to location, if a majority of input units are in a matching from location when the transformUnit action is performed the output units will be placed by default in the transformUnitChangeLocation's to location
* If none match then the location that has the majority of inputUnit's will set the default to location
* Each transformUnit action can overwrite the location of the outputUnits
= relationshipSchemas =
<syntaxhighlight lang="JavaScript">
[
  {
    "oldTransformUnitTrackedProperty": {
      storageResources:{
"xxx":{
storageType: "graph",
graphServerTag: "xx",
}
      },
      links: [
        {
          storageResourceTags: ["xxx"],
          from: {
            objType: {
              serviceTag: "transformUnits",
              objectType: "unitTransform"
            },
            linkType: "one",
          },
          to: {
            objType: {
              serviceTag: "unitType",
              objectType: "unitTrackedProperty"
            },
            linkType: "many",
          }
        }
      ]
    }
  }
]
</syntaxhighlight>
<syntaxhighlight lang="JavaScript">
<syntaxhighlight lang="JavaScript">
{
[
nodeLabel: "{transformUnitsLib.TRANSFORM_UNITS_CONFIG_GRAPH_NODE_LABEL}", // transformUnitsConfig
  {
schema: {
    "newTransformUnitTrackedProperty": {
identifier: true,
      storageResources:{
restrictProperties: true,
"xxx":{
restrictRelationships: true,
storageType: "graph",
properties: {
graphServerTag: "xx",
transformConfigId: {
}
identifier: true, //(random uuid)
      },
fieldNames: {
adjustmentValue: {
type: "string", // so can adjust any type of property, will need cast type in logic
requiredOnCreate: true,
},
},
},
},        
}
      links: [
}
        {
          storageResourceTags: ["xxx"],
          from: {
            objType: {
              serviceTag: "transformUnits",
              objectType: "unitTransform"
            },
            linkType: "one",
          },
          to: {
            objType: {
              serviceTag: "unitType",
              objectType: "unitTrackedProperty"
            },
            linkType: "many",
          }
        }
      ]
    }
  }
]
</syntaxhighlight>
</syntaxhighlight>
* Main Transform Confirm object


=== Versioned data ===
* links unitTransform event to all before and after unitTrackedProperties that are adjusted by this transformation
 
<syntaxhighlight lang="JavaScript">
[
  {
    "hasChangeLocation": {
      storageResources:{
"xxx":{
storageType: "graph",
graphServerTag: "xx",
}
      },
      links: [
        {
          storageResourceTags: ["xxx"],
          from: {
            objType: {
              serviceTag: "stageManager",
              objectType: "stage"
            },
            linkType: "one",
          },
          to: {
            objType: {
              serviceTag: "stageManager",
              objectType: "stageChangeLocation"
            },
            linkType: "many",
          }
        }
      ]
    }
  }
]
</syntaxhighlight>


==== transformUnitsConfigSettings ====
* links transformConfig to a pair of from/to locations
* multiple pairs per transformConfig allows for a transformConfig to change the location according to the units current location


* 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
<syntaxhighlight lang="JavaScript">
[
  {
    "changeFromLocation": {
      storageResources:{
"xxx":{
storageType: "graph",
graphServerTag: "xx",
}
      },
      links: [
        {
          storageResourceTags: ["xxx"],
          from: {
            objType: {
              serviceTag: "transformUnits",
              objectType: "transformConfig"
            },
            linkType: "one",
          },
          to: {
            objType: {
              serviceTag: "supplyLocationManager",
              objectType: "supplyLocation"
            },
            linkType: "one",
          }
        }
      ]
    }
  }
]
</syntaxhighlight>


<syntaxhighlight lang="JavaScript">
<syntaxhighlight lang="JavaScript">
{
[
properties: {
  {
inputUnitTypes: [],
    "changeToLocation": {
outputUnitTypes: [],
      storageResources:{
},
"xxx":{
}
storageType: "graph",
graphServerTag: "xx",
}
      },
      links: [
        {
          storageResourceTags: ["xxx"],
          from: {
            objType: {
              serviceTag: "transformUnits",
              objectType: "transformConfig"
            },
            linkType: "one",
          },
          to: {
            objType: {
              serviceTag: "supplyLocationManager",
              objectType: "supplyLocation"
            },
            linkType: "one",
          }
        }
      ]
    }
  }
]
</syntaxhighlight>
</syntaxhighlight>


=== Relationships ===
* When this action is applied if the units location matches a transformConfigChangeLocation's changeFromLocation, change to the changeToLocation
 
<syntaxhighlight lang="JavaScript">
[
  {
    "hasMonitorMarker": {
      storageResources:{
"xxx":{
storageType: "graph",
graphServerTag: "xx",
}
      },
      links: [
        {
          storageResourceTags: ["xxx"],
          from: {
            objType: {
              serviceTag: "transformUnits",
              objectType: "transformConfig"
            },
            linkType: "one",
          },
          to: {
            objType: {
              serviceTag: "monitorManager",
              objectType: "monitorMarker"
            },
            linkType: "many",
          }
        }
      ]
    }
  }
]
</syntaxhighlight>


<syntaxhighlight lang="JavaScript">
<syntaxhighlight lang="JavaScript">
{
[
relationshipType: "{transformUnitsLib.TO_TRANSFORM_TRANSFORM_UNITS_FROM_GRAPH_REL_TYPE}", // "toTransform_TransformUnits"
  {
schema: {
    "disabledMonitorMarker": {
elementCanBeRemoved: false,
      storageResources:{
allPropertiesImmutable: true,
"xxx":{
restrictProperties: true,
storageType: "graph",
properties: {
graphServerTag: "xx",
originTimestamp: //timestamp the request to create/change this relationship was sent
}
},
      },
}
      links: [
}
        {
          storageResourceTags: ["xxx"],
          from: {
            objType: {
              serviceTag: "transformUnits",
              objectType: "transformConfig"
            },
            linkType: "one",
          },
          to: {
            objType: {
              serviceTag: "monitorManager",
              objectType: "monitorMarker"
            },
            linkType: "many",
          }
        }
      ]
    }
  }
]
</syntaxhighlight>
</syntaxhighlight>
* connects inputUnits to transformUnits node
 
* During the period of the transformUnit, this marker allows the monitor project to offer more granular monitoring, eg when stitching a clothing item the transformUnit could focus on a subset of the video feed group's feeds (eg the table where the shirt is sewed)
* A monitorMarker can be disabled and re-enabled


<syntaxhighlight lang="JavaScript">
<syntaxhighlight lang="JavaScript">
{
[
relationshipType: "{transformUnitsLib.FROM_TRANSFORM_TRANSFORM_UNITS_FROM_GRAPH_REL_TYPE}", // "fromTransform_TransformUnits"
  {
schema: {
    "appliedMonitorMarker": {
elementCanBeRemoved: false,
      storageResources:{
allPropertiesImmutable: true,
"xxx":{
restrictProperties: true,
storageType: "graph",
properties: {
graphServerTag: "xx",
originTimestamp: //timestamp the request to create/change this relationship was sent
}
},
      },
}
      links: [
}
        {
          storageResourceTags: ["xxx"],
          from: {
            objType: {
              serviceTag: "transformUnits",
              objectType: "unitTransform"
            },
            linkType: "many",
          },
          to: {
            objType: {
              serviceTag: "monitorManager",
              objectType: "monitorMarker"
            },
            linkType: "many",
          }
        }
      ]
    }
  }
]
</syntaxhighlight>
</syntaxhighlight>
* connects outputUnits to transformUnits node
 
* Each time a unitTransform is applied an appliedMonitorMarker relationship is created between the unitTransform object and all of the transformConfig's active monitorMarkers
* the monitorMarker then links to the monitor object that the market applies to


= Working documents =
= Working documents =

Latest revision as of 00:45, 3 September 2025

Overview

Transformations are used to convert any number of inputUnits into any number of outputUnits.

Repository

https://bitbucket.org/izara-supply-units/izara-supply-units-transform-units

Calculating values

combinationEquation and calculateByProperties fields replace out special tags first then parse through an evaluation library, eg:

Must make sure equation is validated/sanitized first, be careful/do not use "eval" or "new Function" which can invoke arbritrary commands.

Transform request

  • transformConfig is primarily used as a default template, each unitTransform can adjust almost all details such as units inputted and outputted propertyValues
  • user can use the transformConfig inputUnits calculatedProperties to recalc inputUnit property values according to the outputUnits numberOfUnits
  • user can set to recalculate outputUnits calculatedProperties according to inputUnits property values
  • inputUnits array can have multiple elements with the same unitTypeId, this is a guide for frontend to allow multiple units of the same unitType but eg different fabrics to be inputs in the same transformation
  • outputUnit calculatedProperties will calculate the same for all outputUnit numberOfUnits, can be adjusted manually
  • outputUnits array can have multiple elements with the same unitTypeId for eg calcualting cost for sizes of different clothing)

transformConfigInputOutput

{
	inputUnits: {
		unitTypeId: {
			stageId: "xx", // optional, stage that applies stageAdjustments to input unit
			calculatedProperties:{ // calculates changes to inputUnits unitTrackedProperties
				unitTypeTrackedPropertyId: {
					integerOnly: false, // default false, if true then calculated splits must be integers, will not process transformation if split per outputUnit are not integers. Maybe can remove and use unitTypeTrackedProperty.precision
					quantityReductionSetting: "spread"|"clearPerUnit", // if not all quantityUnitTypeTrackedPropertyId are used up in transformation, do we reduce all numberOfUnits quantity equally, or clear quantity out one unit at a time, frontend uses to calculate initial values
					valueUse: 1, // per transformUnitsObject quantity, maybe allow overwriting on frontend
				},
				// ...
			},
		}, 
		//..
	},
	outputUnits: [
		{
			unitTypeId: "zz",
			stageId: "xx", // optional, stage that applies stageAdjustments to output unit
			numberOfUnits: 1, // default number of outputUnits to create, calculations are based on this and inputUnit numberOfUnits
			calculatedProperties: { // calculates value for unitTypeTrackedProperties added to outputUnits
				unitTypeTrackedPropertyId: {
					calculationType: "calculateValue", // can add other types later
					integerOnly: false, // maybe not needed, in unitTypeTrackedProperty.precision
					combinationEquation: "[calcPropTagA]+[calcPropTagB]", // optional, method of combining multiple calculateByProperties together, defaults to adding/sum
					calculateByProperties: {
						calcPropTag: { // any string, used in combinationEquation
							calculationType: "xx", //"calculationPerInputUnit"|"singleValue"
							
							// if "calculationPerInputUnit"
							inputUnitValueUseCalcs:{ // used by frontend to calculate default values per inputUnit instances
								inputUnitTypeId: {
									unitTypeTrackedPropertyId: "[valueUse]*0.25"
								}
							},
							calculation: "[inputUnitValueUse:{inputUnitTypeId}:{unitTypeTrackedPropertyId}]*[unitTypeTrackedProperty:{inputUnitTypeId}:{unitTypeTrackedPropertyId}]",
							
							// if "singleValue"
							defaultValue: "30", // not calculated, user can overwrite defaultValue
							
							round: "round", //optional: "round"|"ceil"|"floor"|..
							
						},
						// ..
					}
				}, 
				//..
			}
		}, 
		//..
	],

}

objectSchemas

{
	objectType: "transformConfig",
		addOnDataStructure: [
			{
				type:"versionedData",
				versionedDataLabel: "transformConfigInputOutput",
				storageResourceTag : "xx",
				fieldNames: [
					{ 
						fieldName: "inputUnits",
					},
					{ 
						fieldName: "outputUnits",
					},
				]
			},
		],
		storageResources:{
		"xxx":{
			storageType: "graph",
			graphServerTag: "xx",
		}
	},
	fieldNames: {
		transformConfigId: {
			type: "string",
            randomOnCreate: true
		},
		{ 
			fieldName: "inputUnits",
			type: "arrayMixed",
			requiredOnCreate: true
			validation: {
			  itemValidation:{} // for validate item in array
			},
		},
		{ 
			fieldName: "outputUnits",
			type: "arrayMixed",
			requiredOnCreate: true
			validation: {
			  itemValidation:{} // for validate item in array
			},
		},
		timingSetting: {
			type: "string", // "immediate"|"fixed"|"variable"
		},
		fixedSeconds: {
			type: "numeric", // if timingSetting="fixed" this is the fixed number of seconds the action takes
		},
		defaultSeconds: {
			type: "numeric", // if timingSetting="variable" this is the default number of seconds the action takes
		}
	},
	identifiers: [
		{
			fieldName: "transformConfigId"
		},
	]
},
{
	objectType: "unitTransform",
	storageResources:{
		"xxx":{
			storageType: "graph",
			graphServerTag: "xx",
		}
	},
	fieldNames: {
		unitTransformId: {
			type: "string",
            randomOnCreate: true
		},
		fromTime: {
			type: "timestamp",
		},		
		toTime: {
			type: "timestamp",
		},		
	},
	identifiers: [
		{
			fieldName: "unitTransformId"
		},
	]
},
  • Is created each time a transformUnit action is applied to units
{
	objectType: "transformUnitChangeLocation",
	storageResources:{
		"xxx":{
			storageType: "graph",
			graphServerTag: "xx",
		}
	},
	fieldNames: {
		transformUnitchangeLocationId: {
			type: "string",
            randomOnCreate: true
		},
	},
	identifiers: [
		{
			fieldName: "transformUnitchangeLocationId"
		},
	]
},
  • links a unitTransform to a from and to location, if a majority of input units are in a matching from location when the transformUnit action is performed the output units will be placed by default in the transformUnitChangeLocation's to location
  • If none match then the location that has the majority of inputUnit's will set the default to location
  • Each transformUnit action can overwrite the location of the outputUnits

relationshipSchemas

[
  {
    "oldTransformUnitTrackedProperty": {
      storageResources:{
		"xxx":{
			storageType: "graph",
			graphServerTag: "xx",
		}
      },
      links: [
        {
          storageResourceTags: ["xxx"],
          from: {
            objType: {
              serviceTag: "transformUnits",
              objectType: "unitTransform"
            },
            linkType: "one",
          },
          to: {
            objType: {
              serviceTag: "unitType",
              objectType: "unitTrackedProperty"
            },
            linkType: "many",
          }
        }
      ]
    }
  }
]
[
  {
    "newTransformUnitTrackedProperty": {
      storageResources:{
		"xxx":{
			storageType: "graph",
			graphServerTag: "xx",
		}
      },
		fieldNames: {
			adjustmentValue: {
				type: "string", // so can adjust any type of property, will need cast type in logic
				requiredOnCreate: true,
			},
		},         
      links: [
        {
          storageResourceTags: ["xxx"],
          from: {
            objType: {
              serviceTag: "transformUnits",
              objectType: "unitTransform"
            },
            linkType: "one",
          },
          to: {
            objType: {
              serviceTag: "unitType",
              objectType: "unitTrackedProperty"
            },
            linkType: "many",
          }
        }
      ]
    }
  }
]
  • links unitTransform event to all before and after unitTrackedProperties that are adjusted by this transformation
[
  {
    "hasChangeLocation": {
      storageResources:{
		"xxx":{
			storageType: "graph",
			graphServerTag: "xx",
		}
      },
      links: [
        {
          storageResourceTags: ["xxx"],
          from: {
            objType: {
              serviceTag: "stageManager",
              objectType: "stage"
            },
            linkType: "one",
          },
          to: {
            objType: {
              serviceTag: "stageManager",
              objectType: "stageChangeLocation"
            },
            linkType: "many",
          }
        }
      ]
    }
  }
]
  • links transformConfig to a pair of from/to locations
  • multiple pairs per transformConfig allows for a transformConfig to change the location according to the units current location
[
  {
    "changeFromLocation": {
      storageResources:{
		"xxx":{
			storageType: "graph",
			graphServerTag: "xx",
		}
      },
      links: [
        {
          storageResourceTags: ["xxx"],
          from: {
            objType: {
              serviceTag: "transformUnits",
              objectType: "transformConfig"
            },
            linkType: "one",
          },
          to: {
            objType: {
              serviceTag: "supplyLocationManager",
              objectType: "supplyLocation"
            },
            linkType: "one",
          }
        }
      ]
    }
  }
]
[
  {
    "changeToLocation": {
      storageResources:{
		"xxx":{
			storageType: "graph",
			graphServerTag: "xx",
		}
      },
      links: [
        {
          storageResourceTags: ["xxx"],
          from: {
            objType: {
              serviceTag: "transformUnits",
              objectType: "transformConfig"
            },
            linkType: "one",
          },
          to: {
            objType: {
              serviceTag: "supplyLocationManager",
              objectType: "supplyLocation"
            },
            linkType: "one",
          }
        }
      ]
    }
  }
]
  • When this action is applied if the units location matches a transformConfigChangeLocation's changeFromLocation, change to the changeToLocation
[
  {
    "hasMonitorMarker": {
      storageResources:{
		"xxx":{
			storageType: "graph",
			graphServerTag: "xx",
		}
      },
      links: [
        {
          storageResourceTags: ["xxx"],
          from: {
            objType: {
              serviceTag: "transformUnits",
              objectType: "transformConfig"
            },
            linkType: "one",
          },
          to: {
            objType: {
              serviceTag: "monitorManager",
              objectType: "monitorMarker"
            },
            linkType: "many",
          }
        }
      ]
    }
  }
]
[
  {
    "disabledMonitorMarker": {
      storageResources:{
		"xxx":{
			storageType: "graph",
			graphServerTag: "xx",
		}
      },
      links: [
        {
          storageResourceTags: ["xxx"],
          from: {
            objType: {
              serviceTag: "transformUnits",
              objectType: "transformConfig"
            },
            linkType: "one",
          },
          to: {
            objType: {
              serviceTag: "monitorManager",
              objectType: "monitorMarker"
            },
            linkType: "many",
          }
        }
      ]
    }
  }
]
  • During the period of the transformUnit, this marker allows the monitor project to offer more granular monitoring, eg when stitching a clothing item the transformUnit could focus on a subset of the video feed group's feeds (eg the table where the shirt is sewed)
  • A monitorMarker can be disabled and re-enabled
[
  {
    "appliedMonitorMarker": {
      storageResources:{
		"xxx":{
			storageType: "graph",
			graphServerTag: "xx",
		}
      },
      links: [
        {
          storageResourceTags: ["xxx"],
          from: {
            objType: {
              serviceTag: "transformUnits",
              objectType: "unitTransform"
            },
            linkType: "many",
          },
          to: {
            objType: {
              serviceTag: "monitorManager",
              objectType: "monitorMarker"
            },
            linkType: "many",
          }
        }
      ]
    }
  }
]
  • Each time a unitTransform is applied an appliedMonitorMarker relationship is created between the unitTransform object and all of the transformConfig's active monitorMarkers
  • the monitorMarker then links to the monitor object that the market applies to

Working documents

Transform Units