mutable_state_impl.go ×5

Frontier kind: Code frontier

unlabeled · c_3abf84d56974

2 tests · 9931 LOC · 265 files · introduces 0 tests · 36 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
8 ranges36 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
2134 ranges9931 lines · 265 files · Browse complete extent
All tests (intent)
2 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: 36 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 21 introduced LOC · 5 ranges

Open complete file

5143 runID string,
5144 cause enumspb.CancelExternalWorkflowExecutionFailedCause,
5145 > ) (*historypb.HistoryEvent, error) { mutable_state_impl.go
5146 > opTag := tag.WorkflowActionExternalWorkflowCancelFailed
5147 > if err := ms.checkMutability(opTag); err != nil {
5148 return nil, err
5149 }
5150
5151 > _, ok := ms.GetRequestCancelInfo(initiatedID) mutable_state_impl.go
5152 > if !ok {
5153 ms.logWarn(mutableStateInvalidHistoryActionMsg, opTag,
5154 tag.WorkflowEventID(ms.GetNextEventID()),
5158 }
5159
5160 > event := ms.hBuilder.AddRequestCancelExternalWorkflowExecutionFailedEvent( mutable_state_impl.go
5161 > common.EmptyEventID, // TODO this field is not used at all
5162 > initiatedID,
5163 > targetNamespace,
5164 > targetNamespaceID,
5165 > workflowID,
5166 > runID,
5167 > cause,
5168 > )
5169 > if err := ms.ApplyRequestCancelExternalWorkflowExecutionFailedEvent(event); err != nil {
5170 return nil, err
5171 }
5172 > return event, nil mutable_state_impl.go
5173 }
5174
5175 func (ms *MutableStateImpl) ApplyRequestCancelExternalWorkflowExecutionFailedEvent(
5176 event *historypb.HistoryEvent,
5177 > ) error { mutable_state_impl.go
5178 > initiatedID := event.GetRequestCancelExternalWorkflowExecutionFailedEventAttributes().GetInitiatedEventId()
5179 >
5180 > return ms.DeletePendingRequestCancel(initiatedID)
5181 > }
5182
5183 func (ms *MutableStateImpl) AddSignalExternalWorkflowExecutionInitiatedEvent(
go.temporal.io/server/service/history/transfer_queue_active_task_executor.go 15 introduced LOC · 3 ranges

Open complete file

1525 targetRunID string,
1526 failedCause enumspb.CancelExternalWorkflowExecutionFailedCause,
1528 > return t.updateWorkflowExecution(ctx, wfContext, true,
1529 > func(mutableState historyi.MutableState) error {
1530 > if !mutableState.IsWorkflowExecutionRunning() {
1531 return consts.ErrWorkflowCompleted
1532 }
1533
1534 > _, ok := mutableState.GetRequestCancelInfo(task.InitiatedEventID) transfer_queue_active_task_executor.go
1535 > if !ok {
1536 return workflow.ErrMissingRequestCancelInfo
1537 }
1538
1539 > _, err := mutableState.AddRequestCancelExternalWorkflowExecutionFailedEvent( transfer_queue_active_task_executor.go
1540 > task.InitiatedEventID,
1541 > targetNamespace,
1542 > targetNamespaceID,
1543 > targetWorkflowID,
1544 > targetRunID,
1545 > failedCause,
1546 > )
1547 > return err
1548 })
1549 }