workflow_task_completed_handler.go ×5

Frontier kind: Joint frontier

unlabeled · c_dc87563641a5

1 test · 3367 LOC · 151 files · introduces 1 test · 30 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
6 ranges30 lines · 2 files
Tests
1 test

Contains — complete concept membership

All code (extent)
471 ranges3367 lines · 151 files · Browse complete extent
All tests (intent)
1 testBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

1 test introduced at this concept.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

2 files ranked by introduced lines: 30 introduced LOC across 6 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/history/api/respondworkflowtaskcompleted/workflow_task_completed_handler.go 25 introduced LOC · 5 ranges

Open complete file

333 return nil, handler.handleCommandProtocolMessage(ctx, command.GetProtocolMessageCommandAttributes(), msgs)
334
336 > // TODO: need to handle migration between HSM and CHASM
337 >
338 > handlerOpts := chasmworkflow.CommandHandlerOptions{
339 > WorkflowTaskCompletedEventID: handler.workflowTaskCompletedID,
340 > }
341 > validator := commandValidator{sizeChecker: handler.sizeLimitChecker, commandType: command.GetCommandType()}
342 >
343 > // Try CHASM command handler first, fall back to HSM if not supported.
344 > handledByCHASM := false
345 > if handler.mutableState.ChasmEnabled() {
346 > if chasmHandler, ok := handler.chasmWorkflowRegistry.CommandHandler(command.GetCommandType()); ok {
347 > handler.mutableState.EnsureChasmWorkflowComponent(ctx)
348 > chasmWorkflow, chasmCtx, chasmErr := handler.mutableState.ChasmWorkflowComponent(ctx)
349 > if chasmErr != nil {
350 return nil, chasmErr
351 }
352 > err = chasmHandler(chasmCtx, chasmWorkflow, validator, command, handlerOpts) workflow_task_completed_handler.go
353 > // Fall back to the HSM handler either when the command type is not supported by CHASM (disabled
354 > // feature flag) or when the targeted entity is not owned by the CHASM tree (e.g. an operation
355 > // scheduled in HSM before the flag was flipped on).
356 > handledByCHASM = !errors.Is(err, chasmworkflow.ErrCommandNotSupported) &&
357 > !errors.Is(err, chasmworkflow.ErrCommandTargetNotFound)
358 }
359 }
360 > if !handledByCHASM { workflow_task_completed_handler.go
361 hsmHandler, ok := handler.commandHandlerRegistry.Handler(command.GetCommandType())
362 if !ok {
366 }
367
368 > var failWFTErr chasmworkflow.FailWorkflowTaskError workflow_task_completed_handler.go
369 > if errors.As(err, &failWFTErr) {
370 if failWFTErr.TerminateWorkflow {
371 return nil, handler.terminateWorkflow(failWFTErr.Cause, failWFTErr)
go.temporal.io/server/chasm/lib/workflow/workflow.go 5 introduced LOC · 1 range

Open complete file

45 _ chasm.MutableContext,
46 msPointer chasm.MSPointer,
47 > ) *Workflow { workflow.go
48 > return &Workflow{
49 > MSPointer: msPointer,
50 > }
51 > }
52
53 func (w *Workflow) LifecycleState(