mutable_state_impl.go ×5

Frontier kind: Code frontier

unlabeled · c_072ad6b9fcd4

3 tests · 9977 LOC · 265 files · introduces 0 tests · 35 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
8 ranges35 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
2144 ranges9977 lines · 265 files · Browse complete extent
All tests (intent)
3 testsBrowse 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.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

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

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

go.temporal.io/server/service/history/workflow/mutable_state_impl.go 23 introduced LOC · 5 ranges

Open complete file

6476 cause enumspb.StartChildWorkflowExecutionFailedCause,
6477 initiatedEventAttributes *historypb.StartChildWorkflowExecutionInitiatedEventAttributes,
6478 > ) (*historypb.HistoryEvent, error) { mutable_state_impl.go
6479 > opTag := tag.WorkflowActionChildWorkflowInitiationFailed
6480 > if err := ms.checkMutability(opTag); err != nil {
6481 return nil, err
6482 }
6483
6484 > ci, ok := ms.GetChildExecutionInfo(initiatedID) mutable_state_impl.go
6485 > if !ok || ci.StartedEventId != common.EmptyEventID {
6486 ms.logWarn(mutableStateInvalidHistoryActionMsg, opTag,
6487 tag.WorkflowEventID(ms.GetNextEventID()),
6492 }
6493
6494 > event := ms.hBuilder.AddStartChildWorkflowExecutionFailedEvent( mutable_state_impl.go
6495 > common.EmptyEventID, // TODO this field is not used at all
6496 > initiatedID,
6497 > cause,
6498 > namespace.Name(ci.Namespace),
6499 > namespace.ID(ci.NamespaceId),
6500 > initiatedEventAttributes.WorkflowId,
6501 > initiatedEventAttributes.WorkflowType,
6502 > initiatedEventAttributes.Control, // TODO this field is probably deprecated
6503 > )
6504 > if err := ms.ApplyStartChildWorkflowExecutionFailedEvent(event); err != nil {
6505 return nil, err
6506 }
6507 > return event, nil mutable_state_impl.go
6508 }
6509
6510 func (ms *MutableStateImpl) ApplyStartChildWorkflowExecutionFailedEvent(
6511 event *historypb.HistoryEvent,
6512 > ) error { mutable_state_impl.go
6513 > attributes := event.GetStartChildWorkflowExecutionFailedEventAttributes()
6514 > initiatedID := attributes.GetInitiatedEventId()
6515 >
6516 > return ms.DeletePendingChildExecution(initiatedID)
6517 > }
6518
6519 func (ms *MutableStateImpl) AddChildWorkflowExecutionCompletedEvent(
go.temporal.io/server/service/history/transfer_queue_active_task_executor.go 12 introduced LOC · 3 ranges

Open complete file

1412 initiatedAttributes *historypb.StartChildWorkflowExecutionInitiatedEventAttributes,
1413 failedCause enumspb.StartChildWorkflowExecutionFailedCause,
1415 > return t.updateWorkflowExecution(ctx, wfContext, true,
1416 > func(mutableState historyi.MutableState) error {
1417 > if !mutableState.IsWorkflowExecutionRunning() {
1418 return consts.ErrWorkflowCompleted
1419 }
1420
1421 > ci, ok := mutableState.GetChildExecutionInfo(task.InitiatedEventID) transfer_queue_active_task_executor.go
1422 > if !ok || ci.StartedEventId != common.EmptyEventID {
1423 return serviceerror.NewNotFound("Pending child execution not found.")
1424 }
1425
1426 > _, err := mutableState.AddStartChildWorkflowExecutionFailedEvent( transfer_queue_active_task_executor.go
1427 > task.InitiatedEventID,
1428 > failedCause,
1429 > initiatedAttributes,
1430 > )
1431 > return err
1432 })
1433 }