Pause Orchestration Processes for Dependencies
Set up a pause task to temporarily stop an orchestration process from running until a dependency resolves.
Wait to Ship All Lines Before Invoicing
The dependency in this example is to wait for all lines to ship before continuing to the invoicing step.

Note
-
The Pause step references the pause task. The Pause step resides between the Shipping step and the Invoicing step in the orchestration process.
-
If no order line meets any condition in the IF statement, then all order lines have shipped, the rule releases the pause, and the flow continues to the next orchestration process step.
-
For brevity, this screen print doesn't assign the result from the rules dictionary and to the header, but you must assign that result. For details, see the Assign the Result subtopic in Guidelines for Pausing Orchestration Processes.
Here's your code.
Code |
Description |
---|---|
|
Declare the Header variable, then load values into Header from object DOOHeader of method DooSeededOrchestrationRules. DOOHeader contains order header attributes and their values. |
|
Ask a question. Does the sales order include at least one order line that order fulfillment hasn't shipped, and that order fulfillment can ship? |
|
Declare variable Fline (order line), then load values into Fline from object DOOFline of method DooSeededOrchestrationRules. DOOFline (Distributed Order Orchestration Fulfillment Line) contains order line attributes and their values. |
|
Examine all order lines in the sales order, including lines that the orchestration process isn't currently processing. A dependency might exist between the order line that the orchestration process is currently processing, and other order lines in the sales order, so you must inspect all of them. |
|
If the shippableFlag attribute on the order line is Y, then proceed. Make sure each order line is shippable. Some items can't ship, such as a subscription. If an order line contains a subscription, then shippableFlag is N for the line, the rule ignores the line, and moves to the next line. |
|
If the actualShipDate attribute on the order line doesn't contain a value, then it indicates the order line hasn't shipped, and the rule must pause the orchestration process. |
|
If the orderedQty attribute on the order line is 0, then it indicates the order line is a canceled line, the rule ignores the line, and moves to the next line. |
|
Use SAC_SYSTEM_EVENT_IPC_PAUSE, where IPC means Interprocess Communication. The rule evaluates this type of pause each time a task finishes for each order line. |
|
Evaluate the condition each time an orchestration process step finishes. In this example, the Shipping step ships the order lines, so the rule must evaluate after the Shipping step finishes for each order line to determine whether order fulfillment shipped all order lines. |