Skip to content

GetProgramName Request#

Overview#

The system must process POST requests sent to the /getprogramname endpoint to retrieve the DEFPRODFILENAME and QUANTITY values. The system processes POST requests received at the /getprogramname endpoint and validates the lot. If validation succeeds, the resource recipe name and quantity are returned to the laser.

How To Configure#

Relevant Artifacts#

The following table lists the entities relevant to the implementation of this requirement:

Name Type Is Mandatory Description
IoTMetaDataDefinition SmartTable Yes Smart Table used to configure REST server addresses and ports.
SMTLaserMarkerRequestOrder DEE Yes DEE used to retrieve the Resource Recipe Name and quantity of the requested lot (WORKORDER), if defined, or the lot currently in process.

How It Works#

  1. The host receives a POST request at the /getprogramname endpoint.
  2. By default, the system invokes the SMTLaserMarkerRequestOrder DEE, or another DEE configured in IoTMetaDataDefinition under GetProgramNameDEE.
  3. The DEE returns the RecipeName and Quantity values.
  4. After receiving the DEE response, the response payload is created using the original request data, adding DEFPRODFILENAME with the value of Recipe and QUANTITY with the value of Quantity.
  5. The system returns an HTTP 200 response containing the generated payload.
  6. In case of an error, a dedicated error payload is generated and returned.

Assumptions#

  • The /getprogramname endpoint is accessible and correctly configured.

Example Payload#

Request#

```json{ "MESSAGEID": 21, "MACHINEID": "LASER01", "USERNAME": "OPERATOR01", "WORKORDER": "123456" }

### Reply

```json{
  "STATUS": "OK",
  "REASON": "",
  "DATA": [
    {
      "RESULT": "0",
      "MSG": "OK",
      "MESSAGEID": 21,
      "MACHINEID": "LASER01",
      "DEFPRODFILENAME": "PCB A Rev1",
      "QUANTITY": 120
    }
  ]
}