Rework Work Orders

You can use a REST API to rework a work order. For example, assume the following scenario:

Let's discuss these scenarios:

  1. You develop a solution that allows your customer to use a mobile client to connect to your partner application. This application allows your customer, a discrete manufacturer, to create a work order that reworks an assembly.
  2. Your application captures the rework work order details, and then posts them as rework work orders in Oracle Manufacturing Cloud.
  3. An application that runs on the client captures the organization Id, inventory item Id, work definition Id, supply subinventory, and supply locator.
  4. The application that runs on the client calls a REST API to create the rework work order in Oracle Manufacturing Cloud.

Here's a typical application processing flow for the scenarios:

  1. You send a REST API request from the client to the server.

  2. The response payload includes details that describe the results of the request.

  3. Your partner application extracts the values for the following attributes from the response payload, and then displays them in the client. This table lists only a few of the many attributes that the work orders resource contains.

    Attribute

    Description

    WorkOrderId

    Value that uniquely identifies the work order. For example, 300100112987720.

    WorkOrderNumber

    Work order number. For example, M1-1554.

Example URL

Use this resource URL format to create a rework work order for an assembly that uses inventory item Id 300100111683779.

POST

curl -u username:password -X POST -H "Content-Type:application/vnd.oracle.adf.resourceitem+json" -d 'request payload' 
"https://servername/fscmRestApi/resources/version/workOrders"

Example Request

Here's an example of the request body in JSON format.

{
	"WorkOrderType":"REWORK", 
	"OrganizationId":207, 
	"InventoryItemId":300100111683779,
	"PlannedStartQuantity":4, 
	"PlannedStartDate":"2017-03-16T08:30:00-05:00",
	"WorkDefinitionId":300100112172570, 
	"ExplosionFlag":true, 
	"WorkOrderAssemblyComponent":
	[
	{
		"SupplySubinventory":"ABCSUB01", 
		"SupplyLocatorId":3134 
	}
	]
}

Example Response

Here's an example of the response body in JSON format.

{
	"OrganizationId" : 207,
	"OrganizationCode" : null,
	"OrganizationName" : null,
	"WorkOrderId" : 300100112987720,
	"WorkOrderNumber" : "M1-1554",
	"WorkOrderDescription" : null,
	"WorkMethodId" : 300100070832877,
	"WorkMethodCode" : null,
	"WorkOrderType" : "REWORK",
	"WorkOrderTypeDescription" : null,
	"WorkOrderSubType" : null,
	"WorkOrderSubTypeDescription" : null,
	"InventoryItemId" : 300100111683779,
	"ItemNumber" : "JW-MFG-PROD1",
	"Description" : "JW-MFG-PROD1",
	"ItemRevision" : "A",
	"ItemStructureName" : null,
	"TransformFromItemId" : null,
	"TransformFromItemNumber" : null,
	"WorkDefinitionAsOfDate" : "2017-08-08T09:22:29+00:00",
	"WorkDefinitionId" : 300100112172570,
	"WorkDefinitionVersionId" : 300100112172571,
	"WorkDefinitionVersionNumber" : null,
	"WorkDefinitionCode" : null,
	"WorkDefinitionName" : null,
	"WorkOrderPriority" : null,
	"WorkOrderStatusId" : 10005,
	"WorkOrderStatusName" : "Unreleased",
	"WorkOrderStatusCode" : "ORA_UNRELEASED",
	"WorkOrderSystemStatusCode" : "UNRELEASED",
	"SchedulingMethod" : "DEFAULT_SCHEDULER",
	"PlannedStartQuantity" : 4,
	"CompletedQuantity" : null,
	"ScrappedQuantity" : null,
	"RejectedQuantity" : null,
	"NettableSupplyQuantityOverride" : null,
	"UOMCode" : "Ea",
	"UnitOfMeasure" : "Each",
	"FirmPlannedFlag" : false,
	"PlannedStartDate" : "2017-03-16T13:30:00+00:00",
	"PlannedCompletionDate" : "2017-03-17T05:30:00+00:00",
	"ActualStartDate" : null,
	"ActualCompletionDate" : null,
	"ReleasedDate" : null,
	"ClosedDate" : null,
	"CanceledDate" : null,
	"DelayStatus" : 1,
	"WorkOrderDate" : null,
	"CanceledReason" : null,
	"OvercomplToleranceType" : null,
	"OvercomplToleranceValue" : null,
	"OvercomplToleranceTypeDescription" : null,
	"SupplyType" : "7",
	"SupplyTypeDescription" : null,
	"CompletionSubinventoryCode" : "Stores",
	"CompletionLocatorId" : null,
	"CompletionLocator" : null,
	"SerialTrackingFlag" : false,
	"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,
	"ExplosionFlag" : true,
	"WorkOrderAssemblyComponent" : [ {
		"OrganizationId" : 207,
		"WorkOrderId" : 300100112987720,
		"WoOperationId" : 300100112987735,
		"OperationSequenceNumber" : null,
		"OperationName" : null,
		"WoOperationMaterialId" : 300100112987740,
		"InventoryItemId" : 300100111683779,
		"ItemNumber" : "JW-MFG-PROD1",
		"Quantity" : 4,
		"UnitOfMeasure" : null,
		"SupplySubinventory" : "ABCSUB01",
		"SupplyLocatorId" : 3134,
		"SupplyLocator" : null,
		"IssuedQuantity" : null,
		"links" : [ {
			"rel" : "self",
			"href" : "https://servername/fscmRestApi/resources/version/workOrders/300100112987720/child/WorkOrderAssemblyComponent/300100112987740",
			"name" : "WorkOrderAssemblyComponent",
			"kind" : "item",
			"properties" : {
				"changeIndicator" : "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000178"
			}
		}, {
			"rel" : "canonical",
			"href" : "https://servername/fscmRestApi/resources/version/workOrders/300100112987720/child/WorkOrderAssemblyComponent/300100112987740",
			"name" : "WorkOrderAssemblyComponent",
			"kind" : "item"
		}, {
			"rel" : "parent",
			"href" : "https://servername/fscmRestApi/resources/version/workOrders/300100112987720",
			"name" : "workOrders",
			"kind" : "item"
		}, {
			"rel" : "child",
			"href" : "https://servername/fscmRestApi/resources/version/workOrders/300100112987720/child/WorkOrderAssemblyComponent/300100112987740/child/WorkOrderAssemblyComponentSerial",
			"name" : "WorkOrderAssemblyComponentSerial",
			"kind" : "collection"
		}, {
			"rel" : "child",
			"href" : "https://servername/fscmRestApi/resources/version/workOrders/300100112987720/child/WorkOrderAssemblyComponent/300100112987740/child/WorkOrderAssemblyComponentLot",
			"name" : "WorkOrderAssemblyComponentLot",
			"kind" : "collection"
		} ]
	} ],
	"links" : [ {
		"rel" : "self",
		"href" : "https://servername/fscmRestApi/resources/version/workOrders/300100112987720",
		"name" : "workOrders",
		"kind" : "item",
		"properties" : {
			"changeIndicator" : "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000178"
		}
	}, {
		"rel" : "canonical",
		"href" : "https://servername/fscmRestApi/resources/version/workOrders/300100112987720",
		"name" : "workOrders",
		"kind" : "item"
	}, {
		"rel" : "child",
		"href" : "https://servername/fscmRestApi/resources/version/workOrders/300100112987720/child/WorkOrderResource",
		"name" : "WorkOrderResource",
		"kind" : "collection"
	}, {
		"rel" : "child",
		"href" : "https://servername/fscmRestApi/resources/version/workOrders/300100112987720/child/WorkOrderAttachment",
		"name" : "WorkOrderAttachment",
		"kind" : "collection"
	}, {
		"rel" : "child",
		"href" : "https://servername/fscmRestApi/resources/version/workOrders/300100112987720/child/WorkOrderStatus",
		"name" : "WorkOrderStatus",
		"kind" : "collection"
	}, {
		"rel" : "child",
		"href" : "https://servername/fscmRestApi/resources/version/workOrders/300100112987720/child/WorkOrderOperation",
		"name" : "WorkOrderOperation",
		"kind" : "collection"
	}, {
		"rel" : "child",
		"href" : "https://servername/fscmRestApi/resources/version/workOrders/300100112987720/child/WorkOrderAssemblyComponent",
		"name" : "WorkOrderAssemblyComponent",
		"kind" : "collection"
	}, {
		"rel" : "child",
		"href" : "https://servername/fscmRestApi/resources/version/workOrders/300100112987720/child/WorkOrderReservation",
		"name" : "WorkOrderReservation",
		"kind" : "collection"
	}, {
		"rel" : "child",
		"href" : "https://servername/fscmRestApi/resources/version/workOrders/300100112987720/child/WorkOrderExceptionCount",
		"name" : "WorkOrderExceptionCount",
		"kind" : "collection"
	}, {
		"rel" : "child",
		"href" : "https://servername/fscmRestApi/resources/version/workOrders/300100112987720/child/WorkOrderSerialNumber",
		"name" : "WorkOrderSerialNumber",
		"kind" : "collection"
	}, {
		"rel" : "child",
		"href" : "https://servername/fscmRestApi/resources/version/workOrders/300100112987720/child/WorkOrderMaterial",
		"name" : "WorkOrderMaterial",
		"kind" : "collection"
	}, {
		"rel" : "child",
		"href" : "https://servername/fscmRestApi/resources/version/workOrders/300100112987720/child/WorkOrderActiveOperation",
		"name" : "WorkOrderActiveOperation",
		"kind" : "collection"
	}, {
		"rel" : "child",
		"href" : "https://servername/fscmRestApi/resources/version/workOrders/300100112987720/child/WorkOrderDFF",
		"name" : "WorkOrderDFF",
		"kind" : "collection"
	} ]
}