Get and Post the Resources Consumed Without Using Serials
You can use a REST API to post the resources that the plant consumes to fulfill a work order operation without referencing the serial of the assembly. To get the details for one work order and work order resources, you can use a REST API to scan the work order number, and then post the transaction for the resources that the work order operation consumes.
Let's discuss these scenarios:
-
Get work order details according to work order.
-
Get work order operations for one work order.
-
Get the resources that are required to fulfill one work order operation.
-
Post the resource consumption for one work order operation.
Get Work Order Details According to Work Order
Assume you create a solution that allows John Brown, a discrete manufacturer, to use a mobile client to connect to your partner application, and then use a REST API. An application on the client scans work order number M1-1208, gets the operations, and then displays them to the production operator.
Here's a typical application processing flow for the scenarios:
-
Send a REST request to get work order details for work order number:
-
The response payload includes details that describe the results of the request.
-
Your partner application extracts values for these attributes from the response payload. It does not display the WorkOrderId but proceeds to the next call that extracts work order operations according to the WorkOrderId attribute.
Attribute
Description
WorkOrderId
Unique value that Oracle Manufacturing Cloud creates when it creates a work order. For example, 300100093180128.
Example URL
Use this resource URL format to get work order details for work order number M1-1208:
GET
curl -u username:password "https://servername/fscmRestApi/resources/version/workOrders?q=OrganizationCode=M1&WorkOrderNumber=M1-1208"
Example Response
Here's an example of the response body in JSON format.
{ "items": [ { "OrganizationId": 207, "OrganizationCode": "M1", "OrganizationName": "Tall Manufacturing", "WorkOrderId": 300100093180128, "WorkOrderNumber": "M1-1208", "WorkOrderDescription": null, "WorkMethodId": 300100070832877, "WorkMethodCode": "DISCRETE_MANUFACTURING", "WorkOrderType": "STANDARD", "WorkOrderTypeDescription": "Standard", "WorkOrderSubType": null, "WorkOrderSubTypeDescription": null, "InventoryItemId": 300100039626650, "ItemNumber": "MI-1234", "Description": "5.5" mobile", "ItemRevision": "A", "ItemStructureName": null, "TransformFromItemId": null, "TransformFromItemNumber": null, "WorkDefinitionAsOfDate": "2016-10-27T04:38:29-07:00", "WorkDefinitionId": 300100091198769, "WorkDefinitionVersionId": 300100091198770, "WorkDefinitionVersionNumber": "1", "WorkDefinitionCode": "YLX_WD_01", "WorkDefinitionName": "YLX_WD_01", "WorkOrderPriority": null, "WorkOrderStatusId": 10004, "WorkOrderStatusName": "Released", "WorkOrderStatusCode": "ORA_RELEASED", "WorkOrderSystemStatusCode": "RELEASED", "SchedulingMethod": "DEFAULT_SCHEDULER", "PlannedStartQuantity": 10, "CompletedQuantity": null, "ScrappedQuantity": null, "RejectedQuantity": null, "NettableSupplyQuantityOverride": null, "UnitOfMeasure": "Each", "FirmPlannedFlag": false, "PlannedStartDate": "2016-10-27T04:38:00-07:00", "PlannedCompletionDate": "2016-10-27T04:38:00-07:00", "ActualStartDate": "2016-10-27T05:14:42-07:00", "ActualCompletionDate": null, "ReleasedDate": "2016-10-27T05:14:42-07:00", "ClosedDate": null, "CanceledDate": null, "DelayStatus": 2, "WorkOrderDate": "2016-10-27T04:38:00-07:00", "CanceledReason": null, "OvercomplToleranceType": null, "OvercomplToleranceValue": null, "OvercomplToleranceTypeDescription": null, "SupplyType": "7", "SupplyTypeDescription": "Based on Work Definition", "CompletionSubinventoryCode": "Stores", "CompletionLocatorId": null, "CompletionLocator": null, "SerialTrackingFlag": true, "BackToBackFlag": false, "ContractMfgFlag": false, "OrchestrationCode": null, "InterfaceSourceCode": null, "ScoSupplyOrderId": null, "CmPOHeaderId": null, "CmPOLineId": null, "CmPOLineLocId": null, "OrderLessFlag": false, "SourceSystemType": null, "SourceSystemId": null, "SourceHeaderReference": null, "SourceHeaderReferenceId": null, "SourceLineReference": null, "SourceLineReferenceId": null, } ] }
Get Work Order Operations for One Work Order
The production operator picks operation sequence 10, and then gets the list of resources required for operation 10.
Here's a typical application processing flow for the scenarios:
-
Send a REST request to get work order operations.
You use the values of these attributes that you received in the response payload when you searched for work order details according to work order:
Attribute
Description
WorkOrderId
Unique value that Oracle Manufacturing Cloud creates when it creates a work order. For example, 300100093180128.
-
The response payload includes details that describe the results of the request.
-
Your partner application extracts values for these attributes from the response payload and displays them in the client. NOTE: A work order can contain one or more operations.
Attribute
Description
WorkOrderId
Unique key that Oracle Manufacturing Cloud creates when it creates a work order. For example, 300100093180128.
WorkOrderNumber
Value that identifies the work order number. For example, M1-1208.
WorkOrderOperationId
Unique key that Oracle Manufacturing Cloud creates when it creates a work order. For example, 300100093180129
OperationSequenceNumber
Sequence to use when performing the work order operations. For example, 10.
OperationName
Name of the work order operation. For example, OP10.
OperationDescription
Description of the work order description. For example, Assemble.
Example URL
Use this resource URL format to get details about the work order operations for work order M1-1208.
GET
curl -u username:password "https://servername/fscmRestApi/resources/version/workOrders/300100093180128/child/WorkOrderOperation"
Example Response
Here's an example of the response body in JSON format.
Note:
This payload references two resources.
{ "items": [ { "OrganizationId": 207, "WorkOrderId": 300100093180128, "WorkOrderNumber": "M1-1208", "WorkOrderOperationId": 300100093180129, "OperationSequenceNumber": 10, "OperationName": "OP10", "OperationDescription": "Assemble", "OperationType": "IN_HOUSE", "OperationTypeDescription": "In-house", "StandardOperationId": null, "StandardOperationName": null, "StandardOperationCode": null, "WorkAreaId": 300100091177813, "WorkAreaCode": "YLX_WA_01", "WorkAreaName": "YLX_WA_01", "WorkAreaDescription": "YLX_WA_01", "WorkCenterId": 300100091177814, "WorkCenterCode": "YLX_WC_01", "WorkCenterName": "YLX_WC_01", "WorkCenterDescription": "YLX_WC_01", "OSPItemId": null, "OSPItemDescription": null, "SupplierId": null, "SupplierName": null, "SupplierSiteId": null, "SupplierSiteDescription": null, "FixedLeadTime": null, "VariableLeadTime": null, "LeadTimeUnitOfMeasure": null, "CountPointOperationFlag": true, "AutoTransactFlag": false, "PORequestedQuantity": null, "POApprovedQuantity": null, "OverReceiptQuantity": null, "InProcessQuantity": null, "ReceivedQuantity": null, "ShippedQuantity": null, "ReadyQuantity": 10, "CompletedQuantity": null, "ScrappedQuantity": null, "RejectedQuantity": null, "UnitOfMeasure": "Each", "PlannedStartDate": "2016-10-27T04:38:00-07:00", "PlannedCompletionDate": "2016-10-27T04:38:00-07:00", "ActualStartDate": null, "ActualCompletionDate": null, "DelayStatus": 2, "MaterialsCount": 0, "ResourcesCount": 0, "SerialTrackingFlag": true, "ShippingDocumentsFlag": false, }, { "OrganizationId": 207, "WorkOrderId": 300100093180128, "WorkOrderNumber": "M1-1208", "WorkOrderOperationId": 300100093180130, "OperationSequenceNumber": 20, "OperationName": "OP20", "OperationDescription": "Test", "OperationType": "IN_HOUSE", "OperationTypeDescription": "In-house", "StandardOperationId": null, "StandardOperationName": null, "StandardOperationCode": null, "WorkAreaId": 300100091177813, "WorkAreaCode": "YLX_WA_01", "WorkAreaName": "YLX_WA_01", "WorkAreaDescription": "YLX_WA_01", "WorkCenterId": 300100091177814, "WorkCenterCode": "YLX_WC_01", "WorkCenterName": "YLX_WC_01", "WorkCenterDescription": "YLX_WC_01", "OSPItemId": null, "OSPItemDescription": null, "SupplierId": null, "SupplierName": null, "SupplierSiteId": null, "SupplierSiteDescription": null, "FixedLeadTime": null, "VariableLeadTime": null, "LeadTimeUnitOfMeasure": null, "CountPointOperationFlag": true, "AutoTransactFlag": false, "PORequestedQuantity": null, "POApprovedQuantity": null, "OverReceiptQuantity": null, "InProcessQuantity": null, "ReceivedQuantity": null, "ShippedQuantity": null, "ReadyQuantity": null, "CompletedQuantity": null, "ScrappedQuantity": null, "RejectedQuantity": null, "UnitOfMeasure": "Each", "PlannedStartDate": "2016-10-27T04:38:00-07:00", "PlannedCompletionDate": "2016-10-27T04:38:00-07:00", "ActualStartDate": null, "ActualCompletionDate": null, "DelayStatus": 1, "MaterialsCount": 1, "ResourcesCount": 0, "SerialTrackingFlag": true, "ShippingDocumentsFlag": false, }] }
Get the Resources That Are Required to Fulfill One Work Order Operation
You get the list of the resources that are required to fulfill one work order operation.
Here's a typical application processing flow for the scenarios:
-
Send a REST request to get work order operation details.
You use the values of these attributes that you received in the response payload when you searched for work order operations according to work order:
Attribute
Description
WorkOrderId
Unique value that Oracle Manufacturing Cloud creates when it creates a work order. For example, 300100093180128.
WorkOrderOperationId
Unique value that Oracle Manufacturing Cloud creates when it creates a work order operation. For example, 300100093180130.
-
The response payload includes details that describe the results of the request.
-
Your partner application extracts values for these attributes from the response payload and displays them in the client.
Note:
One work order operation can contain one or more resources.
Attribute
Description
ResourceSequenceNumber
Unique number that identifies the sequence of the resource in the work order operation. For example, 10.
ResourceCode
Code that uniquely identifies the resource. For example, RT-A-R9.
ResourceDescription
Description of the Resource. For example, Test Workbench.
ResourceType
Type of resource. For example, EQUIPMENT or LABOR.
UsageRate
Resource usage required to make one unit of the assembly.
BasisType
Contains 1 or 2. 1: the resource consumption is fixed. It does not change according to work order quantity. 2: the resource consumption is not fixed. It might change according to work order quantity.
RequiredUsage
Resource usage that the plant requires to make the work order quantity. The application calculates this value depending on whether the Basis type is fixed or variable. Fixed: the Required Usage equals the Usage
UnitOfMeasure
Unit of measure of the resource usage. For example, HR.
AssignedUnits
Number of resource units the application assigns to perform the operation. For example, 1.
Example URL
Use this resource URL format to get operation details for work order M1-1208
GET
curl -u username:password "https://servername/fscmRestApi/resources/version/workOrders/300100093180128/child/WorkOrderOperation/300100093180129/child/WorkOrderOperationResource"
Example Response
Here's an example of the response body in JSON format.
Note:
This payload references two resources.
{ "items": [ { "OrganizationId": 207, "ResourceSequenceNumber": 10, "WorkOrderOperationResourceId": 300100071643550, "ResourceId": 300100071643444, "ResourceCode": "RT-A-R9", "ResourceName": "RT-A-R9", "ResourceDescription": "RT-A-R9", "ResourceType": "EQUIPMENT", "WorkAreaId": 300100071643435, "WorkAreaName": "RT-A-WA1", "WorkAreaCode": "RT-A-WA1", "WorkAreaDescription": "RT-A-WA1", "WorkCenterId": 300100071643453, "WorkCenterName": "RT-A-WC1", "WorkCenterCode": "RT-A-WC1", "WorkCenterDescription": "RT-A-WC1", "WorkOrderId": 300100093180128, "WorkOrderOperationId": 300100093180129, "OperationSequenceNumber": 10, "OperationName": "OP10", "StandardOperationId": null, "StandardOperationCode": null, "PrincipalFlag": false, "UsageRate": 5, "BasisType": "1", "RequiredUsage": 75, "InverseRequiredUsage": 0.2, "UnitOfMeasure": "HRS", "ChargeType": "MANUAL", "AssignedUnits": 1, "PlannedStartDate": "2016-10-27T04:38:00-07:00", "PlannedCompletionDate": "2016-10-27T04:38:00-07:00", "ResourceActivityCode": null, "ScheduledFlag": false, "PhantomFlag": false, "ActualResourceUsage": null, } { "OrganizationId": 207, "ResourceSequenceNumber": 20, "WorkOrderOperationResourceId": 300100071643551, "ResourceId": 300100071643445, "ResourceCode": "RT-A-R10", "ResourceName": "RT-A-R10", "ResourceDescription": "RT-A-R10", "ResourceType": "LABOR", "WorkAreaId": 300100071643435, "WorkAreaName": "RT-A-WA1", "WorkAreaCode": "RT-A-WA1", "WorkAreaDescription": "RT-A-WA1", "WorkCenterId": 300100071643453, "WorkCenterName": "RT-A-WC1", "WorkCenterCode": "RT-A-WC1", "WorkCenterDescription": "RT-A-WC1", "WorkOrderId": 300100093180128, "WorkOrderOperationId": 300100093180129, "OperationSequenceNumber": 10, "OperationName": "OP10", "StandardOperationId": null, "StandardOperationCode": null, "PrincipalFlag": false, "UsageRate": 5.98802, "BasisType": "1", "RequiredUsage": 89.8203, "InverseRequiredUsage": 0.16700011022007274, "UnitOfMeasure": "HRS", "ChargeType": "MANUAL", "AssignedUnits": 1, "PlannedStartDate": "2016-10-27T04:38:00-07:00", "PlannedCompletionDate": "2016-10-27T04:38:00-07:00", "ResourceActivityCode": null, "ScheduledFlag": false, "PhantomFlag": false, "ActualResourceUsage": null, } ] }
Post the Resource Consumption for One Work Order Operation
The operator on the shop floor uses the client to record the hours consumed for one RT-A-R9 resource, and then posts the resource transaction in Oracle Manufacturing Cloud.
Here's a typical application processing flow for the scenarios:
-
The client captures the resource usage for the work order operation. Send a REST request to post the resource usage for the work order operation.
-
The response payload includes details that describe the results of the request.
-
Your partner application extracts values for these attributes from the response payload and displays them in the client. NOTE: Some payloads contain only a few attributes. Others might contain several hundred attributes. This table includes only some of the attributes from the resource transaction resource response payload.
Attribute
Description
WoResourceTransactionId
Value that uniquely identifies the material transaction number. For example, 23826.
ErrorsExistFlag
A flag that indicates whether the transaction succeeded or failed.
Example URL
Use this resource URL format.
POST
curl -u username:password -X POST -H "Content-Type:application/vnd.oracle.adf.resourceitem+json" -d 'request payload' "https://servername/fscmRestApi/resources/version/resourceTransactions"
Example Request
Here's an example of the request body in JSON format to post one resource transaction in plant M1, for work order M1-1208, operation sequence 10, resource sequence 10, and resource RT-A-R9
{ "SourceSystemCode" : "Client", "SourceSystemType" : "EXTERNAL", "ResourceTransactionDetail" : [ { "OrganizationCode" : "M1", "OrganizationId" : 207, "WorkOrderNumber":"M1-1208", "OperationSeqNumber":"10", "ResourceSeqNumber":"10", "ResourceCode":" RT-A-R9", "TransactionQuantity":"1", "TransactionUomCode":"HRS", "TransactionDate" : "2016-10-31T23:16:22-07:00", "TransactionTypeCode":"RESOURCE_CHARGE", } ] }
Example Response
Here's an example of the response body in JSON format.
{ "SourceSystemType" : "EXTERNAL", "SourceSystemCode" : "Client", "ErrorsExistFlag" : "false", "ResourceTransactionDetail" : [ { "WoResourceTransactionId" : 23826, "SourceSystemCode" : null, "OrganizationCode" : "M1", "WorkOrderNumber" : "M1-1208", "OperationSequenceNumber" : 10, "ResourceSequenceNumber" : 10, "ResourceCode" : "RT-A-R9", "ResourceActivityCode" : null, "TransactionTypeCode" : "RESOURCE_CHARGE", "TransactionQuantity" : 1, "TransactionUnitOfMeasure" : "HRS", "TransactionDate" : "2016-10-31T23:16:22-07:00", "SourceLineReference" : null, "SourceHeaderReference" : null, "SourceLineReferenceId" : null, "SourceHeaderReferenceId" : null, "ErrorMessages" : "", "ErrorMessageNames" : "", }