REASSIGN_ORDER_RELEASE.0001
This is an asynchronous service, modeled as an Externally Triggered Transaction. This transaction shares the JMS queue with the RequestForReassignOrderRelease service synchronous service, which accepts the reassign order release request from a user and writes a message to the queue. When such a message reaches the queue, this transaction is triggered and the user request becomes the criteria.
How does the transaction work?
REASSIGN_ORDER_RELEASE.0001 transaction performs two operations:
Get and Execute.- In the
Getoperation, the transaction reads the message added to the queue by theRequestForReassignOrderReleaseservice, identifies the matching order release(s) or shipment(s) and creates messages for the execute operation. When more than oneOrderReleaseis identified from the request, it iterates over the order releases and creates a message with theOrderReleaseKey(Primary Key of theOrderRelease) for each ofOrderReleaseand writes them to the same queue. Similarly, if multiple shipments are in the request, it iterates over each shipment and creates a message with theShipmentKey(Primary Key of the Shipment) for each of the shipment and writes those messages to the queue. Each of these messages have the necessary specifications to backorder theOrderReleaseor Shipment. Additionally, it adds a short-term inventory control specification in every message so that the item(s) being backordered are not assigned to the same node on reschedule.A sample execute message to backorder a release is as follows:
Similarly, a sample execute message to cancel the shipment and backorder the corresponding release is as follows:<OrderRelease Action="BACKORDER" PutInventoryOnHoldOnBackorder="Y" OrderReleaseKey="Key1"/><Shipment Action="Cancel" BackOrderRemovedQuantity="Y" PutInventoryOnHoldOnBackOrderRemovedQuantity="Y" ShipmentKey="Key2"/> - In the
Executeoperation, the transaction processes each of the messages independently in a multi-threaded fashion and backorders the correspondingOrderRelease. It adds a short-term inventory control (self-expiring) and the previous node is not suggested if re-scheduling occurs before it's expiry. If aShipmentis passed in the reassign request, it is cancelled first, and the corresponding releases are backordered with the short-term inventory control. Once an order or order line is backordered, it is processed by the regular Schedule and Release agents on the next trigger and the order line is scheduled and released to another node.
By default, the duration of the short-term inventory control is derived from the default value of
the "Inventory Will Be On Hold For A Minimum Of <number of hours> Hours" and
"Daily Inventory Synchronization Time" rules. The default values of these rules are
0 and 00:00 hours respectively. This ensures that an
item is not sourced from the same node for a reassign request until the end of the day.
If you enable the "Put Inventory On Hold For Sourcing On Backorder From Node"
rule, then you must configure the "Inventory Will Be On Hold For A Minimum Of <number of
hours> Hours" and "Daily Inventory Synchronization Time" values based on
when you want a node to be available for sourcing items backordered from the node.
To calculate the time until which a node is unavailable for sourcing, refer the following
example:
Consider Put Inventory On Hold For Sourcing On Backorder From Node =
3 and Daily Inventory Synchronization Time = 17:00:00. When the reassign
request is made at 02/02/2019
13:00:00, the node will be unavailable for sourcing until 02/02/2019
17:00:00.
Similarly, when the reassign request is made at 02/02/2019
15:00:00, the node will be unavailable for sourcing items backordered from the node until
02/03/2019 17:00:00.
Put Inventory On Hold For Sourcing On Backorder From Node
rule is not enabled. However, if you enable the rule, you must set appropriate values for the
Put Inventory On Hold For Sourcing On Backorder From Node and Daily
Inventory Synchronization Time. These values would be considered by the application to
determine the time when a node should be made available for sourcing.Once you enable the Put Inventory On Hold For Sourcing On Backorder From Node
rule, disabling the rule causes an item to be sourced from the same node from which it was
backordered earlier.
For more information about the inventory rules, see Defining additional inventory rules
Configuration
To reassign order releases, configure the following order modification rules:- Allow the
Backordermodification type at theReleaseandReleaseLinelevel for theReleasedandAwaiting Shipment Consolidationstatuses.
- Allow the
DeleteShipmentmodification type at theShipmentlevel for theShipmentCreatedstatus. - Allow the
RemoveLinemodification type at theShipmentlevel for theShipmentCreatedstatus.
DEFAULT, then you must manually set these
rules for your Enterprise in the Applications Manager. If your Enterprise inherits from
DEFAULT, check whether the rules are allowed. If not, you must manually set the
rules.If Product is Backordered, retry scheduling after this time (Hours): Enter the appropriate value for this rule. For more information, see Creating a scheduling rule.
Put Inventory On Hold For Sourcing On Backorder From
Node rule, then set the following values appropriately for the optimal use of the node from
where order lines are backordered.Inventory Will Be On Hold For A Minimum Of <number of hours> HoursDaily Inventory Synchronization Time
Once you enable the Put Inventory On Hold For Sourcing On Backorder From Node
rule, disabling the rule causes an item to be sourced from the same node from which it was
backordered earlier.
Events raised
ON_FAILURE event in case of any failure in the
asynchronous processing. The maximum data that can be published by this event is as
follows:
<ReassignOrderRelease DocumentType="" EnterpriseCode="" ErrorCode="" ErrorDescription="" EventId="" ModificationLevel=""
ModificationType="" OrderHeaderKey="" OrderLineKey="" OrderNo="" OrderReleaseKey="" PrimeLineNo="" ProcessType=""
Reason="" ReferenceName="" ReferenceValue="" ReleaseNo="" RequestedByUser="" SellerOrganizationCode="" ShipNode=""
ShipNodeKey="" ShipmentKey="" ShipmentNo="" Status="" SubLineNo="" TransactionId="">
<!--<StackTrace/> -->
</ReassignOrderRelease>This
XML is populated with the various exceptions from the transaction and it is template controlled. An
exception will have information about the current error and only those attributes are present in the
event output. The StackTrace element is commented out in the application-provided
template but can be customized to include it. There is no ON_SUCCESS event for this
transaction. The existing events ORDER_RELEASE_CHANGE.ON_BACKORDER and
ORDER_RELEASE_CHANGE.ON_SUCCESS can be utilized to handle the success operation.Handling exceptions
- The order releases or shipments which have failed reassignment will continue to be associated
with the Node and appear in the BUC Node details console. But the user may not know the reason for
the failure. In case of exceptions, the
REASSIGN_ORDER_RELEASE.0001transaction logs them into theYFS_INBOXtable withExceptionType=REASSIGN_FAILURE. Additionally, another exception is logged by the agent framework withExceptionType=AGENTEXCEPTION. This is a consolidated exception that shows the count of each type of error where as theREASSIGN_FAILUREexception is logged for each failure.For example, consider that the reassign request for
OrderReleaseKey=Key1is attempted twice by a user and both attempts failed with the same error. It results in oneAGENTEXCEPTIONexception withRaised Count=2and twoREASSIGN_FAILUREexceptions, one for each attempt. - The exceptions raised by the
REASSIGN_ORDER_RELEASE.0001transaction are notre-processible(ErrorType=NONREPROCESS). These exceptions have a default expiration time (7 days). All the exceptions are recorded against the original user (Createuserid/Modifyuserid) who requested the reassignment. The reason for failure (errorCode) is recorded against theError_Reasoncolumn of theYFS_INBOXtable. -
The input to the
getExceptionListAPI to get exceptions of theAGENTEXCEPTIONtype is as follows:<Inbox ExceptionType="AGENTEXCEPTION" ApiName="REASSIGN_ORDER_RELEASE.0001" Createuserid="<actual user id>"> <OrderBy> <Attribute Name="InboxKey"/> </OrderBy> </Inbox>The input to thegetExceptionListAPI to get the exceptions of theREASSIGN_FAILUREtype is as follows:<Inbox ExceptionType="REASSIGN_FAILURE" ApiName="REASSIGN_ORDER_RELEASE.0001" Createuserid="<actual user id>"> <OrderBy> <Attribute Name="InboxKey"/> </OrderBy> </Inbox>The input to match exception for anOrder,OrderLine,OrderRelease, orShipmentis as follows:<Inbox ExceptionType="REASSIGN_FAILURE"> <InboxReferencesList> <InboxReferences Name="" Value=""/> </InboxReferencesList> <OrderBy> <Attribute Name="InboxKey"/> </OrderBy> </Inbox>Here, the
Nameattribute in theInboxReferencescould beOrderReleaseKey,ShipmentKey,OrderHeaderKey,OrderLineKey,OrderNoorShipmentNoandValueis the value of these attributes. If multiple attributes must be queried, then pass<InboxReferencesList ConsiderAllChildCriteria="Y">and add<InboxReferences Name="" Value=""/>for each of the query attribute.