2.4. Sub-Resources of Operations Including Information from the Routing¶
The values from routing can be found in the following resources:
- GET operations/{operationId}/specification
Contains target values that originate from the routing. The following target values can be found:
- Processing Time
- Setup Time
- Teardown Time
- Queue Time
- Wait Time
- Move Time
- Minimum transfer quantity
Note
The target setup and teardown time of an operation can be equal to zero. In conclusion, the operation can only consist of a processing phases! FORCE Bridge assures that the target processing time is properly calculated through either through the target quantity or target stroke time.
- GET operations/{operationId}/productionResourceTools
Tools and production resources required for executing the operation.
- GET operations/{operationId}/components
Input material required for executing the operation.
- GET operations/{operationId}/materialCharacteristics
Characteristics of the material to be produced by the operation
- GET operations/{operationId}/alternativeWorkplaces
The workplaces at which the operation can be executed. If no manufacturing variants are defined for the material to be produced by the operation, these are the workplaces in the assigned capacity group.
Important
All these values, except for the target quantity in the specification resource are inherited from the routing from which the specific production order was generated from in the ERP-System.
2.4.1. Tutorials¶
2.4.1.1. Retrieve the Specification of Plannable Operations¶
Solution: show/hide
Java
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | IOperationClient operationClient = api.getOperationClient();
GetOperationsRequest operationsRequest = new GetOperationsRequest();
operationsRequest.setIsPlannable(true);
operationsRequest.embed(new OperationEmbed().specification(true));
Page<OperationResponse> operationResponsePage = operationClient.getOperations(operationsRequest);
operationResponsePage
.streamForward()
.forEach(operationResponse -> {
OperationPropertiesWSModel properties = operationResponse.getProperties();
OperationSpecificationPropertiesWSModel routingDetails = operationResponse
.getSpecification()
.getEmbedded();
/* ... */
});
|
/../_code/java/src/test/java/com/forcam/usage/operations/EmbedOperationEntriesTest.java
CURL
1 2 3 | curl -X GET "http://$HOST:$PORT/ffwebservices/api/v2/operations?embed=specification&isPlannable=true&limit=100&offset=0"
--header "accept: application/json;charset=UTF-8"
--header "authorization: Bearer $TOKEN"
|
2.4.1.2. Retrieve the Required Components of Operations Currently Being Processed¶
Solution: show/hide
Java
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | IOperationClient operationClient = api.getOperationClient();
GetOperationsRequest operationsRequest = new GetOperationsRequest();
operationsRequest.setOperationPhaseId(OperationPhase.PROCESSING);
Page<OperationResponse> operationResponsePage = operationClient.getOperations(operationsRequest);
List<OperationResponse> operationResponses = operationResponsePage
.streamForward()
.collect(Collectors.toList());
Map<OperationResponse, List<OperationComponentWSModel>> operationComponentsMap = new HashMap<>();
for (OperationResponse operationResponse : operationResponses) {
String operationId = operationResponse
.getProperties()
.getId();
GetOperationComponentsRequest componentsRequest = new GetOperationComponentsRequest(operationId);
OperationComponentCollectionPage operationComponentResponses = operationClient.getOperationComponents(componentsRequest);
List<OperationComponentWSModel> operationComponents = operationComponentResponses
.streamForward()
.collect(Collectors.toList());
operationComponentsMap.put(operationResponse, operationComponents);
}
|
/../_code/java/src/test/java/com/forcam/usage/operations/components/ComponentsTest.java
CURL
1 2 3 | curl -X GET "http://$HOST:$PORT/ffwebservices/api/v2/operations?embed=components&operationPhaseId=PROCESSING
--header "accept: application/json;charset=UTF-8"
--header "authorization: Bearer $TOKEN"
|