Domain-Specific Building Blocks > Work Master Building Block > Key Services (Work Master Building Block)
Key Services (Work Master Building Block)
The PTC.WorkMasterImpl.Manager Thing contains CRUD services for the work master database tables, and services to validate the data before it is inserted into the database tables. You can view all services in this building block on the Services page of the PTC.WorkMasterImpl.Manager Thing.
The following key services are executed from the PTC.WorkMasterImpl.Manager Thing:
AddWorkMasterData—Adds the work master (PTC.WorkMaster.WorkMaster) and work master material specification (PTC.WorkMaster.WorkMasterMaterialSpecification) for the given material master (PTC.MaterialMaster.MaterialMaster), work master model specification (PTC.WorkMaster.WorkMasterModelSpecification), and work master configuration specification (PTC.WorkMaster.WorkMasterConfigurationSpecification). Also sets the ProductionBlockValue property on the work master configuration specification (PTC.WorkMaster.WorkMasterConfigurationSpecification) if a production block duration is provided as input.
AddWorkMasterDataInternal—This internal service should only be called by AddWorkMasterData.
UpdateWorkMasterData—Updates the ProductionBlockValue and ProductionBlockTypeUid properties on the work master configuration specification (PTC.WorkMaster.WorkMasterConfigurationSpecification), and the Duration property on the work master (PTC.WorkMaster.WorkMaster).
UpdateWorkMasterDataInternal—This internal service should only be called by AddWorkMasterData.
GetModelWorkMasterForMaterial—Retrieves the work master (PTC.WorkMaster.WorkMaster) associated with the given model (PTC.MfgModel.Model) and material master (PTC.MaterialMaster.MaterialMaster).
GetChildrenWorkMasters—Retrieves the first layer of child work masters (PTC.WorkMaster.WorkMaster) for the given work master.
GetModelsForMaterialMaster—Retrieves the list of models (PTC.MfgModel.Model) associated with the given material master (PTC.WorkMaster.WorkMaster) .
GetNestedWorkMasters—Retrieves the child work masters (PTC.WorkMaster.WorkMaster) for the specified work master and maximum number of levels.
GetMaterialMastersForModel—Retrieves the list of material masters (PTC.MaterialMaster.MaterialMaster) that are available for a given model (PTC.MfgModel.Model).
GenerateWorkDefinition—Creates clones of the specified work master (PTC.WorkMaster.WorkMaster) and related entities when a job order is executed.
The following diagrams show the sequence of service calls for the AddWorkMasterData and UpdateWorkMasterData services.
Service calls sequence example.
Was this helpful?