fix(infra): don't require the moved timer job to linger in verify-domain (S-14, refs #15)
All checks were successful
CI / lint (pull_request) Successful in 1m16s
CI / build (pull_request) Successful in 1m0s
CI / unit (pull_request) Successful in 1m9s
CI / frontend (pull_request) Successful in 2m30s
CI / mutation (pull_request) Successful in 5m22s
CI / verify-stack (pull_request) Successful in 7m15s
All checks were successful
CI / lint (pull_request) Successful in 1m16s
CI / build (pull_request) Successful in 1m0s
CI / unit (pull_request) Successful in 1m9s
CI / frontend (pull_request) Successful in 2m30s
CI / mutation (pull_request) Successful in 5m22s
CI / verify-stack (pull_request) Successful in 7m15s
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) <noreply@anthropic.com>
This commit is contained in:
@@ -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"
|
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)"
|
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; }
|
[ -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
|
# Move the timer job to an executable async job. Flowable's async executor (running in flowable-rest)
|
||||||
# without depending on the async executor's schedule.
|
# 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
|
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)"
|
async_id="$(flcurl "$fl_base/management/jobs?processInstanceId=$pid3" 2>/dev/null | first_job_id || true)"
|
||||||
[ -n "$async_id" ] || { echo "FAIL — timer job did not become an executable job" >&2; exit 1; }
|
if [ -n "$async_id" ]; then
|
||||||
flcurl -X POST "$fl_base/management/jobs/$async_id" -H 'Content-Type: application/json' -d '{"action":"execute"}' >/dev/null
|
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 ">> timer fired; the BeoordelingEscaleren token is parked for the domain worker"
|
||||||
|
|
||||||
echo ">> polling until the escalation worker reassigns the beoordeling to the teamlead"
|
echo ">> polling until the escalation worker reassigns the beoordeling to the teamlead"
|
||||||
|
|||||||
Reference in New Issue
Block a user