mutable_state_impl.go ×6

Frontier kind: Joint frontier

unlabeled · c_00ceabeb7a1c

1 test · 8734 LOC · 258 files · introduces 1 test · 19 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
9 ranges19 lines · 2 files
Tests
1 test

Contains — complete concept membership

All code (extent)
1861 ranges8734 lines · 258 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: 19 introduced LOC across 9 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/history/workflow/mutable_state_impl.go 15 introduced LOC · 6 ranges

Open complete file

2495 }
2496
2497 > func (ms *MutableStateImpl) IsCancelRequested() bool { mutable_state_impl.go
2498 > return ms.executionInfo.CancelRequested
2499 > }
2500
2501 func (ms *MutableStateImpl) IsWorkflowCloseAttempted() bool {
4970 func (ms *MutableStateImpl) AddWorkflowExecutionCancelRequestedEvent(
4971 request *historyservice.RequestCancelWorkflowExecutionRequest,
4972 > ) (*historypb.HistoryEvent, error) { mutable_state_impl.go
4973 > opTag := tag.WorkflowActionWorkflowCancelRequested
4974 > if err := ms.checkMutability(opTag); err != nil {
4975 return nil, err
4976 }
4977
4978 > if ms.executionInfo.CancelRequested { mutable_state_impl.go
4979 ms.logWarn(mutableStateInvalidHistoryActionMsg, opTag,
4980 tag.WorkflowEventID(ms.GetNextEventID()),
4987 }
4988
4989 > event := ms.hBuilder.AddWorkflowExecutionCancelRequestedEvent(request) mutable_state_impl.go
4990 > if err := ms.ApplyWorkflowExecutionCancelRequestedEvent(event); err != nil {
4991 return nil, err
4992 }
4993
4994 // Set the CancelRequestID on the active cluster. This information is not part of the history event.
4995 > ms.executionInfo.CancelRequestId = request.CancelRequest.GetRequestId() mutable_state_impl.go
4996 > return event, nil
4997 }
4998
4999 func (ms *MutableStateImpl) ApplyWorkflowExecutionCancelRequestedEvent(
5000 _ *historypb.HistoryEvent,
5001 > ) error { mutable_state_impl.go
5002 > ms.executionInfo.CancelRequested = true
5003 > return nil
5004 > }
5005
5006 func (ms *MutableStateImpl) AddWorkflowExecutionCanceledEvent(
go.temporal.io/server/service/history/api/requestcancelworkflow/api.go 4 introduced LOC · 3 ranges

Open complete file

71 }
72
73 > isCancelRequested := mutableState.IsCancelRequested() api.go
74 > if isCancelRequested {
75 // since cancellation is idempotent
76 return &api.UpdateWorkflowAction{
80 }
81
82 > if _, err := mutableState.AddWorkflowExecutionCancelRequestedEvent(req); err != nil { api.go
83 return nil, err
84 }
85
86 > return api.UpdateWorkflowWithNewWorkflowTask, nil api.go
87 },
88 nil,