def cycle_counting(physicalGoodDict, nodeDict, disposition=None, quantity=np.nan, quantity_udm=None, bizTransactionList = None, sourceDestList=None, ilmd=None, extensions={}, dbname="EPCIS_DB"): ''' Process of counting objects within a location in order to obtain an accurate inventory for business needs other than accounting purposes (e.g., replenishment and allocation). OBJECT - OBSERVE ''' bizStep='cycle_counting' result = OBSERVEobjectEvent(physicalGoodDict, nodeDict, quantity=quantity, quantity_udm=quantity_udm, disposition=disposition, bizTransactionList = bizTransactionList, bizStep=bizStep, sourceDestList=sourceDestList, ilmd=ilmd, extensions=extensions, dbname="EPCIS_DB") return result
def stock_taking(physicalGoodDict, nodeDict, disposition=None, quantity=np.nan, quantity_udm=None, bizTransactionList = None, sourceDestList=None, ilmd=None, extensions={}, dbname="EPCIS_DB"): ''' Process of counting objects within a location following established rules and/or standards to serve as a basis for accounting purposes. OBJECT - OBSERVE ''' bizStep='stock_taking' result = OBSERVEobjectEvent(physicalGoodDict, nodeDict, quantity=quantity, quantity_udm=quantity_udm, disposition=disposition, bizTransactionList = bizTransactionList, bizStep=bizStep, sourceDestList=sourceDestList, ilmd=ilmd, extensions=extensions, dbname="EPCIS_DB") return result
def accepting( physicalGoodDict, nodeDict, disposition='accepted', quantity=np.nan, quantity_udm=None, bizTransactionList = None, sourceDestList=None, ilmd=None, extensions={}, dbname="EPCIS_DB"): ''' Denotes a specific activity within a business process where an object changes possession and/or ownership. OBJECT - OBSERVE ''' bizStep='accepting' if disposition in accepting_disp: result = OBSERVEobjectEvent(physicalGoodDict, nodeDict, quantity=quantity, quantity_udm=quantity_udm, disposition=disposition, bizTransactionList = bizTransactionList, bizStep=bizStep, sourceDestList=sourceDestList, ilmd=ilmd, extensions=extensions, dbname="EPCIS_DB") else: raise Exception(f"Invalid disposition '{disposition}' for step '{bizStep}', chose between {accepting_disp}") return result
def staging_outbound(physicalGoodDict, nodeDict, disposition='ready to ship', quantity=np.nan, quantity_udm=None, bizTransactionList = None, sourceDestList=None, ilmd=None, extensions={}, dbname="EPCIS_DB"): ''' Denotes a specific activity within a business process in which an object moves from a facility to an area where it will await transport pick-up. OBJECT-OBSERVE ''' bizStep='staging_outbound' if disposition in staging_outbound_disp: result = OBSERVEobjectEvent(physicalGoodDict, nodeDict, quantity=quantity, quantity_udm=quantity_udm, disposition=disposition, bizTransactionList = bizTransactionList, bizStep=bizStep, sourceDestList=sourceDestList, ilmd=ilmd, extensions=extensions, dbname="EPCIS_DB") else: raise Exception(f"Invalid disposition '{disposition}' for step '{bizStep}', chose between {staging_outbound_disp}") return result
def repairing(physicalGoodDict, nodeDict, disposition='repaired', quantity=np.nan, quantity_udm=None, bizTransactionList = None, sourceDestList=None, ilmd=None, extensions={}, dbname="EPCIS_DB"): ''' Denotes a specific activity within a business process where a malfunctioning product is repaired (typically by a post-sales service), without replacing it by a new one. OBJECT - OBSERVE ''' bizStep='repairing' if disposition in repairing_disp: result = OBSERVEobjectEvent(physicalGoodDict, nodeDict, quantity=quantity, quantity_udm=quantity_udm, disposition=disposition, bizTransactionList = bizTransactionList, bizStep=bizStep, sourceDestList=sourceDestList, ilmd=ilmd, extensions=extensions, dbname="EPCIS_DB") else: raise Exception(f"Invalid disposition '{disposition}' for step '{bizStep}', chose between {repairing_disp}") return result
def inspecting(physicalGoodDict, nodeDict, disposition='OK', quantity=np.nan, quantity_udm=None, bizTransactionList = None, sourceDestList=None, ilmd=None, extensions={}, dbname="EPCIS_DB"): ''' Process of reviewing objects to address potential physical or documentation defects. OBJECT - OBSERVE ''' bizStep='inspecting' if disposition in inspecting_disp: result = OBSERVEobjectEvent(physicalGoodDict, nodeDict, quantity=quantity, quantity_udm=quantity_udm, disposition=disposition, bizTransactionList = bizTransactionList, bizStep=bizStep, sourceDestList=sourceDestList, ilmd=ilmd, extensions=extensions, dbname="EPCIS_DB") else: raise Exception(f"Invalid disposition '{disposition}' for step '{bizStep}', chose between {inspecting_disp}") return result
def entering_exiting(physicalGoodDict, nodeDict, disposition='unknonwn', quantity=np.nan, quantity_udm=None, bizTransactionList = None, sourceDestList=None, ilmd=None, extensions={}, dbname="EPCIS_DB"): ''' Denotes a specific activity at the Entrance/Exit door of a facility where customers are either leaving with purchased product or entering with product to be returned to the facility. OBJECT - OBSERVE ''' bizStep='entering_exiting' if disposition in entering_exiting: result = OBSERVEobjectEvent(physicalGoodDict, nodeDict, quantity=quantity, quantity_udm=quantity_udm, disposition=disposition, bizTransactionList = bizTransactionList, bizStep=bizStep, sourceDestList=sourceDestList, ilmd=ilmd, extensions=extensions, dbname="EPCIS_DB") else: raise Exception(f"Invalid disposition '{disposition}' for step '{bizStep}', chose between {entering_exiting}") return result
#observe object for i in range (0,num_obj_OBSERVE): #random choose a node node_key = random.choice(list(nodesDict.keys())) chooseNode = nodesDict[node_key] #random coose an epc epc_key = random.choice(list(EPCsDict.keys())) chooseEpc= EPCsDict[epc_key] result = OBSERVEobjectEvent(physicalGood=chooseEpc, nodeDict=chooseNode.__dict__, ) #delete object for i in range (0,num_obj_OBSERVE): #random choose a node node_key = random.choice(list(nodesDict.keys())) chooseNode = nodesDict[node_key] #random coose an epc epc_key = random.choice(list(EPCsDict.keys())) chooseEpc= EPCsDict[epc_key]