Use Extensible Flexfields in Line-Selection Rules
Use the DooSeededOrchestrationRules object to reference an orchestration process when you use an extensible flexfield in a line-selection rule.
Assume you need this rule:
-
If the order line contains a reward item, then use it when running this orchestration process step.
You use this logic:
Object |
Description |
---|---|
Pattern |
Use these patterns:
|
Test |
Use these tests:
Note
|
Action |
Use this Assert New action:
|
This logic creates this hierarchy:
Order Header
childFLines
flexContext
where
-
Order Header is the root.
-
childFLines is a child of Order Header.
-
flexContext is a child of childFLines and a grandchild of Order Header.
This example uses Tree Mode to maintain the hierarchy rather than explicitly creating the hierarchy. The forward slash (/) specifies the hierarchy. For example:
-
header/childFLines/flexContexts
You will set up a line selection criteria in an orchestration process so it specifies which orchestration process steps to run for each order line. You set it up according to the value that the flexfield contains. You create this rule:
-
If the Export Compliance status is Not Passed for an order line, then manually examine the line. Send other order lines directly to shipping.
You will create this flow:

You use the flexfield to store the value of the compliance status:
Context |
Extensible Flexfield |
Object |
Value |
---|---|---|---|
Compliance |
Compliance_Status |
Fulfillment Line EFF (DOO_FULFILL_LINES_ADD_INFO) |
Not Passed |
You will create this line-selection rule:

Summary of the Steps
-
Create the rule.
-
Establish the object hierarchy.
-
Select lines according to flexfield context.
-
Select lines according to compliance status.
-
Identify the order line that you need to manually examine.
For background, see Overview of Using Business Rules With Order Management.
This topic uses example values. You might need different values, depending on your business requirements.
Create the Rule
-
Go to the Setup and Maintenance work area, then go to the task:
-
Offering: Order Management
-
Functional Area: Orders
-
Task: Manage Orchestration Process Definitions
-
-
On the Manage Orchestration Process Definitions page, locate the orchestration process you must edit, then click Actions > Edit.
-
On the Edit Orchestration Process Definitions page, in the Process Details area, in the Step Definition list, add a step.
Attribute
Value
Step Name
Compliance Check
Step Type
Service
Task Type
DOO_TradeCompliance
Task
DOO_TradeCompliance
Service
Request Screening for Trade Compliance
-
In the row you just added, in the Line-Selection Criteria column, click Click for Rule.
-
In the Line-Selection Criteria dialog, click Add Rule > Properties, then set the values.
Attribute
Value
Name
Examine Compliance Status
Description
If the Export Compliance status is Not Passed for an order line, then perform a manual examination.
Effective Date
Always
Priority
Medium
Active
Contains a check mark.
Advanced Mode
Contains a check mark.
Tree Mode
Contains a check mark.
Use tree mode so you can include the flexfield in the orchestration rule's root hierarchy.
-
Set the root.
Attribute
Value
Root
DooSeededOrchestrationRules.DOOHeader
Establish the Object Hierarchy
You must establish this object hierarchy so the rule filters the data it processes:
Order Header
childFLines
flexContexts
where
-
Order Header is the root.
-
childFLines is a child of Order Header.
-
flexContexts is a child of childFLines and a grandchild of Order Header.
This example uses Tree Mode to maintain the hierarchy rather than explicitly creating the hierarchy. Each forward slash (/) specifies a hierarchy level.
header/childFLines/flexContexts
where
-
header is the root. The root makes sure the rule processes data only in the child object that references the root.
-
childFLines is the child. The child makes sure the rule processes data only in the grandchild object that references the child.
-
flexContexts is the grandchild.
You will create this If statement. It establishes the object hierarchy:

Establish the object hierarchy.
-
In the If area, delete the value in the field to the left of Is A, and then enter this value.
Attribute
Value
Field to the left of Is A
Header
-
In the field to the right of Is A, set the value.
Attribute
Value
Field to the right of Is A
DooSeededOrchestrationRules.DOOHeader
-
Under the field that contains
header
, add a check mark to the option that selects the test, click Cut > Cut.For example:
The hierarchy includes the extensible flexfield variables, so its not necessary to include tests when you define the hierarchy.
-
Click Add Pattern.
-
In the field to the left of Is A, enter the value.
Attribute
Value
Field to the left of Is A
Fline
-
In the field to the right of Is A, set the value.
Attribute
Value
Field to the right of Is A
header/childFLines
-
Click Add Pattern.
-
In the field to the left of Is A, enter the value.
Attribute
Value
Field to the left of Is A
FlineEFF
-
In the field to the right of Is A, set the value.
Attribute
Value
Field to the right of Is A
header/childFLines/flexContexts
Select Lines According to Flexfield Context
You will add this test:
-
If the flexfield's context is Compliance
This text will select lines only where the flexfield context is Compliance.
You will create an expression.
Left Expression |
Operand |
Right Expression |
---|---|---|
FLineEFF.context.equalsIgnoreCase("Compliance") |
Is |
DooSeededOrchestrationRules.Boolean.TRUE |
Select lines according to flexfield context.
-
Under the pattern you just added, click Add Test.
You will add the test criteria that identifies order lines that proceed through compliance testing. If the attributes you reference are optional, then you include null value checks to avoid a null pointer exception at run time.
-
Click Left Value.
-
In the Condition Browser, click Expression Builder.
-
In the Expression Builder, click Functions, expand FLineEFF > Context, click equalsIgnoreCase(String), then click Insert Into Expression.
For example:
To navigate the tree structure, expand the folders until you can view the functions of the context object. FlineEFF is the pattern you declared earlier.
The context you expand is a fact in the FlineEFF pattern. It includes functions you can use to perform a variety of calculations. Therefore, the expression you create includes the pattern, fact, and function.
-
In the window near the top of the dialog, replace the word
String
with the context for your extensible flexfield condition. In this example, replaceString
withCompliance
.For example:
-
Click OK > OK.
-
Click Right Value.
-
In the Condition Browser, expand DooSeededOrchestrationRules > Boolean, then click TRUE > OK.
For example:
Select Lines According to Compliance Status
You will add a test.
-
If the value of the flexfield attribute named Compliance Status is Not Passed
You will create an expression.
Left Expression |
Operand |
Right Expression |
---|---|---|
flineEFF.getFlexAttributeValue("_Compliance_Status") |
Is |
"Not Passed " |
Select lines according to Compliance Status.
-
In the test you just added, immediately to the right of the Right Value magnifying glass, click the down arrow, then click Simple Test.
-
Click Left Value.
-
In the Condition Browser, click Expression Builder.
-
In the Expression Builder, click Functions, click FlineEFF.getFlexAttributeValue(String), then click Insert Into Expression.
For example:
-
In the window near the top of the dialog, replace the word String with the name of the flexfield attribute.
You must use an underscore to prefix the attribute name in a function. The attribute name is Compliance_Status, so you use _Compliance_Status.
For example:
-
Click OK > OK.
-
In the field to the right of Is, enter
"Not Passed"
.You must include the double quotation marks ( " ).
Make sure your rule contains tests.
Left Expression
Operand
Right Expression
FLineEFF.context.equalsIgnoreCase("Compliance")
Is
DooSeededOrchestrationRules.Boolean.TRUE
flineEFF.getFlexAttributeValue("_Compliance_Status")
is
"Not Passed"
Identify the Order Line That You Need to Manually Examine
You will create a statement.

where
-
Result is a fact in the DooSeededOrchestrationRules dictionary.
-
resultObjKey is a property of the Result fact.
-
resultObjKey stores the value that this rule uses to identify the order line that requires manual examination.
-
Fline
is a fact in the DooSeededOrchestrationRules dictionary that contains order line attributes. -
fulfillLineID is an order line attribute.
Identify the order line that requires manual examination.
-
In the Then area, click Add Action > Assert New.
-
Click Select a Target > DooSeededOrchestrationRules.Result.
-
Click Edit Properties.
-
In the Properties dialog, in the resultObjKey row, click Value.
-
In the Condition Browser, expand
Fline
, click fulfillLineID, then click OK. -
Make sure the Properties dialog looks like this:
-
Click OK
-
In the Line-Selection Criteria dialog, click Save.
-
On the Edit Orchestration Process Definition page, click Save.