Franchise Order Purge (wf_orders_purge_job)

Module Name

wf_orders_purge_job

Description

Franchise Order Purge

Functional Area

Franchise Management

Module Type

Admin - Ad hoc

Module Technology

Background Processing

Catalog ID

N/A

Wrapper Script

b8dwrap.ksh

Design Overview

This background job is composed of two-step processing. It will have a threading assignment and a business logic processing.

Thread assignment program will filter eligible records from franchise orders header table based on its conditions are met and number of days elapsed as defined by system parameter setting, Franchise History Months:

  • All Franchise Order Details have its NOT_AFTER_DATE not yet elapsed as declared by the system parameter setting.

  • All the franchise returns associated with the franchise order were deleted or purged.

  • All the billing records associated with the franchise order are not yet extracted or where not enough time has elapsed since they were extracted as defined by the system parameter setting.

  • All transfers, Orders and Store Orders associated with the franchise order were purged through their respective purge process.

These records are chunked and Thread ID is assigned for each. They will be stored temporarily in a staging table.

The Business logic program will process all records from the staging table. Using bulk processing, this program will delete the records from franchise orders header and other related franchise order tables. It will free up and clean the staging table afterwards. There is a STOP ON NEXT feature in bulk processing (through a loop) where Administrators can stop this batch with a flip of this indicator.

Restart/Recovery

N/A

Key Tables Affected

Table 18-2 Key Tables Affected

Table Select Insert Update Delete

PERIOD

Yes

No

No

No

SYSTEM_OPTIONS

Yes

No

No

No

RMS_BATCH_STATUS

Yes

No

No

No

B8D_PROCESS_CONFIG

Yes

No

No

No

JOB_AUDIT_LOGS

No

Yes

No

No

B8D_WF_ORDERS_PURGE_STG

Yes

Yes

No

Yes

WF_ORDER_HEAD

Yes

No

No

Yes

WF_ORDER_DETAIL

Yes

No

No

Yes

WF_BILLING_SALES

Yes

No

No

Yes

WF_ORDER_AUDIT

No

No

No

Yes

WF_ORDER_EXP

No

No

No

Yes

TSFHEAD

Yes

No

No

No

ORDHEAD

Yes

No

No

No

ALLOC_DETAIL

Yes

No

No

No

STORE_ORDERS

Yes

No

No

No

Design Assumptions

N/A