From eeb2a9cb40daaf436c2e92e5c713bee9d7cdba02 Mon Sep 17 00:00:00 2001 From: Niek Otten Date: Fri, 17 Jul 2026 09:40:40 +0200 Subject: [PATCH] fix(infra): don't require the moved timer job to linger in verify-domain (S-14, refs #15) Flowable's async executor picks up the moved timer job and fires the boundary event before the check can GET /management/jobs, so requiring that async job to still exist raced and failed. The move alone fires the timer; the explicit execute is now a best-effort nudge that tolerates the job already being gone. Co-Authored-By: Claude Opus 4.8 (1M context) --- infra/run-domain-check.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/infra/run-domain-check.sh b/infra/run-domain-check.sh index 2dde71c..ef9f95d 100755 --- a/infra/run-domain-check.sh +++ b/infra/run-domain-check.sh @@ -216,12 +216,14 @@ before="$(flcurl "$fl_base/runtime/tasks/$task_id3/identitylinks" | candidate_gr echo ">> firing the 14-day boundary timer early via the management API" timer_id="$(flcurl "$fl_base/management/timer-jobs?processInstanceId=$pid3" | first_job_id)" [ -n "$timer_id" ] || { echo "FAIL — no timer job found for instance $pid3" >&2; exit 1; } -# Move the timer job to an executable async job, then execute it — firing the non-interrupting event -# without depending on the async executor's schedule. +# Move the timer job to an executable async job. Flowable's async executor (running in flowable-rest) +# then picks it up and fires the non-interrupting boundary event. It may run the job before we can +# look, so executing it explicitly is a best-effort nudge — tolerate the job already being gone. flcurl -X POST "$fl_base/management/timer-jobs/$timer_id" -H 'Content-Type: application/json' -d '{"action":"move"}' >/dev/null -async_id="$(flcurl "$fl_base/management/jobs?processInstanceId=$pid3" | first_job_id)" -[ -n "$async_id" ] || { echo "FAIL — timer job did not become an executable job" >&2; exit 1; } -flcurl -X POST "$fl_base/management/jobs/$async_id" -H 'Content-Type: application/json' -d '{"action":"execute"}' >/dev/null +async_id="$(flcurl "$fl_base/management/jobs?processInstanceId=$pid3" 2>/dev/null | first_job_id || true)" +if [ -n "$async_id" ]; then + flcurl -X POST "$fl_base/management/jobs/$async_id" -H 'Content-Type: application/json' -d '{"action":"execute"}' >/dev/null 2>&1 || true +fi echo ">> timer fired; the BeoordelingEscaleren token is parked for the domain worker" echo ">> polling until the escalation worker reassigns the beoordeling to the teamlead"