Skip to main content

Adding Rules to Lot Operations

Linking a lot operation to assets and items narrows the choices in Lot Manager and in custom screens. Links guide the user interface; they aren't database rules, so a script can still run any operation.

Link operations to assets and items
  1. Navigate to Configuration → Ops → Lot Configuration and add these links. Assets are under CoreForge\Philadelphia, and items under CoreForge. Link item classes rather than single items where you can.

    OperationAssetsInput itemsOutput items
    ReceiveStorage\ReceivingRM
    MachineMachiningRM\AL2024, RM\AL6061, RM\AL7075WIP\Machined
    BlendMixing\Mixer 1RM\STD-COAT, RM\PRM-COATWIP\Coatings
    CoatCoatingWIP\Machined, WIP\CoatingsWIP\Coated
    InspectFinishing\QA StationWIP\CoatedWIP\Coated
    PackThe pack lines in FinishingWIP\CoatedFG
    ShipStorage\ShippingFG
  2. Leave Transfer and Scrap unlinked. They happen almost anywhere, to almost anything.

  3. Repeat part of the manual flow in Lot Manager and notice the shorter asset and item lists.

Reference Materials: linkLotOperationsItems

Links a list of itemIds and itemClassIds with a list of lotOperationIds


Parameters​

itemIdList List of Integers
itemClassIdList List of Integers
lotOperationIdList List of Integers
itemSourceId Integer
userId Integer: Id of user executing the function


Returns​

# of records modified Integer
message String None if success


Example​

# Link specific items to multiple operations for a given source
itemIdList = [1101, 1102, 1103]
itemClassIdList = []
lotOperationIdList = [5, 6]
itemSourceId = 2
recordsModified, msg = system.kanoa.lot.linkLotOperationsItems(itemIdList, itemClassIdList, lotOperationIdList, itemSourceId, userId=123)

# Link an item class and individual items to a single operation
itemIdList = [1200]
itemClassIdList = [25]
lotOperationIdList = [9]
itemSourceId = 2
recordsModified, msg = system.kanoa.lot.linkLotOperationsItems(itemIdList, itemClassIdList, lotOperationIdList, itemSourceId, userId=123)