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
manageRuleAPI to configure these rules. The size that is configured in theVERY_LARGE_ORDER_SIZErule must always be greater than the size that is configured in theLARGE_ORDER_SIZErule.
- Consider the following orders that are captured in Sterling™ Order Management System Software.
OrderHeaderKey Order number Number of order lines ORDER_1 ORDER_1 150 ORDER_2 ORDER_2 10 ORDER_3 ORDER_3 500 For theORDER_1toORDER_3orders, the followingYFS_TASK_Qrecords 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_CRITERIAcolumn is populated based on the rules that define large and very large order size. For regular and small orders, theFILTER_CRITERIAvalue 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 Criteriais not defined when you use theTask Queue Filter Criteriaparameter.VOIDis a validTask Queue Filter Criteriavalue irrespective of the segregation policy. It is used to match records with null value in theFILTER_CRITERIAcolumn of theYFS_TASK_Qtable. - Start the agent servers that you configured in the previous step.
ScheduleRegularandLargeOrders- This server retrieves and processes the jobs from theYFS_TASK_Qtable that matchesTRANSACTION_KEY (SCHEDULE.0001),DATA_TYPE (OrderHeaderKey), andFILTER_CRITERIA(null or Large).ORDER_1andORDER_2are processed by theScheduleRegularandLargeOrdersagent server as theFILTER_CRITERIAforORDER_1is Large andORDER_2is null.ScheduleVeryLargeOrders- This server retrieves and processes the jobs from theYFS_TASK_Qtable that matchesTRANSACTION_KEY (SCHEDULE.0001),DATA_TYPE (OrderHeaderKey), andFILTER_CRITERIA(VeryLarge).ORDER_3is processed by theScheduleRegularandLargeOrdersagent server as theFILTER_CRITERIAforORDER_3is 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.orderorderattribute yfs.taskqueue.segregation.order.orderattributeOrderType - Set
OrderTypeattribute 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_1toORDER_50orders, the followingYFS_TASK_Qrecords 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_CRITERIAcolumn is populated based on theyfs.taskqueue.segregation.orderandyfs.taskqueue.segregation.order.orderattributeproperties. AsOrderTypeattribute is configured for the order attribute based segregation,OrderTypevalues of respective orders are populated in theYFS_TASK_Qrecords. - 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_Qtable that matchesTRANSACTION_KEY (SCHEDULE.0001),DATA_TYPE (OrderHeaderKey), andFILTER_CRITERIA(BOPIS).ORDER_50is processed by theScheduleBOPISOrdersagent server asFILTER_CRITERIAfor the order is BOPIS.ScheduleSFSOrders- This server retrieves and processes jobs from theYFS_TASK_Qtable that matchesTRANSACTION_KEY (SCHEDULE.0001),DATA_TYPE (OrderHeaderKey), andFILTER_CRITERIA(SFS).ORDER_1toORDER_49are processed by theScheduleSFSOrdersagent server asFILTER_CRITERIAfor the orders is SFS.ScheduleOtherOrders- This server retrieves and processes the jobs from theYFS_TASK_Qtable that matchesTRANSACTION_KEY (SCHEDULE.0001),DATA_TYPE (OrderHeaderKey), andFILTER_CRITERIA(null).Note: TheScheduleOtherOrdersserver must be used to process all the other records whereOrderTypeattribute is not set at Order Header.
- After the records are processed by schedule order agent servers, the following
YFS_TASK_Qrecords are created for theRELEASE.0001transaction 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
OrderTypeattribute is configured for the order attribute based segregation, theOrderTypevalues of respective orders are populated in theYFS_TASK_Qrecords. You can define multiple agent criteria forRELEASEtransaction for workload segregation based on theOrderTypeattribute, same as for theSCHEDULEtransaction.