Sepasoft MES Module Suite
MES Work Order
An instance of the MES Work Order object is created whenever a new work order is created using the MES Work Order Table component and also by the system.mes.workorder.createMESWorkOrder() scripting function. This object can then be used to adjust any of the parameters such as required quantity, due date and status. The actual quantity produced against a work order and remaining quantity are calculated based on the sum of quantities from operations associated with the work order ref UUID. Please note that these calculations can change based on the operations referencing the work order. The Work Order object has a method called "updateQuantities()" described below, which retrieves the latest values associated with the work order. This is part of the full object load, but is not part of loading the object from a link.
The MES Work Order object is derived from the MESAbstractObject and inherits all of its exposed properties, methods and events as well as adds the ones documented in this section.
- MES Work Order
- Object Creation
- Use
- Object Properties
- Object Functions
- getActiveOperationsResponses()
- getActualMaterialLots(beginDate, endDate, lotUseType)
- getActualPersonnel(beginDate, endDate)
- getActualQuantity()
- getActualSupplementalEquipment(beginDate, endDate)
- getClosedDate()
- getDueDate()
- getMaterialRef()
- getMaterialRefName()
- getMaterialRefType()
- getMaterialRefUUID()
- getOperationsRequests()
- getOperationsRequests(beginDate, endDate)
- getOperationsResponses()
- getOperationsResponses(beginDate, endDate)
- getRemainingQuantity()
- getScheduledQuantity()
- getWorkOrderQuantity()
- isClosed()
- setClosed(closed)
- setClosedDate(closedDate)
- setDueDate(dueDate)
- setMaterialRef(mesMaterialDef)
- setMaterialRef(materialLink)
- setWorkOrderQuantity(quantity)
- updateQuantities()
- Object Events
Object Creation
The following scripting functions create an MES Work Order:
Python |
#Get a material link for the work order material matLink = system.mes.getMESObjectLinkByName('MaterialDef', 'Soda') #Create the work order wo = system.mes.workorder.createMESWorkOrder('A34', matLink) #Set some production related properties wo.setWorkOrderQuantity(1000.0) #Set the due date wo.setDueDate(system.date.addDays(system.date.now(), 7)) #Save the object system.mes.saveMESObject(wo) |
Use
The following scripting functions and components use this object.
-
system.mes.workorder.saveMESWorkOrder()
-
system.mes.workorder.getMESWorkOrder()
-
system.mes.workorder.getMESWorkOrders()
- Vision MES Work Order Table component's Work Order User Event.getWorkOrder()
Object Properties
Inherits properties from AbstractMESObject.
Property values can be accessed and changed for an object by using the getPropertyValue() and setPropertyValue() method.
These properties are accessible through the MES Work Order Table component and with the provided object functions, but not directly as obj.properties.
|
Name
|
Scripting Name
|
Permissions
|
Description
|
|---|---|---|---|
|
Material Reference
|
MaterialRef
|
Read/Write
|
Material Definition assigned to the Work Order object.
|
|
Material Reference UUID
|
MaterialRefUUID
|
Read/Write
|
UUID of the Material Definition assigned to the Work Order object.
|
|
Material Reference Type
|
MaterialRefType
|
Read/Write
|
Type of the Material Definition assigned to the Work Order object.
|
|
Work Order Target Quantity
|
WorkOrderQuantity
|
Read/Write
|
Target quantity assigned to the Work Order object.
|
|
Work Order Actual Quantity
|
WorkOrderActualQuantity
|
Read Only
|
Actual quantity corresponding to the Work Order object.
|
|
Work Order Scheduled Quantity
|
WorkOrderScheduledQuantity
|
Read Only
|
Quantity scheduled for the Work Order object.
|
|
Work Order Remaining Quantity
|
WorkOrderRemainingQuantity
|
Read Only
|
Quantity of material remaining for the work order.
|
|
Work Order Closed Date
|
WorkOrderClosedDate
|
Read/Write
|
Closed date assigned to the Work Order object.
|
|
Work Order Due Date
|
WorkOrderDueDate
|
Read/Write
|
Due date assigned to the Work Order object.
|
|
Work Order Closed
|
WorkOrderClosed
|
Read/Write
|
The boolean assigned to closed property of the Work Order object.
|
Object Functions
This object provides the following functions:
- getActiveOperationsResponses()
- getActualMaterialLots(beginDate, endDate, lotUseType)
- getActualPersonnel(beginDate, endDate)
- getActualQuantity()
- getActualSupplementalEquipment(beginDate, endDate)
- getClosedDate()
- getDueDate()
- getMaterialRef()
- getMaterialRefName()
- getMaterialRefType()
- getMaterialRefUUID()
- getOperationsRequests()
- getOperationsRequests(beginDate, endDate)
- getOperationsResponses()
- getOperationsResponses(beginDate, endDate)
- getRemainingQuantity()
- getScheduledQuantity()
- getWorkOrderQuantity()
- isClosed()
- setClosed(closed)
- setClosedDate(closedDate)
- setDueDate(dueDate)
- setMaterialRef(mesMaterialDef)
- setMaterialRef(materialLink)
- setWorkOrderQuantity(quantity)
- updateQuantities()
getActiveOperationsResponses()
Syntax
getActiveOperationsResponses()
- Parameters
None
- Returns
MESList<MESObjectLink> Returns actively running Operations Responses that are associated with a work order.
- Scope
All
getActualMaterialLots(beginDate, endDate, lotUseType)
Gets the Material Lots related to this Work Order, filtered by begin and end dates and Lot Use Type.
Syntax
getActualMaterialLots(beginDate, endDate, lotUseType)
- Parameters
Date beginDate - Date (inclusive) when the Operations Request for this Work Order was executed. Pass in 'None' to use the default date [1 Jan, 1970 00:00:00].
Date endDate - Date (inclusive) when the Operations Request for this Work Order finished executing. Pass in 'None' to use the default date [1 Jan, 2200 00:00:00].
String lotUseType - The lot's use-type. Valid uses are: 'In', 'Out', 'Consumable', and 'By-product'.
- Returns
MESList<MESObjectLink> matLotLinks - A list of MESObjectLinks that each have a reference to an Material Lot object.
- Scope
All
This object inherits the AbstractMESObject functions.
Object Events
Objects have events associated with them that allow for custom scripts to be added whenever the event occurs. Refer to MES Object Events for more information.
This object inherits the AbstractMESObject events.
Sepasoft MES Module Suite