workflow_handler.go ×8

Frontier kind: Joint frontier

unlabeled · c_a0cf7873f9fe

1 test · 4303 LOC · 207 files · introduces 1 test · 70 LOC · 3 files

Introduces — evidence that enters the hierarchy at this concept

Code
17 ranges70 lines · 3 files
Tests
1 test

Contains — complete concept membership

All code (extent)
751 ranges4303 lines · 207 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.

3 files ranked by introduced lines: 70 introduced LOC across 17 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/frontend/workflow_handler.go 33 introduced LOC · 8 ranges

Open complete file

778 }
779
780 > historyResp, err := wh.historyClient.ExecuteMultiOperation(ctx, historyReq) workflow_handler.go
781 > if err != nil {
782 var multiErr *serviceerror.MultiOperationExecution
783 if errors.As(err, &multiErr) {
789 }
790
791 > response, err := wh.convertToMultiOperationResponse(historyResp, namespaceName) workflow_handler.go
792 > if err != nil {
793 return nil, err
794 }
795 > return response, nil workflow_handler.go
796 }
797
831 }
832
833 > return &historyservice.ExecuteMultiOperationRequest{ workflow_handler.go
834 > NamespaceId: namespaceID.String(),
835 > WorkflowId: lastWorkflowID,
836 > Operations: ops,
837 > }, nil
838 }
839
910 historyResp *historyservice.ExecuteMultiOperationResponse,
911 namespaceName namespace.Name,
912 > ) (*workflowservice.ExecuteMultiOperationResponse, error) { workflow_handler.go
913 > resp := &workflowservice.ExecuteMultiOperationResponse{
914 > Responses: make([]*workflowservice.ExecuteMultiOperationResponse_Response, len(historyResp.Responses)),
915 > }
916 > for i, op := range historyResp.Responses {
917 > var opResp *workflowservice.ExecuteMultiOperationResponse_Response
918 > if historyStartResp := op.GetStartWorkflow(); historyStartResp != nil {
919 > startResp, err := wh.convertToStartWorkflowExecutionResponse(historyStartResp, namespaceName)
920 > if err != nil {
921 return nil, err
922 }
923 > opResp = &workflowservice.ExecuteMultiOperationResponse_Response{ workflow_handler.go
924 > Response: &workflowservice.ExecuteMultiOperationResponse_Response_StartWorkflow{
925 > StartWorkflow: startResp,
926 > },
927 > }
928 > } else if histUpdateResp := op.GetUpdateWorkflow(); histUpdateResp != nil {
929 > opResp = &workflowservice.ExecuteMultiOperationResponse_Response{
930 > Response: &workflowservice.ExecuteMultiOperationResponse_Response_UpdateWorkflow{
931 > UpdateWorkflow: histUpdateResp.GetResponse(),
932 > },
933 > }
934 > } else {
935 return nil, serviceerror.NewInternalf("unexpected operation result: %T", op.Response)
936 }
937 > resp.Responses[i] = opResp workflow_handler.go
938 }
939 > return resp, nil workflow_handler.go
940 }
941
go.temporal.io/server/api/historyservice/v1/request_response.pb.go 24 introduced LOC · 6 ranges

Open complete file

1124 }
1125
1126 > func (x *ExecuteMultiOperationRequest) GetOperations() []*ExecuteMultiOperationRequest_Operation { request_response.pb.go
1127 > if x != nil {
1128 > return x.Operations
1129 > }
1130 return nil
1131 }
7334 }
7335
7336 > func (x *UpdateWorkflowExecutionResponse) GetResponse() *v1.UpdateWorkflowExecutionResponse { request_response.pb.go
7337 > if x != nil {
7338 > return x.Response
7339 > }
7340 return nil
7341 }
10349 }
10350
10351 > func (x *ExecuteMultiOperationRequest_Operation) GetStartWorkflow() *StartWorkflowExecutionRequest { request_response.pb.go
10352 > if x != nil {
10353 > if x, ok := x.Operation.(*ExecuteMultiOperationRequest_Operation_StartWorkflow); ok {
10354 > return x.StartWorkflow
10355 > }
10356 }
10357 return nil
10433 }
10434
10435 > func (x *ExecuteMultiOperationResponse_Response) GetStartWorkflow() *StartWorkflowExecutionResponse { request_response.pb.go
10436 > if x != nil {
10437 > if x, ok := x.Response.(*ExecuteMultiOperationResponse_Response_StartWorkflow); ok {
10438 > return x.StartWorkflow
10439 > }
10440 }
10441 > return nil request_response.pb.go
10442 }
10443
10444 > func (x *ExecuteMultiOperationResponse_Response) GetUpdateWorkflow() *UpdateWorkflowExecutionResponse { request_response.pb.go
10445 > if x != nil {
10446 > if x, ok := x.Response.(*ExecuteMultiOperationResponse_Response_UpdateWorkflow); ok {
10447 > return x.UpdateWorkflow
10448 > }
10449 }
10450 return nil
go.temporal.io/server/api/historyservicemock/v1/service_grpc.pb.mock.go 13 introduced LOC · 3 ranges

Open complete file

305
306 // ExecuteMultiOperation mocks base method.
307 > func (m *MockHistoryServiceClient) ExecuteMultiOperation(ctx context.Context, in *historyservice.ExecuteMultiOperationRequest, opts ...grpc.CallOption) (*historyservice.ExecuteMultiOperationResponse, error) { service_grpc.pb.mock.go
308 > m.ctrl.T.Helper()
309 > varargs := []any{ctx, in}
310 > for _, a := range opts {
311 varargs = append(varargs, a)
312 }
313 > ret := m.ctrl.Call(m, "ExecuteMultiOperation", varargs...) service_grpc.pb.mock.go
314 > ret0, _ := ret[0].(*historyservice.ExecuteMultiOperationResponse)
315 > ret1, _ := ret[1].(error)
316 > return ret0, ret1
317 }
318
319 // ExecuteMultiOperation indicates an expected call of ExecuteMultiOperation.
320 > func (mr *MockHistoryServiceClientMockRecorder) ExecuteMultiOperation(ctx, in any, opts ...any) *gomock.Call { service_grpc.pb.mock.go
321 > mr.mock.ctrl.T.Helper()
322 > varargs := append([]any{ctx, in}, opts...)
323 > return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExecuteMultiOperation", reflect.TypeOf((*MockHistoryServiceClient)(nil).ExecuteMultiOperation), varargs...)
324 > }
325
326 // ForceDeleteWorkflowExecution mocks base method.