Scenarios for using segregation
The line size and the attribute based workload segregation scenarios are explained in this topic.
Segregation scenarios for OrderHeaderKey
data type
Following examples demonstrate the order line size and order attribute based workload segregation.
- The rules that define large and very large order size have the following default values.
LARGE_ORDER_SIZE
= 20VERY_LARGE_ORDER_SIZE
= 500Call the
manageRule
API to configure these rules. The size that is configured in theVERY_LARGE_ORDER_SIZE
rule must always be greater than the size that is configured in theLARGE_ORDER_SIZE
rule.
- Consider the following orders that are captured in Sterling™ Order Management System.
OrderHeaderKey Order number Number of order lines ORDER_1 ORDER_1 150 ORDER_2 ORDER_2 10 ORDER_3 ORDER_3 500 For theORDER_1
toORDER_3
orders, the followingYFS_TASK_Q
records are created for the SCHEDULE.0001 transaction to further process the order.TRANSACTION_KEY DATA_TYPE DATA_KEY FILTER_CRITERIA SCHEDULE.0001 OrderHeaderKey ORDER_1 Large SCHEDULE.0001 OrderHeaderKey ORDER_2 SCHEDULE.0001 OrderHeaderKey ORDER_3 VeryLarge The
FILTER_CRITERIA
column is populated based on the rules that define large and very large order size. For regular and small orders, theFILTER_CRITERIA
value is set to null. - Define multiple agent criteria for workload segregation with the following values for
Task Queue Filter Criteria
.Agent criteria ID Agent server Task Queue Filter Criteria SCHEDULE.0001.REG_LARGE ScheduleRegularandLargeOrders VOID, Large SCHEDULE. 0001.VERYLARGE ScheduleVeryLargeOrders VeryLarge Note: All the criteria that are defined for an agent must be mutually exclusive. No catch-all criteria must be defined, otherwise it can interfere the processing of jobs between servers. You must stop running all the criteria whereTask Queue Filter Criteria
is not defined when you use theTask Queue Filter Criteria
parameter.VOID
is a validTask Queue Filter Criteria
value irrespective of the segregation policy. It is used to match records with null value in theFILTER_CRITERIA
column of theYFS_TASK_Q
table. - Start the agent servers that you configured in the previous step.
ScheduleRegularandLargeOrders
- This server retrieves and processes the jobs from theYFS_TASK_Q
table that matchesTRANSACTION_KEY (SCHEDULE.0001)
,DATA_TYPE (OrderHeaderKey)
, andFILTER_CRITERIA
(null or Large).ORDER_1
andORDER_2
are processed by theScheduleRegularandLargeOrders
agent server as theFILTER_CRITERIA
forORDER_1
is Large andORDER_2
is null.ScheduleVeryLargeOrders
- This server retrieves and processes the jobs from theYFS_TASK_Q
table that matchesTRANSACTION_KEY (SCHEDULE.0001)
,DATA_TYPE (OrderHeaderKey)
, andFILTER_CRITERIA
(VeryLarge).ORDER_3
is processed by theScheduleRegularandLargeOrders
agent server as theFILTER_CRITERIA
forORDER_3
is VeryLarge.
In the same example, if you want to process the three types of orders (regular, large, and very large) separately, then you can define the following multiple agent criteria:Agent criteria ID Agent server Task Queue Filter Criteria SCHEDULE. 0001.REGULAR ScheduleRegularOrders VOID SCHEDULE. 0001.LARGE ScheduleLargeOrders Large SCHEDULE. 0001.VERYLARGE ScheduleVeryLargeOrders VeryLarge
Consider a scenario where a business supports different fulfillment models including Buy Product Online and Pickup in Store (BOPIS), Ship from Store (SFS), and you want the BOPIS orders to be processed (schedule or release) on priority among other orders in a separate agent server.
- Configure the following properties.
Property name Property value yfs.taskqueue.segregation.order
orderattribute yfs.taskqueue.segregation.order.orderattribute
OrderType - Set
OrderType
attribute of the order according to the fulfillment model while capturing the order. Consider the following orders.ForOrder number Order type ORDER_1 SFS ORDER_2 SFS ORDER_3 SFS ... ... ORDER_49 SFS ORDER_50 BOPIS ORDER_1
toORDER_50
orders, the followingYFS_TASK_Q
records are created for the SCHEDULE.0001 transaction to further process the order.TRANSACTION_KEY DATA_TYPE DATA_KEY FILTER_CRITERIA SCHEDULE.0001 OrderHeaderKey ORDER_1 SFS SCHEDULE.0001 OrderHeaderKey ORDER_2 SFS SCHEDULE.0001 OrderHeaderKey ORDER_3 SFS … … … … SCHEDULE.0001 OrderHeaderKey ORDER_49 SFS SCHEDULE.0001 OrderHeaderKey ORDER_50 BOPIS The
FILTER_CRITERIA
column is populated based on theyfs.taskqueue.segregation.order
andyfs.taskqueue.segregation.order.orderattribute
properties. AsOrderType
attribute is configured for the order attribute based segregation,OrderType
values of respective orders are populated in theYFS_TASK_Q
records. - Define the following multiple agent criteria for workload segregation.
Agent criteria ID Agent server Task Queue Filter Criteria SCHEDULE.0001.BOPIS ScheduleBOPISOrders BOPIS SCHEDULE.0001.SFS ScheduleSFSOrders SFS SCHEDULE.0001.OTHERS ScheduleOtherOrders VOID - Start the agent servers that you configured in the previous step.
ScheduleBOPISOrders
- This server retrieves and processes jobs from theYFS_TASK_Q
table that matchesTRANSACTION_KEY (SCHEDULE.0001)
,DATA_TYPE (OrderHeaderKey)
, andFILTER_CRITERIA
(BOPIS).ORDER_50
is processed by theScheduleBOPISOrders
agent server asFILTER_CRITERIA
for the order is BOPIS.ScheduleSFSOrders
- This server retrieves and processes jobs from theYFS_TASK_Q
table that matchesTRANSACTION_KEY (SCHEDULE.0001)
,DATA_TYPE (OrderHeaderKey)
, andFILTER_CRITERIA
(SFS).ORDER_1
toORDER_49
are processed by theScheduleSFSOrders
agent server asFILTER_CRITERIA
for the orders is SFS.ScheduleOtherOrders
- This server retrieves and processes the jobs from theYFS_TASK_Q
table that matchesTRANSACTION_KEY (SCHEDULE.0001)
,DATA_TYPE (OrderHeaderKey)
, andFILTER_CRITERIA
(null).Note: TheScheduleOtherOrders
server must be used to process all the other records whereOrderType
attribute is not set at Order Header.
- After the records are processed by schedule order agent servers, the following
YFS_TASK_Q
records are created for theRELEASE.0001
transaction to further process the order.TRANSACTION_KEY DATA_TYPE DATA_KEY FILTER_CRITERIA RELEASE.0001 OrderHeaderKey ORDER_1 SFS RELEASE.0001 OrderHeaderKey ORDER_50 BOPIS RELEASE.0001 OrderHeaderKey ORDER_2 SFS RELEASE.0001 OrderHeaderKey ORDER_3 SFS … … ... … RELEASE.0001 OrderHeaderKey ORDER_49 SFS As
OrderType
attribute is configured for the order attribute based segregation, theOrderType
values of respective orders are populated in theYFS_TASK_Q
records. You can define multiple agent criteria forRELEASE
transaction for workload segregation based on theOrderType
attribute, same as for theSCHEDULE
transaction.