Add a typed InstanceStartedEvent dispatched inside the start transaction, after the instance is saved (so it has its id) and its variables are seeded, but before the start token is placed and the workflow runs.
This is the extension point for wiring an external entity to a process atomically with its start: a subscriber links the entity to the instance using the now-known instance id, the link commits with the start (a subscriber that throws rolls the start back), and it is in place before a synchronous run. It is the idiomatic, decoupled alternative to passing a callback into start(); a plain entity insert hook is too early, since it fires before the variables are seeded, so a subscriber could not tell which entity the run is for.
Issue fork orchestra-3605789
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
mably commented