Decanting tasks
Ask Rologi Flow to decant stock from a source container.
A decanting task asks to decant stock from a source container. Each line names an item and the quantity to decant.
Loading diagram…
The diagram shows the usual order. The order can differ, for example when a task is canceled before its first place.
Putaway task created tells your system about a putaway task that came from the decanting process and that your system did not create, for example one for each decanted cart. Rologi Flow sends it before the putaway of that task starts. The content of that task does not change afterwards.
Create or update
Send PUT with the task identifier in the path. Rologi Flow creates the task if it does not exist, or updates it if it exists.
PUT https://rologi-flow.example.com/api/decanting-tasks/12345
Authorization: Bearer <token>
Content-Type: application/json
{
"site": "1000",
"system": "AS1",
"type": "GOODS_RECEIPT",
"supplier": "Acme Company Ltd.",
"container": {
"type": "PALLET",
"lpn": "1234567890123"
},
"lines": [
{
"id": "1",
"item": "digital-camera",
"quantity": {
"amount": 60,
"unit": "PIECE"
},
"batchNumber": "X24078",
"expiryDate": "2025-12-31"
}
]
}| Field | Meaning |
|---|---|
site, system | The site and the automation system. Required. |
container | The container from which the items of the task come. Required. |
lines | The lines of the task. Required. Each line has an id that is unique in the task, an item and a quantity. |
lines[].container | Optional container in which the items of the line are placed. |
lotNumber, batchNumber, expiryDate | Optional lot, batch and expiry date of the item. |
name, type, supplier | Optional name, type and supplier name. |
traits | Optional free-form key and value pairs. Each create or update replaces them. |
The answer is 409 when the task cannot change any more: it is completed, or it is locked by a Rologi Flow process.
Priority
The task and each of its lines have the same pair of sort keys:
priorityTimestamp: the earlier time comes first. Rologi Flow rounds it to whole seconds.priority: the lower value comes first.0is the highest priority.
Missing values sort last. Decanting orders by task priority first and then by line priority, and keeps the lines of a task together. To set the order by priority only, do not send priorityTimestamp.
Change the priority with PATCH, also when the task is in progress. The new priority then orders the remaining work.
PATCH https://rologi-flow.example.com/api/decanting-tasks/12345
Authorization: Bearer <token>
Content-Type: application/json
{
"priority": 10,
"lines": [
{
"id": "1",
"priority": 0
}
]
}- Only the lines in the request change. Other lines keep their values.
- The request always replaces the pair of the task. A field that you omit or set to null is cleared. The same applies to the pair of each line in the request.
- The answer is
400when a line identifier is unknown or is in the request more than once.
Cancel
Send DELETE with the task identifier. Rologi Flow never removes a decanting task. The request asks for its cancellation, and the operation is idempotent.
| Status | Meaning |
|---|---|
| 202 | The cancellation is accepted. The task is REVOKED until the goods that are left are taken away. |
| 204 | The task is canceled, or it does not exist. |
| 409 | The task cannot be canceled any more. The error type is TASK_COMPLETED or TASK_FAILED. |
Goods that are already decanted stay valid. An operator takes the goods that are left to the canceled goods area. Then the task becomes CANCELED.
To cancel one line, send DELETE /api/decanting-tasks/{id}/lines/{lineId}. The other lines continue. When the last open line is finished, DecantingTaskFinished tells the outcome of the task.
Read
GET /api/decanting-tasks/{id} returns the task with its state and its lines. The answer is 404 when no such task exists. To read many tasks, see search and paging.
| Object | States |
|---|---|
| Task | CREATED, IN_PROGRESS, REVOKED, COMPLETED, CANCELED, FAILED |
| Line | CREATED, IN_PROGRESS, REVOKED, COMPLETED, CANCELED, FAILED |
Reference
Create or update, get, list, search, update priority, cancel a task, cancel a line. Events: decanting events.