Loading

Prevent Concurrent Coordinate Gift Commitment Processing Jobs in Legacy Commitment Processing for Nonprofit Cloud

Fecha de publicación: Nov 2, 2026
Descripción

The Coordinate Gift Commitment Processing (original) scheduled flow is part of legacy Commitment Processing in Nonprofit Cloud Fundraising. It runs Batch Management Jobs on a schedule. The flow contains two wait nodes: Wait for Next Transaction Details Update Batch Job (API name PauseFlowNextTrxnDtlUpdateAtCmttBtchJob) and Wait for Schedule Change Batch Job (API name PauseFlowScheduleChangeBtchJob). Each wait node has a Batch Job Timed Out path that resumes the flow after 1 hour by default.

When a batch job runs for more than 1 hour, the wait node times out and the flow continues while the job is still running. When a batch job runs for more than 24 hours, the next nightly scheduled run starts while the previous job is still running. In both cases, two jobs process the same data at the same time (concurrent jobs).

This issue applies only to legacy (original) Commitment Processing and does not occur in NextGen Commitment Processing. The best recommendation is to turn on NextGen Commitment Processing in Setup > Fundraising Settings, which moves the org off legacy Commitment Processing. If the org stays on legacy Commitment Processing, two flow changes resolve the issue. Change 1 gives each job more time to finish. Change 2 stops a new run from starting when a job is already active. Apply both changes.

Solución

Change 1: Increase the Batch Job Timed Out wait time

This change increases the wait time between jobs so that each Batch Management Job has enough time to finish.

  1. In Flow Builder, open the Coordinate Gift Commitment Processing (original) scheduled flow.

  2. Open each of the 2 wait nodes (wait actions): Wait for Next Transaction Details Update Batch Job and Wait for Schedule Change Batch Job.

  3. In Path Management, select Batch Job Timed Out.

  4. Select RESUME EVENT.

  5. Update Offset Number and Offset Unit to a longer time. The recommended maximum is 8 hours, which gives each Batch Management Job up to 8 hours to run. For example, set Offset Number to 8 and Offset Unit to Hours. The Base Time stays at Running Flow Interview > CurrentDateTime.

Change 2: Skip the run if an existing job is still running

This change prevents a duplicate scheduled job from launching when one is already running.

Create constants for the batch job names

  1. In the flow, click New Resource and create a Constant that holds the Batch Management Job name. Create one constant for each of the three batch job names that the flow launches. For example, a constant with API Name UpdateCmtmtOnNxtTxnBatchJobName, Data Type Text, and Value frops_flow__UpdateCmtmtOnNxtTxn.

  2. If your org uses a modified version of the Batch Management Job, update the existing constant with the modified job name.

Add a Get Records element to find running jobs

  1. Add a Get Records element immediately after the Autolaunched Flow element. Name it Get Batch Job Record.

  2. Set Object to Batch Job.

  3. For the filter, select Custom Condition Logic Is Met and enter this condition logic: (1 OR 2 OR 3) AND (4 OR 5 OR 6 OR 7 OR 8).

  4. Define conditions 1 to 3 as Name Equals each of the three batch job name constants.

  5. Define conditions 4 to 8 as Status Equals Submitted, Queued, Queueing In Progress, In Progress, and Canceling. These five non-terminal statuses mean that a job is still running.

  6. Sort by CreatedDate in descending order.

  7. Return only the first record.

  8. Store the record Id in a variable such as LongRunningBatchJobId.

  9. Select "When no records are returned, set specified variables to null" so the variable is reliably null when no running job exists.

Add a Decision element to end the flow when a job is running

  1. Add a Decision element immediately after Get Batch Job Record. Name it Should skip today's run.

  2. Select Define Manually (Default) for the decision logic. Create an outcome labeled Existing job is still running (API name Existing_job_is_still_running) with Condition Requirements set to All Conditions Are Met (AND). Add one condition: Resource LongRunningBatchJobId, Operator Is Blank, Value False. This means the Id is not blank, so a job is still running. Connect this outcome to an end of the flow.

  3. Label the default outcome No existing job is running and connect it to the existing job, which is the Run Batch Job to Update Transaction Details element followed by the Wait for Next Transaction Details Update Batch Job element. The wait element has three paths: Batch Job Finished, Batch Job Timed Out, and Other (Default).

Example of Nonprofit Nightly Coordinate Gift Commitment Processing Job

A nonprofit's nightly Coordinate Gift Commitment Processing job starts at 1:00 AM. One night the job takes 26 hours because of a large volume of Commitments. At 1:00 AM the next day, the scheduled flow starts. The Get Batch Job Record element finds the earlier job with Status In Progress and stores its Id in LongRunningBatchJobId. The Decision element sees a non-blank value and ends the flow, so no second job starts.

Trade-off

When the existing job runs longer than 24 hours, the next nightly run is skipped, which means one day of processing is missed. Two downstream effects result:

  • Commitments with a daily schedule do not receive that day's Gift Transaction.

  • Some record creation is delayed by one day.

FAQs

Why does the Coordinate Gift Commitment Processing flow start a second batch job while the first is still running?

The wait nodes in the original Coordinate Gift Commitment Processing flow time out after 1 hour by default, and the nightly schedule starts a new run every 24 hours. If a Batch Management Job runs longer than either period, the flow starts another job while the first one is still active.

What is the recommended Batch Job Timed Out wait time for legacy Commitment Processing?

The recommended maximum is 8 hours. Set Offset Number and Offset Unit on the RESUME EVENT of the Batch Job Timed Out path in both wait nodes, so each Batch Management Job has up to 8 hours to run.

Which batch job statuses does the skip check treat as running?

The Get Records element in Change 2 treats Submitted, Queued, Queueing In Progress, In Progress, and Canceling as running. These are the non-terminal Batch Job statuses.

What happens to Commitments when a nightly run is skipped?

Commitments with a daily schedule miss that day's Gift Transaction, and some record creation is delayed by one day.

What if my org uses a modified Batch Management Job?

Update the existing batch job name constant in the flow with the name of the modified job, so the Get Records element can find it.

Número del artículo de conocimiento

005465972

 
Cargando
Salesforce Help | Article