Pause Orchestration Processes for Time

Set up a pause task to temporarily stop an orchestration process from running until date and time elapses.

rule that pauses according to time

Note

  • Use the Assign action to set the waitDateTime variable.

  • Don't specify a duration for waitDateTime. For example, if you specify a duration of 5 hours, then the rule might convert it to a date and time that already happened, and the rule will never pause the task because the date that it uses to determine whether to pause already happened. Instead, specify a date and time.

    For example, Header.getAdjustedDate(null, 1) specifies to get the current system date, and then wait for current system date plus one day before releasing the pause.

    Use dateTime for the first parameter in the function. For example, to wait until two days before the schedule ship date, use Header.getAdjustedDate(FLine.ScheduleShipDate,-2).

  • reevaluateFlag evaluates the conditions in the IF part of the rule to determine whether the condition changed. Set reevaluateFlag to Y only if you must periodically evaluate your rule. If you set it to Y, then carefully consider the interval you use for waitDateTime. For example, if you set getAdjustedDate to refresh every minute, then reevaluateFlag will cause the rule to run the IF statement every minute until it evaluates the condition in the IF statement to True.

For details, see Guidelines for Pausing Orchestration Processes.

Pause Lines Before You Reserve Them

Here's an example where you pause fulfillment lines that Order Management has scheduled, but where the schedule ship date isn't the same as the requested ship date. Assume you set up Global Order Promising so it promises according to on-hand quantity but you don't want to reserve lines when on-hand quantity isn't yet available for them.

Here's the code that determines whether to pause.

Here's the code that determines whether to pause.

Note

Code

What it Means

Fline.requestShipDate.date less than Fline.scheduleShipDate.date

If the requestShipDate is less than the scheduleShipDate on the fulfillment line, then continue to pause.

Fline.requestArrivalDate.date less than Fline.scheduleArrivalDate.date

If the requestArrivalDate is less than the scheduleArrivalDate on the fulfillment line, then continue to pause.

You can also add a condition to handle the situation where the warehouse is in a different time zone, which might result in the schedule ship date happening one day later than the requested ship date.