Summary
When the casehub-engine HumanTaskTarget binding references a multi-instance WorkItem template, each spawned child needs its own callerRef so WorkItemLifecycleEvent completions route back to the correct PlanItem in the case engine.
Currently WorkItemTemplateService.instantiate() with a multi-instance template delegates to MultiInstanceSpawnService.createGroup(), which has no callerRef parameter. The callerRef is silently ignored with a warning (see #165).
What needs to happen
MultiInstanceSpawnService.createGroup() needs a callerRef parameter (or an overload)
- Each child WorkItem in the group should carry
callerRef so its completion event routes correctly
- The engine's
HumanTaskScheduleHandler needs to decide how to handle M-of-N completion routing — when M children complete, which PlanItem transitions? Likely the parent binding's planItemId, using MultiInstanceCoordinator to fire the parent transition
Dependencies
Complexity
Non-trivial. Requires coordination between casehub-work multi-instance completion semantics and casehub-engine PlanItem transitions. Design session needed before implementation.
Summary
When the casehub-engine HumanTaskTarget binding references a multi-instance WorkItem template, each spawned child needs its own callerRef so WorkItemLifecycleEvent completions route back to the correct PlanItem in the case engine.
Currently
WorkItemTemplateService.instantiate()with a multi-instance template delegates toMultiInstanceSpawnService.createGroup(), which has no callerRef parameter. The callerRef is silently ignored with a warning (see #165).What needs to happen
MultiInstanceSpawnService.createGroup()needs a callerRef parameter (or an overload)callerRefso its completion event routes correctlyHumanTaskScheduleHandlerneeds to decide how to handle M-of-N completion routing — when M children complete, which PlanItem transitions? Likely the parent binding's planItemId, usingMultiInstanceCoordinatorto fire the parent transitionDependencies
Complexity
Non-trivial. Requires coordination between casehub-work multi-instance completion semantics and casehub-engine PlanItem transitions. Design session needed before implementation.