Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The MPC logic comprises two parts, as follows.

Anchor
_Toc521324325
_Toc521324325

Part 1: Start MPC Preprocessor

Start the MPC Preprocessor:

  1. Check MPC_CALC_EXECUTION table for an instance of the preprocessor that is pending for the same MPC rule.
    If one instance is pending and the number of submitted > 0, then skip to Step 10.
  2. Update MPC_CALC_EXECUTION table to pending status.
  3. Generate a list of all entities in the rule.
    • If no include criteria is selected, select all entities from the entity table.
    • Else, add included entities. If necessary, determine members of LIST entities.
    • Check the entity close date field, if it has a date prior to today, do not include it.
    • Remove excluded entities. If necessary, determine members of LIST entities. 
  4.  Determine which entities have not been run since the last rebuild, rule change, or field change (E records in MPC_CALC_EXECUTION_CONTEXT).
  5. Compare  Compare the current rule parameters to the rule parameters in the prior run (R records in MPC_CALC_EXECUTION_CONTEXT).
  6. Compare  Compare the current field parameters to the field parameters in the prior run (F records in MPC_CALC_EXECUTION_CONTEXT).
  7. Generate  Generate a list of all entities that need to be run.
    • If submitted as rebuild, select all entities from Step 3 that are in PERF_SUMMARY for selected dictionary and source.
    • Else if the rule has changed, select all entities from Step 3 that are in PERF_SUMMARY for selected dictionary and source.
    • Else if at least one field has changed, select all entities from Step 3 that are in PERF_SUMMARY for selected dictionary and source.
    • Else, submit entities from Step 4 that are in PERF_SUMMARY for selected dictionary and source and submit any entities that have changed since the last run (update_date > mpc_upd_date or mpc_upd_date = null) for selected dictionary and source.
  8. Submit  Submit one MPC engine for each entity identified in Step 7 to the scheduler and MPC_CALC_EXECUTION_DETAILS.

...

  1.  See "Part 2 Perform for Each MPC" for more details. 
  2. Update MPC_CALC_EXECUTION stats.
  3. Check the status of each MPC engine every minute until all complete.
  4. If all complete successfully then:
    • Update the MPC_CALC_EXECUTION table with the successful status and stats.
    • Update the MPC_CALC_EXECUTION_CONTEXT table.
      If rebuild, rule, or field changed, delete all and insert all successful entities, all rule parameters, and all field parameters. Else insert successful entities from Step 4.

     12. If all do not complete successfully:
          Update MPC_CALC_EXECUTION table with the failed status and stats.

Anchor
RTF350035003900380033003a00
RTF350035003900380033003a00
Anchor
_Toc521324326
_Toc521324326
Part 2: Perform for Each MPC Engine

...

  1. Lock the entity in ENTITY_COMMIT_CHECK.
  2. Determine all PERF_ROLLUP_RETURN_ID values that need to be updated.
  3. Interpret SCHEDULE_DEF USER_DATA from MPC preprocessor.
    • Changed and unchanged fields are flagged.
    • If submitted as rebuild or a rule was changed or a field was changed or the entity was added in Part 1, Step 4 set all fields as changed.
    • For changed fields, determine earliest END_EFFECTIVE_DATES of PERF_SUMMARY records in starting frequency.
    • For unchanged fields, determine the dates that have changed PERF_SUMMARY records (update_date > mpc_upd_date or mpc_upd_date = null).
    • Get the entity inception / fiscal year end date. If these are NULL, then set the value in the ITD / FYTD column as NULL

...

  1. Retrieve all data from PERF_SUMMARY and PERF_SEC_RETURNS table for the selected fields.
    • Note the dates that are found in Step 3.c and Step 3.d as change dates.
    • Note the LOCKED and PRIMER records.
    • Retrieve and note business dates from the BUSINESS_CALENDAR table.
  2. Calculate starting frequency data.

...