Commit d24901b
committed
Support dynamic (catch-all) workflows
Allow a PHP worker to register a dynamic (catch-all) workflow, invoked for
any workflow type name that has no statically registered handler. The host
already registers a single shared WorkflowDefinitionFactory proxy (wDef)
under each declared name; when a workflow is declared dynamic, register that
same proxy via worker.RegisterDynamicWorkflow instead (it forwards the real
workflow type name to PHP), and skip named registration for it.
WorkflowInfo gains a Dynamic field, populated from the "dynamic" key the PHP
GetWorkerInfo handshake emits.
This enables Dynamic Workflow support in the PHP SDK (PHP and TypeScript are
the only SDKs without it). Companion change: temporalio/sdk-php.
Depends on temporalio/sdk-go#2449 (issue #2448): RegisterDynamicWorkflow
accepts the factory, but go-sdk's dynamic execution path panics on it until
that fix ships. A go.temporal.io/sdk bump to the first release containing it
is required before dynamic dispatch runs.1 parent 0818562 commit d24901b
2 files changed
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
152 | 170 | | |
153 | 171 | | |
154 | 172 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
36 | 39 | | |
37 | 40 | | |
38 | 41 | | |
| |||
0 commit comments