Pause for Shipping

Have a look at some examples that you can use to pause an orchestration process while shipping.

For these examples:

  • Add your pause task so it happens on a step that happens after the shipping task and before the invoicing task in your orchestration process.

  • Use the same Then statement for all examples, except where noted.

Pause Until A Task Finishes for All Lines

Assume you must wait until Shipping delivers all lines of the sales order before you send the sales order to invoicing, and then send all lines together to invoicing. So you create an orchestration process that has these steps. You use step 5 to add the pause.

Step

Task Type

Task Name

1

Schedule

Schedule

2

Reservation

Reserve

3

Shipment

Ship Goods

4

Pause

Wait for Delivery

5

Pause

Wait for Consolidated Billing

6

Invoice

Invoice

Here's the pause rule that you add on step 5.

Pause All Lines Until Shipping Delivers All of Them

Note

Code

Description

At least one

Use this test to determine whether at least one fulfillment line in the sales order hasn't shipped. It asks the question.

  • Is there any order line in the sales order that's still on the Wait for Delivery task?

If an order line is still doing the Wait for Delivery task, then it means there's at least one order line that Shipping hasn't delivered, and we must continue to pause before proceeding to the next orchestration process step.

Wait for Delivery is an example value. You can use whatever type of pause you need while waiting for an action to happen, then move to the next the pause while you wait for billing.

taskInstance is a DOOSeededOrchestrationRules.DOOTaskInstance

Declare the taskInstance variable, then store attributes of the task instance that the orchestration process is currently processing into this variable.

DOOTaskInstance gets all the task instances for all instances of the orchestration process that are currently running for all order lines on the sales order.

For example, if three task instances are currently running for three order lines, then DOOTaskInstance gets all three task instances.

taskInstance.taskName equals ignore case "Wait for Delivery"

taskName identifies the value that you enter for the Task Name attribute on the orchestration process step. In this example, you entered Wait for Delivery as the Task Name on step 4.

Step 4 is the pause step that determines whether any order lines are still waiting for delivery.

taskInstance.actualCompletionDate is null

Examine the value of the actualCompletionDate attribute in the taskInstance variable. If it doesn't contain a value, then it means Shipping hasn't delivered the item, and we must continue to pause.

Fulfillment enters a value in actualCompletionDate to indicate when Shipping delivered the item.

Header is a DOOSeededOrchestrationRules.DOOHeader

Declare the Header variable, then store attributes of the order header that the orchestration process is currently processing into this variable.

Assign new DooSeededOrchestrationRules.SacResult SAC = new DooSeededOrchestrationRules.SacResult()

Create a new variable named SAC and set it to the SacResult type in the DooSeededOrchestrationRules method.

Assign Header.sacResult = SAC

Set the value of the sacResult object on the order header to the value that SAC contains.

Assign Header.sacResult.sacType = DooSeededOrchestrationRules.SacResult.SAC_TYPE_EVENT

Pause the orchestration process until an interprocess communication event happens.

Assign Header.sacResult.eventName = DooSeededOrchestrationRules.SacResult.SAC_SYSTEM_EVENT_IPC_PAUSE

Use an interprocess communication (IPC) to pause according to an event across orchestration processes. Use it to evaluate the pause every time any task finishes for any line in the sales order.

Assign Header.sacResult.reevaluateFlag = "Y"

Yes, we want to reevaluate the pause.

For brevity, the screen prints in this topic don'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.

Pause Nonshippable Lines Until Shipping Ships All Shippable Lines

Here's what the rule does.

  • Pause the nonshippable lines in a sales order until Shipping finishes shipping all shippable lines in the order.

  • Automatically release the pause for the nonshippable lines, then proceed to the next step in the orchestration process.

    A subsequent step in the orchestration process can now send all order lines of the sales order to invoicing together.

Add your pause task after the shipping task and before the invoicing task in your orchestration process. For example, orchestration waits until Shipping ships all the sales order's shippable lines before proceeding to invoicing.

Pause Nonshippable Lines Until Shipping Ships All Shippable Lines
the then statement of a pause task that you can use as a guideline

Note

Code

Description

At least one

Use this test to determine whether at least one fulfillment line in the sales order hasn't shipped. It asks the question.

  • Is there any shippable line in the sales order that has an actual ship date that's empty?

If the actual ship date is empty, it means there's at least one shippable line that hasn't shipped, and we must continue to pause before proceeding to the next orchestration process step.

As an alternative, use There is no case where to pause nonshippable lines until Shipping ships at least one shippable line.

FLine is a DOOSeededOrchestrationRules.DOOFLine

Declare the FLine variable, then store attributes of the fulfillment line that the orchestration process is currently processing into this variable.

header.allFLinesInTheOrder RL.contains FLine

Declare allFLinesInTheOrder into the rules language (RL) dictionary, then set the value of allFLinesInTheOrder to the value that FLine contains.

This condition makes sure allFLinesInTheOrder references a fulfillment line that the orchestration process is processing. It also makes sure you correctly declare the variable into the dictionary.

You use it to examine all lines in the sales order, not only the line the current orchestration process instance is processing.

FLine.shippableFlag is "Y"

We are only looking at fulfillment lines that are shippable.

FLine.actualShipDate is null

Skip lines that don't have an actual ship date.

FLine.orderedQty isn't 0

Skip lines that have a zero quantity.

Assign new DooSeededOrchestrationRules.SacResult SAC = new DooSeededOrchestrationRules.SacResult()

Create a new variable named SAC and set it to the SacResult type in the DooSeededOrchestrationRules method.

Assign Header.sacResult = SAC

Set the value of the sacResult object on the order header to the value that SAC contains.

Assign Header.sacResult.sacType = DooSeededOrchestrationRules.SacResult.SAC_TYPE_EVENT

Pause the orchestration process until an interprocess communication event happens.

Assign Header.sacResult.eventName = DooSeededOrchestrationRules.SacResult.SAC_SYSTEM_EVENT_IPC_PAUSE

Use an interprocess communication (IPC) to pause according to an event across orchestration processes. Use it to evaluate the pause every time any task finishes for any line in the sales order.

Assign Header.sacResult.reevaluateFlag = "Y"

Yes, we want to reevaluate.

Pause Nonshippable Lines Until Shipping Ships At Least One Shippable Line

Here's what the rule does.

  • Pause nonshippable lines until Shipping ships at least one of the shippable lines in the sales order.

  • Send all nonshippable lines to invoicing as soon Shipping ships the first shippable line.

  • If the sales order doesn't have any shippable lines, then proceed immediately to the next orchestration process step. There's no need to pause if no lines are shippable.

Pause Nonshippable Lines Until Shipping Ships At Least One Shippable Line
the then statement of a pause task that you can use as a guideline

Note

Code

Description

At least one

Use this test to determine whether at least one fulfillment line in the sales order is shippable.

ShippableFLine is a DOOSeededOrchestrationRules.DOOFLine

Declare the ShippableFLine variable, then store attributes of the fulfillment line that the orchestration process is currently processing into this variable.

header.allFLinesInTheOrder RL.contains ShippableFLine

Declare allFLinesInTheOrder into the rules language (RL) dictionary, then set the value of allFLinesInTheOrder to the value that ShippableFLine contains.

This condition makes sure allFLinesInTheOrder references a fulfillment line that the orchestration process is processing. It also makes sure you correctly declare the variable into the dictionary.

You use it to examine all lines in the sales order, not only the line the current orchestration process instance is processing.

ShippableFLine.shippableFlag is "Y"

We are only looking at fulfillment lines that are shippable.

None

If none of the lines are shippable, proceed immediately to next orchestration process step.

You create a separate variable, NotShippableFLine, for the None clause so its independent of the ShippableFLine variable from the At Lease One clause.

NotShippableFLine is a DooSeededOrchestrationRules.DOOFLine

Declare NotShippableFLine into the rules language (RL) dictionary.

Header.allFLinesInTheOrder RL.contains NotShippableFLine

Make sure allFLinesInTheOrder references a fulfillment line that the orchestration process is processing.

Examine all lines in the sales order, not only the line the current orchestration process instance is processing.

NotShippableFLine.shippableFlag is "Y"

We are only looking at fulfillment lines that are shippable.

This statement is in a None clause, which asks the question.

  • If none of the lines contain "Y" for the shippableFlag, then the test evaluates to true.

NotShippableFLine.actualShipDate isn't null

Skip lines that don't have an actual ship date.

NotShippableFLine.orderedQty isn't 0

Skip lines that have a zero quantity.

Send Nonshippable Lines to Invoicing Without Waiting for Shipping to Ship Shippable Lines

Assume you create a pause task that pauses all order lines until shipping has shipped all lines. You submit a sales order, then notice these fulfillment lines.
Item Status
AS54888 Desktop Computer Paused for Invoice
Freight Charge for the AS54888 Paused for Invoice

But you want to send the freight charge to invoicing without waiting for shipping to finish shipping the AS54888. Here's how you can do that.

Add a pause task on the orchestration step that happens after a step that does the shipping task and before the step that does an invoicing task.

add a pause task on the orchestration step that happens after a step that does the shipping task and before the step that does an invoicing task.

where
Code Description
FLine.inventoryItemId.longValue() is 149

The value 149 in the InventoryItemId attribute on the fulfillment line uniquely identifies the AS54888 Desktop Computer.

header.childFLines RL.contains FLine Declare the childFLines attribute into the rules language (RL) dictionary, then set the value of childFLines to the value that FLine contains.
FLine.extendedAmount same or less than 3000 -

Assign new DooSeededOrchestrationRules.SacResult SAC = new DooSeededOrchestrationRules.SacResult()

Create a new variable named SAC and set it to the SacResult type in the DooSeededOrchestrationRules method.

Assign Header.sacResult = SAC

Set the value of the sacResult object on the order header to the value that SAC contains.

assert new DooSeededOrchestrationRules.SacResult ( eventName:"NO FOB" reevaluateFlag = "Y",sacType:DooSeededOrchestrationRules.SacResult.SAC_TYPE_EVENT) -

Send Nonshippable Lines to Invoicing When There Aren't Any Shippable Lines

Pause sending the nonshippable lines to invoicing until shipping ships at least one shippable line, then send the nonshippable lines and the shippable lines to invoicing together, but with a condition.

if the sales order doesn't have any shippable lines, then send the nonshippable lines to invoicing without waiting.

To account for the condition, you add the pause task on an orchestration step that happens after a step that does a shipping task and before a step that does an invoicing task.

Here's what the rule does.

  • Pause nonshippable lines until Inventory Management receives at least one shippable line in the sales orders.

  • Automatically release the paused, nonshippable lines, then proceed to the next orchestration process step.

    The orchestration process can now send the nonshippable lines and the shippable lines on the order to invoicing together.

The orchestration process can now send the nonshippable lines and the shippable lines on the order to invoicing together.

Note

Code

Description

At least one

Use this test to determine whether at least one fulfillment line in the sales order is shippable.

FLineS is a DOOSeededOrchestrationRules.DOOFLine

Declare the FLineS variable, then store attributes of the fulfillment line that the orchestration process is currently processing into this variable.

You can use whatever name you like for the variable. We're using FLineS to distinguish it from the FLine variable that use in other examples in this topic.

header.allFLinesInTheOrder RL.contains FLineS

Declare allFLinesInTheOrder into the rules language (RL) dictionary, then set the value of FLineS to the value that FLineS contains.

This condition makes sure allFLinesInTheOrder references a fulfillment line that the orchestration process is processing. It also makes sure you correctly declare the variable into the dictionary.

You use it to examine all lines in the sales order, not only the line the current orchestration process instance is processing.

FLineS.shippableFlag is "Y"

We are only looking at fulfillment lines that are shippable.

None

If none of the lines are shippable, proceed immediately to the next orchestration process step.

You create a separate variable, FLine, for the None clause so its independent of the FLineS variable from the At Lease One clause.

FLine is a DooSeededOrchestrationRules.DOOFLine

Declare FLine into the rules language (RL) dictionary.

Header.allFLinesInTheOrder RL.contains FLine

Make sure allFLinesInTheOrder references a fulfillment line that the orchestration process is processing.

Examine all lines in the sales order, not only the line the current orchestration process instance is processing.

FLine.actualShipDate isn't null

Skip lines that don't have an actual ship date.

FLine.shippableFlag is "Y"

We are only looking at fulfillment lines that are shippable.

This statement is in a None clause, which asks the question.

  • If none of the lines contain "Y" for the shippableFlag, then the test evaluates to true.

FLine.orderedQty isn't 0

Skip lines that have a zero quantity.

Send Nonshippable Lines and Return Lines to Invoicing

Here's what the rule does.

  • Pause nonshippable lines until Inventory Management receives all shippable lines in the sales orders.

  • Wait for Inventory Management to receive all shippable lines.

  • Automatically release the paused, nonshippable lines, then proceed to the next orchestration process step.

    The orchestration process can now send the nonshippable lines and the return lines on the order to invoicing together.

Send Nonshippable Lines and Return Lines to Invoicing Together
the then statement of a pause task that you can use as a guideline

Note

Code

Description

At least one

Use this test to determine whether at least one fulfillment line in the sales order is shippable and whether fulfillment has successfully returned the line.

FLine is a DOOSeededOrchestrationRules.DOOFLine

Declare the FLine variable, then store attributes of the fulfillment line that the orchestration process is currently processing into this variable.

header.allFLinesInTheOrder RL.contains ShippableFLine

Declare allFLinesInTheOrder into the rules language (RL) dictionary, then set the value of allFLinesInTheOrder to the value that FLine contains.

FLine.shippableFlag is "Y"

We are only looking at fulfillment lines that are shippable.

FLine.rmaDeliveredQty is null

FLine.rmaDeliveredQty is 0

rmaDeliveredQty is the quantity on the return line that fulfillment has delivered to inventory. If it has no value or is zero, then it means fulfillment hasn't successfully returned the line into inventory.

FLine.orderedQty isn't 0

Fulfillment sets orderedQty to zero when it cancels the line. This condition makes sure we only consider lines that aren't canceled.

FLine.CategoryCode is "RETURN"

Only consider return lines. Skip lines that aren't return lines.

Pause Shipped Lines of a Kit Until Shipping Ships All of the Lines

Assume you order a kit that has a quantity of more than one, such as 10. All of the lines aren't available in inventory, so fulfillment splits some lines and ships part of the kit while it waits for the factory to replenish inventory. You don't want to send the shipped lines to invoicing by themselves. You need to wait until fulfillment ships all of the quantity for the kit.

Here's what the rule does.

  • Pause the shipped lines until fulfillment successfully fulfills all lines for the kit.

  • Automatically release the paused lines, then proceed to the next orchestration process step.

    The orchestration process can now send all lines for the kit to invoicing together.

Pause Shipped Lines of a Kit Until Shipping Ships All of the Lines
the then statement of a pause task that you can use as a guideline

Note

Code

Description

FLine is a DOOSeededOrchestrationRules.DOOFLine

Declare the FLine variable, then store attributes of the fulfillment lines that the orchestration process is currently processing into this variable.

header.childFLines RL.contains FLine

Declare the childFLines attribute into the rules language (RL) dictionary, then set the value of childFLines to the value that FLine contains.

FLine.itemSubTypeCode contains "KIT"

Only get fulfillment lines that are part of a kit. Skip all other lines.

At least one

Use this test to determine whether fulfillment split at least one fulfillment line in the kit.

allFLines is a DOOSeededOrchestrationRules.DOOFLine

Declare the allFLines variable, then store attributes of the fulfillment line that the orchestration process is currently processing into this variable. We will cycle through all the lines.

header.allFLinesInTheOrder RL.contains allFLines

Declare allFLinesInTheOrder into the rules language (RL) dictionary, then set the value of allFLinesInTheOrder to the value that allFLines contains.

allFLines.fulfillLineId isn't FLine.fulfillLineId

allFLines.lineId is FLine.lineId

If fulfillment ships part of a kit, then it splits the lines in the kit, ships some lines and doesn't ship others. Let's see whether fulfillment split the lines in the kit.

Notice that.

  • The allFLines variable contains the fulfillLineId values for all fulfillment lines in the sales order.

  • The FLine variable contains only the fulfillLineId for the line that we are currently examining.

If the fulfillLineId attribute in the allFLines attribute doesn't equal the fulfillLineId attribute in the FLine variable, and if the lineId attribute in the allFLines attribute does equal the lineId attribute in the FLine variable, then we can see that fulfillment didn't split the line that we are currently examining.

How do we know? The fulfillLineId identifies the fulfillment line that contains the kit. Fulfillment must maintain the relationship between the kit's fulfillment line and new lines that it creates when it splits a kit. So fulfillment assigns the lineId of each new line that it creates to the value of the fulfillLineId.

FLine.actualShipDate is null

Only consider lines that fulfillment hasn't shipped.

FLine.orderedQty isn't 0

Fulfillment sets orderedQty to zero when it cancels the line. This condition makes sure we only consider lines that aren't canceled.

Send Shippable and Nonshippable Lines to Invoicing in Groups

Assume you must modify the pause task so the orchestration process sends all fulfillment lines to invoicing as a single group of lines, including all the lines of a sales order that fulfillment can ship and can't ship instead of only lines that fulfillment can ship. Here's what the rule does.

  • Automatically releases the pause for the nonshippable lines that are part of a group as soon as Shipping finishes shipping the shippable lines.

  • Uses an extensible flexfield to allow the Order Entry Specialist to specify which lines are part of the group.

You can use the same Then statement that you use in the Pause Nonshippable Lines Until Shipping Ships Shippable Lines example, but the If statement is different. Add the pause task so it happens between the shipping task and invoicing task in your orchestration process.

Here's the first part of the If statement.

Example of Grouping Values and Using Extensible Flexfields

Note

Code

Description

currentFline is a DOOSeededOrchestrationRules.DOOFLine

Declare the currentFline variable, then store attributes of the fulfillment line that the orchestration process is currently processing into this variable.

header.childFLines RL.contains currentFline

Declare currentFline into the rules language (RL) dictionary, then set the value of currentFline to the value that childFLines contains.

This condition makes sure currentFline references a fulfillment line that the orchestration process is processing. It also makes sure you correctly declare the variable into the dictionary.

allFlines is a DOOSeededOrchestrationRules.DOOFLine

Declare the allFlines variable, and set it to type DOOFLine.

header.allFLinesInTheOrder RL.contains allFlines

Declare the allFlines variable into the rules language dictionary, and set the value of allFlines to the value that allFLinesInTheOrder contains.

This condition makes sure you correctly declare the variable into the dictionary.

currentFlineEFF is a DOOSeededOrchestrationRules.FlexContext

Declare the currentFlineEFF variable, and set it to type FlexContext.

currentFline.flexContexts RL.contains currentFlineEFF

Declare currentFlineEFF into the rules language dictionary, and set the value of currentFlineEFF to the value that flexContexts contains.

This condition makes sure you correctly declare the variable into the dictionary.

flexContexts is a list of context rows for the extensible flexfield. FlexContext is a type of row or variable.

Here's the second part of the If statement.

second part of the If statement
the then statement of a pause task that you can use as a guideline

Note that the FulfillLineContext1 extensible flexfield context and the FL1AttributeChar1 segment are one group.

Assume the sales order contains 10 fulfillment lines and you must group them into two sets of five lines each. You can use.

  • FulfillLineContext1 and FL1AttributeChar1 to set up GROUP1 so it contains the first five lines

  • FulfillLineContext2 and FL1AttributeChar2 to set up GROUP2 so it contains the last five lines

Here's the code from second part of the If statement.

Code

Description

allFlineEFF is a DOOSeededOrchestrationRules.FlexContext

Declare the allFlineEFF variable, and store the value of object FlexContext into this variable.

Method DooSeededOrchestrationRules contains FlexContext.

FLATTR = "FL1AttributeChar1"

Declare variable FLATTR (flexfield attribute), and set it to FL1AttributeChar1.

You reference the FL1AttributeChar1 extensible flexfield attribute in more than one location in this rule. For efficiency, and to avoid problems because of typographical errors, you can declare FLATTR one time, set it to FL1AttributeChar1, and then reference FLATTR instead of declaring FL1AttributeChar1 more than one time.

currentFline.fulfillLineId isn't allFlines.fulfillLineId

Proceed to the next AND only if the fulfillLineId attribute in the currentFline variable and the fulfillLineId attribute in the allFlines variable doesn't reference the same fulfillment line.

currentFlineEFF.context equals ignore case "FulfillLineContext1"

Get the value of the flexfield context from currentFlineEFF.

Proceed to the next AND statement only if the context contains the FulfillLineContext1 string.

equals ignore case specifies to ignore the case sensitivity of the FulfillLineContext1 string. This condition avoids the situation where your deployment might use some other case for this attribute.

currentFlineEFF.getFlexAttributeValue.(FLATTR) isn't null

Use the getFlexAttributeValue method to get the value of the FL1AttributeChar1 attribute from the extensible flexfield on the current fulfillment line.

Proceed to the next AND only if FL1AttributeChar1 contains a value.

Recall that FLATTR contains FL1AttributeChar1.

currentFlineEFF.getFlexAttributeValue.(FLATTR) isn't null

Use the getFlexAttributeValue method to get the value of the FL1AttributeChar1 attribute from the extensible flexfield on the current fulfillment line.

Proceed to the next AND only if FL1AttributeChar1 contains a value.

Recall that FLATTR contains FL1AttributeChar1.

allFlineEFF.context equals ignore case "FulfillLineContext1"

Get the value of the flexfield context from allFlineEFF.

Proceed to the next AND statement only if the context contains the FulfillLineContext1 string.

allFlineEFF.getFlexAttributeValue.(FLATTR) isn't null

Get the value of the FL1AttributeChar1 attribute from allFlineEFF.

Proceed to the next AND only if FL1AttributeChar1 contains a value.

currentFlineEFF.getFlexAttributeValue.(FLATTR) is allFlineEFF.getFlexAttributeValue.(FLATTR)

Proceed to the next AND only if the extensible flexfield attribute contains the same value on the current line and on all lines.

This condition makes sure these fulfillment lines are part of the same group.