system.kanoa.lot.executeLotOperation(lotOperationInfo, inputLotEvents, outputLotEvents, userId)
Creates or updates a lot operation event with input and output lot events
Parameters
lotOperationInfo Dictionary
| - assetId | Integer | asset the operation is performed on | 
| - enabled | Boolean | |
| - lotOperationEventId | Integer | Set to None for a new lot operation or use an existing operation event | 
| - lotOperationId | Integer | |
| - tStamp | DateTime | 
inputLotEvents List of Dictionaries: list of input lotEventInfo dictionaries to be consumed by this operation. All keys are required unless stated.
| - assetId | Integer | |
| - comment | String | Not required | 
| - itemId | Integer | Required if this is a new lot | 
| - itemUnitId | Integer | |
| - lotEventQty | Float | |
| - lotId | Integer | Either lotId or lotName must be provided | 
| - lotName | String | Either lotId or lotName must be provided | 
| - lotStateId | Integer | |
| - lotStateReasonId | Integer | Not required | 
| - shiftId | Integer | Not required | 
| - tStamp | DateTime | |
| - workOrderId | Integer | Not required | 
outputLotEvents List of Dictionaries: list of output lotEventInfo dictionaries that are to be created by this operation
| - assetId | Integer | |
| - comment | String | Not required | 
| - itemId | Integer | Required if this is a new lot | 
| - itemUnitId | Integer | |
| - lotEventQty | Float | |
| - lotId | Integer | Either lotId or lotName must be provided | 
| - lotName | String | Either lotId or lotName must be provided | 
| - lotStateId | Integer | |
| - lotStateReasonId | Integer | Not required | 
| - shiftId | Integer | Not required | 
| - tStamp | DateTime | |
| - workOrderId | Integer | Not required | 
userId Integer
Returns
lotOperationEventId Integer
message String None if success
Example
>lotOperationEventInfo = {
                            'lotOperationEventId': None, 
                            lotOperationId': 1, 
                            'assetId': 5, 
                            'tStamp': system.date.now(), 
                            'enabled': True
                         }
>inputLotEvents = []
>outputLotEvents = [{
                        lotEventId': None, 
                        'lotId': 1, 
                        'lotEventQty': 100, 
                        'workOrderId': 56, 
                        'assetId':1, 
                        'itemSourceId': 2, 
                        'lotStateId': 7, 
                        'lotStateReasonId': 78, 
                        'shiftId': 4, 
                        'tStamp': system.date.now, 
                        'comment':None, 
                        'lotOperationEventId': None
                    }]
>lotOperationEventId, msg = system.kanoa.lot.executeLotOperation(lotOperationEventInfo, inputLotEvents, outputLotEvents, userId)