Issue #3606696: Purge an instance's bound webform submissions when it is deleted

Fixes #3606696.

Problem

orchestra_interaction_webform binds each webform submission to its process instance as the webform source entity (OrchestraResumeHandler on first save), but never removed that submission when the instance was deleted. The binding is created here, yet its lifecycle was left to consumers, so a submission was orphaned when its instance went away and every consumer (e.g. the yoyaku booking stack) had to reimplement the cleanup.

Fix

  • Add InstanceSubmissionLocator (find / latest / delete submissions bound to an instance by source entity).
  • Add a generic #[Hook('orchestra_instance_predelete')] cleanup that purges them, so any consumer gets it without reimplementing.
  • Reuse the locator in WebformInteraction's return-visit reopen, so the source-entity lookup lives in one place.

Test

New kernel test: a submission bound to an instance is found by the locator and is purged when the instance is deleted. The existing resume-handler tests still pass (the reopen path was refactored onto the locator).

Merge request reports

Loading