Process-Status handles the relations between processes ans statuses management.

GET /processes/{process}/statuses

This method returns the list of statuses related to a process.

Request attribute:

    • process [mandatory]: the id of the process whose related statuses you want to display.

Request parameters:

    • company [mandatory]: the company name or id.
    • session [mandatory]: the Id of the active session.
    • type: status type to filter by (0 production, 1 idle, 2 dependency, 3 failure, 4 unscheduled)

Response:

    • status: returns "0" on success, and an error code in any other case.
    • data: returns the list of statuses associated to the process and their attibutes.
    • message: "success" or a descriptive information of the error in any other case.

Example:

Request:

{"type":"get",

"url":"processes/7101",

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


Reponse (success):

"status": "0",

"data": [

{

"id": "TPM",

"description": "TPM",

"statustype": "4",

"maxtime": "0",

"next_status": "",

"propagate": "0",

"week_days": "0",

"scheduledtime": "0600",

"order": "00018",

"weekdays": "0",

"activity": "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

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

Request attribute:

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

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

    • company [mandatory]: the company name or id.
    • session [mandatory]: the Id of the active session.
    • status [mandatory]: the Id of the status you want to relate with the given process.
    • maxtime: maximum time in minutes that the process can be in this status. If any value different from 0 is specified, the system will automatically close this status when it is open and the indicated minutes are surpassed.
    • next_status: the next status to automatically pass when the maximum minutes are surpassed.
    • propagate: if the status will be automatically propagated to processes that are later in the area. Please see difference between production lines and areas.
    • week_days: status can be automatically scheduled by days of the week and time.
    • scheduledtime: time at which the status will automatically be inserted.
    • activity: percentage of activity that is required from a working user when a process is in this status. This is a requirement configuration for the activity report.

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

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

Request attribute:

    • process [mandatory]: the id of the process from who you want to remove the status.
    • status [mandatory]: the id of the status 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.