Task queue updates
When a task queue-based agent is prevented from processing a transaction with dependencies, the date when the order is ready to process is calculated.
Upon completing the transaction, the dependencies are examined to see if there are any lines waiting on the completion of this transaction. The task queue dates for dependent transactions are then re-calculated. Additionally, when a change is made to the order date, ship date, or delivery date, dependencies are re-evaluated similarly.
An example usage scenario for the next available date calculation is discussed below.
The agents for the transactions are updated to apply transaction dependencies to the order lines before processing. If the order lines are not processed due to dependencies, the agent updates the task queue date.
Next available date calculation
The next available date is calculated to identify when the order is ready to be processed. The following example provides the method of calculation for the next available date.
For example, an order has two order lines. The second order line cannot be scheduled until 24 hours after the first order line has completed the SHIP_ORDER transaction.
Until the SHIP_ORDER transaction on the first order line is completed, the earliest available date for scheduling that order line is set to:
sysdate + 24h.
When the SHIP_ORDER transaction on the first order line completes, the task queue date for scheduling the second order line is set to:
sysdate + 24h.
The next task queue date for the entire order is determined by computing the earliest available date on each of the remaining dependencies. The lower boundary of each line’s maximum is the date, which is set. For example:
- Line 1 – dependency 1 - earliest date = sysdate + 5h
- Line 1 – dependency 2 - earliest date = sysdate + 48h
- Line 2 – dependency 1 - earliest date = sysdate + 12h
The earliest date for Line 1 is the maximum of (sysdate + 5h) and (sysdate + 48h) or sysdate + 48h. However, for the entire order the minimum across the lines is calculated as:
Line 2’s sysdate + 12h.
Finally, if the transaction had pushed the task queue date out, the minimum of this date and the task queue date of the transaction is used. For example, if one line cannot be scheduled because of a dependency, and the other line is backordered. If the backorder relog interval is less than the calculated time for the remaining dependencies, the backorder relog interval is used instead.