Use Case to Pause for a Dependency
This use case coordinates orchestration processes to make sure Order Management invoices all the fulfillment lines that a sales order contains at the same time, even if the shipment dates vary.
The orchestration process uses the same sequence of steps to process each fulfillment line, but these lines might not be synchronized.
Assume a school district places a sales order for 600 new history books and requires that they receive the invoice for the sales order only after Order Management ships all books.
Assume that the orchestration process must get the books from different warehouses.
-
Fulfillment line 1 gets 80 books from the Seattle warehouse
-
Fulfillment line 2 gets 400 books from the Denver warehouse
-
Fulfillment line 3 gets 120 books from the Chicago warehouse
You set up an orchestration process that processes the fulfillment lines, pauses until fulfillment shipped all lines, resumes processing, then sends the lines to billing.
Summary of the Steps
-
Set up the orchestration process.
-
Create the first rule.
-
Create the If statement for the second rule.
-
Create the Then statement for the second rule.
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.
This topic uses example values. You might need different values, depending on your business requirements.
For background details about:
-
Properties that you set for the pause task, see Overview of Pausing Orchestration Processes.
-
Business rules, see Overview of Using Business Rules With Order Management.
Set Up the Orchestration Process
View an example that describes how to do this set up. For details, see Pause Orchestration Processes for Events.
-
Create a new orchestration process and set up the header.
-
Add orchestration process steps.
-
Schedule
-
Reserve
-
Ship
-
Wait for Shipment
-
Pause
-
Invoice
-
Wait for Billing
-
Create the First Rule
You will create a business rule.
Note
Code |
Description |
---|---|
|
A dictionary that contains predefined rules you can use in your business rule. |
|
An object in the DooSeededOrchestrationRules dictionary that stores details about the sales order header. |
|
Assign DOOHeader as a new object in the DooSeededOrchestrationRules dictionary. This assignment makes the object available throughout your rule. |
|
A rule set in the DooSeededOrchestrationRules dictionary. It contains events and variables you can use to specify how to handle the result of a start after condition. |
|
A value you can set for SacResult. The term |
|
Set the value of SacResult to SAC. |
|
A property of SacResult. sacType stores the value that the rule uses to determine whether to pause the orchestration process or release it. |
|
A value of sacType. If sacType contains IMMEDIATE, then the rule will immediately release the pause task. |
|
Set sacType to SAC_TYPE_IMMEDIATE. |
Create the first rule.
-
On the Pause step, in the Pause Rule column, click Add Rule.
In the Start After Condition dialog, click Add Rule > Properties, then set the values.
Attribute
Value
Name
Default Rule for Dependent Pause
Description
Default rule that pauses orchestration process until a dependency resolves.
Priority
Highest
Advanced Mode
Contains a check mark.
-
In the field below If, enter an alias, such as
Header
. -
In the field to the right of Is A, select DooSeededOrchestrationRules.DOOHeader.
-
Click the down arrow next to Right Value, then click Delete Test.
If you remove the test, then the rule always applies the actions that the Then area contains.
-
In the Then area, click Add Action, then click Assign New.
-
Click Select a Target, then click DooSeededOrchestrationRules.SacResult.
-
In the field to the left of the equal sign (=), enter
SAC
. -
In the field to the right of the equal sign (=), click Expression Value.
-
In the Condition Browser dialog, expand DooSeededOrchestrationRules, expand SacResult, click New, then click OK.
-
Click Add Action > Assign.
-
Click Select a Target, then click Header.sacResult.
-
In the field to the right of the equal sign (=), enter
SAC
. -
Click Add Action > Assign.
-
Click Select a Target, then click Header.sacResult.sacType.
-
In the field to the right of the equal sign (=), click Expression Value.
-
In the Condition Browser dialog, expand DooSeededOrchestrationRules, expand SacResult, click SAC_TYPE_IMMEDIATE, and then click OK.
-
Click Validate, then click Save.
Create the If Statement for the Second Rule
You will create this rule.
It states that if the actual ship date isn't null on all fulfillment lines, then release the pause task.
First, you create the If statement.
where
Code |
Description |
---|---|
|
Pause all shipped lines even if the fulfillment system shipped all lines except one line. |
|
Coordinate across more than one orchestration process when more than one orchestration process processes the fulfillment lines for the sales order. |
|
Determine whether any of the fulfillment lines haven't shipped. actualShipDate is null when orchestration starts. Orchestration sets actualShipDate to a value when it ships the item. |
Create the If statement for the second rule.
-
On the Pause step, in the Pause Rule column, click Add Rule.
In the Start After Condition dialog, collapse the rule you just created.
-
Click Add Rule > Properties, then set the values.
Attribute
Value
Name
Rule for Pause Dependency
Description
Rule that pauses orchestration process until a dependency resolves.
Priority
Medium
Advanced Mode
Contains a check mark.
Tree Mode
Contains a check mark.
-
Set Root to DooSeededOrchestrationRules.DOOHeader.
-
In the If area, in the field to the left of Is A, replace the default value with an alias, such as
OrderHeader
. -
Click the down arrow to the right of Right Value, and then click Delete Test.
-
Click Add Pattern to the right of the If statement.
-
To the right of the empty fields, click Surround Pattern with Parenthesis, then click Surround.
-
In the list of values under And, click
At least one
. -
In the field on the left, under
At least one
, enterFLine
. -
In the field to the right of Is A, select OrderHeader/allFLinesIntheOrder.
-
Click the down arrow next to Add Test, then click Simple Test.
-
Click Left Value.
-
In the Condition Browser, expand FLine, click actualShipDate, then click OK.
-
Click Right Value.
-
In the Condition Browser, click null, then click OK.
Create the Then Statement for the Second Rule
You will create a Then statement.
For details about these properties, see Overview of Pausing Orchestration Processes.
Create the Then Statement for the second rule.
-
In the Then area, click the down arrow next to Add Action, then click Assign.
-
Click Select a Target, then click OrderHeader.sacResult.eventName.
-
Click Expression Value.
-
In the Condition Browser, expand DooSeededOrchestrationRules, expand SacResult, select SAC_SYSTEM_EVENT_IPC_PAUSE, then click OK.
This step sets up the rule to evaluate fulfillment lines until the flow ships all of them, and then to release them.
Interprocess
communication (IPC
) implements a pause according to an event. -
Click the down arrow next to Add Action, then click Assign.
-
Click Select a Target, then click OrderHeader.sacResult.reevaluateFlag.
-
In the field to the right of the equal sign (=), enter
"Y"
.You must include the double quotation marks.
-
Click the down arrow next to Add Action, then click Assign.
-
Click Select a Target, then click OrderHeader.sacResult.sacType.
-
Click Expression Value on the same line.
-
In the Condition Browser, expand DooSeededOrchestrationRules, expand SacResult, click SAC_TYPE_EVENT, then click OK.
-
Click Validate, then click Save.