Process-Status-Result handles the relations between processes, statuses and results management.

GET /processes/{process}/statuses/{status}/results

GET/processes/{process}/statuses/{status}/results/{result}

This method returns the list of results related to a status and a process.

Request attribute:

    • process [mandatory]: the id of the process whose related results you want to display.
    • status [mandatory]: the id of the status whose related results you want to display.
    • result: the id of the result whose information you want to display. If not indicated it shows all results.

Request parameters:

    • company [mandatory]: the company name or id.
    • session [mandatory]: the Id of the active session.
    • prefix: if a text is indicated, it uses it to filter the results.
    • type: result type to filter by (0 good, 1 rework, 2 scrap, 255 all). The default values is 255.
    • history: indicates if all the changes of the PSR relations are shown or only the most recent value (0 is not shown, 1 is shown). The default value is 0.
    • showfields: indicates if the associated fields and their default values are shown (0 not shown, 1 if shown). The dafault value is 0.

Response:

    • status: returns "0" on success, and an error code in any other case.
    • data: returns the list of results.
    • message: "success" or a descriptive information of the error in any other case.

Example:

Request:

{"type":"get",

"url":"processes/7101/statuses/0/results",

"data":"company=demo04&session=QhuFhXB9MXprVKEfakhwaZxgA5osZg1o2NDaZeDunjRBX7cETnq6fehDH0K1&type=0"}


Reponse (success):

"status": "0",

"data": [

{

"id": "PRD0001",

"description": "Product 0001",

"resulttype": "0",

"equivalence":"0.001",

"cycleot": "0",

"cyclet": "32",

"cycleq": "1",

"npcauto": "0",

"activity": "100",

"opers": "1",

"calculation": "",

"disallowconfig": "0",

"propagate": "0",

"datetime": "20210928060000",

"operationtime": "0",

"resultinpct": "0"

}

...

],

"message": "Success"}


Response (error):

{"status":"1007",

"data":"<a href='http:\/\/127.0.0.1:8080\/edinnM2\/help\/en\/API_Processes_Config.html'>for additional information follow this link<\/a>",

"message":"Session not stablished"}

POST /processes/{process}/statuses/{status}/results

This method creates a relation between a process a status and a result. The user must have the administrator role.

Request attribute:

    • process [mandatory]: the id of the process to who you want relate the status.
    • status [mandatory]: the id of the status to who you want relate the status.

Request parameters (for additional information please review the results configuration and the process-status-result configuration):

    • company [mandatory]: the company name or id.
    • session [mandatory]: the Id of the active session.
    • result [mandatory]: the Id of the result you want to relate with the given process and status.
    • cycleot: time in seconds of work of the resource (person) per cycle time.
    • cyclet: seconds for each cycle time.
    • cycleq: number of units of results expected after the cycle time.
    • npcauto: indicates the number of units of results with a maintained speed for the system to automatically update the maximum speed of the process. Automatic update of maximum speed is disconnected if this value is left to 0.
    • activity: percentage of activity that is required for the working user. This is a requirement configuration for the activity report.
    • opers: maximum number of working users that can be working on this process, status and result.
    • calculation: how to calculate the units produced by process. To be configured at the Calculation types configuration.
    • propagate: if the result will be automatically propagated to processes that are later in the area. Please see difference between production lines and areas.
    • datetime: date and time when this PSR relation starts applying. This is useful to change important parameters, like Cycle Time and Cycle Unit, without affecting historical data.

DELETE /processes/{process}/statuses/{status}/results/{result}

This method deletes a relation between a process, a status and a result. The user must have the administrator role.

Request attribute:

    • process [mandatory]: the id of the process from who you want to remove the result.
    • status [mandatory]: the id of the status from who you want to remove the result.
    • result [mandatory]: the id of the result to delete.

Request parameters:

    • company [mandatory]: the company name or id.
    • session [mandatory]: the Id of the active session.

Response:

    • status: returns "0" on success, and an error code in any other case.
    • data: "success" on success, and empty in case of error.
    • message: "success" or a descriptive information of the error in any other case.