BHTK Module

The BHTK Module enables the Bullhorn Recruitment Cloud core package to integrate with the search provider Textkernel. The following functionalities are supported:

Sync / Indexing Process

This is how the current architecture of syncing data via the BHTK Module works:

  1. A UserClosed modifies a Contact record and it causes ContactTrigger to fire.
  2. ContactTrigger invokes the Salesforce queueable apex job BHTK_IndexingStarter.
  3. BHTK_IndexingStarter in turn does the following:
    • It invokes another queueable job (BHTK_IndexerRequest) and passes in N number of BHTK Status records for syncing. The number of records (N) is controlled by the groupSize parameter from Custom Metadata Types. (Setup >Custom Metadata Types > Textkernel configuration > Group Size field).
    • The BHTK_IndexerRequest self-reschedules the BHTK_IndexingStarter - so from here it goes to Step 3 again and tries to grab the next N records. This happens until Salesforce gives the error about the maximum number of queueables you can chain. Once logic hits the limit, the BHTK Module catches that and creates a BHTK_IndexingThreadStarter scheduled job to repeat the process from step 3.
    • It invokes the BHTK_IndexingThreadStarter.scheduleBenchThread method which schedules BHTK_IndexingThreadStarter (scheduled job).
  4. Scheduled job BHTK_IndexingThreadStarter tries to check the BHTK threadCount and if conditions are met it tries to increase the threadCount number and invokes another loop of the BHTK_IndexingStarter queueable job which works in parallel and repeats everything from step 3.

Visual Overview of Contact Data Sync