Process-State addresses the relationships between processes and results.

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

This method returns the properties of the relationship between a process and a result or all associated results.

Request attribute:

    • process [mandatory]: the identifier of the process whose related results you want to display.
    • result: the identifier of the result if we only want to show the information of this.

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: returns the list of results associated with the process and its attributes.
    • message: "success" or a descriptive information of the error in any other case.

Example:

Request:

{

"type":"get",

"url":"processes/P001/results/R0000001",

"data":"company=testco&session=QhuFhXB9MXprVKEfakhwaZxgA5osZg1o2NDaZeDunjRBX7cETnq6fehDH0K1"

}


Reponse (success):

{

"status":"0",

"data":[

{"id":"R0000001","description":"Result0001","type":"P","y0":"50","g0":"60","y1":"80","g1":"90","y2":"90","g2":"95","y3":"60","g3":"70","y4":"10","g4":"5","y5":"240","g5":"120","y6":"60","g6":"30","y7":"50","g7":"50","equivalence":"1","weight":"1"}

],

"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}/results

This method creates a relationship between a process and a result. The user must be an administrator.

Request attribute:

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

Parámetros de solicitud (Request parameters, para obtener información adicional, revise la  configuración de resultado y la configuración del estado del proceso-resultado):

    • 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 associate with the given process.
    • equivalence: equivalence between machine cycles and number of produced units of the result.
    • weight: weight in kg with decimals of each unit of the result.

Response:

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

Request:

{

"type":"post",

"url":"processes/P001/results",

"data":"company=testco&session=uMCmYCvK0dMUNlenilQUNOYjtoCos30fZosNShoxdKJzkaqNXDjxIybgPB5z&result=R0000001&equivalence=2&weight=0.345"

}


Reponse (success):

{"status":0,"data":null,"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"}

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

This method erases the relationship between a process and a result. The user must be an administrator.

Request attributes:

    • process [mandatory]: the id of the process from which you want to remove state.
    • result [mandatory]: the id of the result to remove.

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: null.
    • message: "success" or a descriptive information of the error in any other case.

Request:

{

"type":"delete",

"url":"processes/P001/results/R0000001",

"data":"company=testco&session=uMCmYCvK0dMUNlenilQUNOYjtoCos30fZosNShoxdKJzkaqNXDjxIybgPB5z"

}


Reponse (success):

{"status":0,"data":null,"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"}