Search Results start_slaves




Overview

The APPS.BEN_MAINTAIN_BENEFIT_ACTIONS package body is a core parallel-processing controller within the Oracle E-Business Suite Advanced Benefits (OLTP) module. Its principal business function is to divide a Benefits action — a logical batch of eligibility, enrollment, or life-event processing performed against a population — into ranges of person actions and to distribute those ranges across multiple concurrent worker processes. This mechanism allows large benefits open-enrollment or eligibility runs to execute concurrently rather than serially, materially reducing processing time.

The package orchestrates a classic master/slave pattern: a parent process partitions the work into BEN_BATCH_RANGES rows, then launches and monitors slave concurrent requests that each claim a range, mark it as in-progress, process the underlying BEN_PERSON_ACTIONS, and signal completion. The version header indicates the body originates from the 11i/12.0-era file benbmbft.pkb and remains applicable across EBS 12.1.1 and 12.2.2.

Key Procedures and Functions

  • GRAB_NEXT_BATCH_RANGE — The work-claiming primitive. It locks a single unprocessed batch range for a given benefit action, returns the starting and ending person action identifiers, and flips the range status. It uses a FOR UPDATE cursor with an index hint on BEN_BATCH_RANGES to serialize range allocation safely across concurrent slaves.
  • START_SLAVES — The coordinator entry point invoked when a benefits action is launched in parallel mode. Based on the requested thread count, number of ranges, and a long list of selection and filtering parameters (program, plan, option, eligibility profile, reporting group, life-event flags, mode, and effective date), it submits the slave concurrent requests that will each consume a batch range.
  • CHECK_SLAVES_STATUS — Polls the status of the slave concurrent requests, typically by inspecting FND_CONCURRENT_REQUESTS, so the master process can determine whether work remains outstanding or a slave has failed.
  • CHECK_ALL_SLAVES_FINISHED — A completion test used by the master to decide when all slave threads have terminated and the parent benefits action can be finalized.
  • GET_PERACTIONRANGE_PERSONDETS — Retrieves the person-level detail associated with a given person-action range, supplying the data each slave requires to process its assigned slice of the population.

Tables Accessed

  • BEN_BATCH_RANGES — The work-queue table. Ranges are read, locked, and updated as status transitions from unprocessed to in-progress to complete.
  • BEN_BENEFIT_ACTIONS — The parent action definition that scopes which ranges belong to the current run.
  • BEN_PERSON_ACTIONS — The actual per-person benefit actions being processed; its identifiers define the boundaries of each range.
  • FND_CONCURRENT_REQUESTS — Used to submit slave requests and to monitor their status and completion.
  • DBMS_LOCK — Employed for serialization and synchronization between concurrent master and slave sessions.

Usage Notes

This package is not a public API and is not intended for direct customer invocation. It is called internally by the Benefits engine, most visibly when a user selects the parallel-processing option on a Benefits action in the Maintain Benefit Actions form, or when a benefits batch concurrent program is submitted with multiple threads. The master request calls START_SLAVES to fan out work; each slave repeatedly calls GRAB_NEXT_BATCH_RANGE until the queue is exhausted; the master uses CHECK_SLAVES_STATUS and CHECK_ALL_SLAVES_FINISHED to detect completion. Because of its tight coupling to BEN_BATCH_RANGES status codes and the concurrent manager, custom code should treat it as a black box and rely on supported Benefits APIs instead. It is referenced by two other packages within the Benefits schema.