api.go ×3

Frontier kind: Joint frontier

unlabeled · c_c36fd2340f79

1 test · 8245 LOC · 258 files · introduces 1 test · 27 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
4 ranges27 lines · 2 files
Tests
1 test

Contains — complete concept membership

All code (extent)
1681 ranges8245 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: 27 introduced LOC across 4 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/history/api/startworkflow/api.go 25 introduced LOC · 3 ranges

Open complete file

464
465 switch {
466 > case errors.Is(err, api.ErrUseCurrentExecution): api.go
467 > return s.handleUseExistingWorkflowOnConflictOptions(
468 > ctx,
469 > workflowKey,
470 > currentWorkflowConditionFailed,
471 > currentWorkflowStartTime,
472 > )
473 case err != nil:
474 return nil, StartErr, err
682 currentWorkflowConditionFailed *persistence.CurrentWorkflowConditionFailedError,
683 currentWorkflowStartTime time.Time,
684 > ) (*historyservice.StartWorkflowExecutionResponse, StartOutcome, error) { api.go
685 > // Default response link is for the started event. If there is OnConflictOptions set, and it's
686 > // attaching the request ID, then the response link will be a request ID reference.
687 > responseLink := s.generateStartedEventRefLink(currentWorkflowConditionFailed.RunID)
688 >
689 > var err error
690 > onConflictOptions := s.request.StartRequest.GetOnConflictOptions()
691 > if onConflictOptions != nil {
692 requestID := ""
693 if onConflictOptions.AttachRequestId {
732 }
733
734 > switch err { api.go
735 > case nil:
736 > resp := &historyservice.StartWorkflowExecutionResponse{
737 > RunId: workflowKey.RunID,
738 > FirstExecutionRunId: currentWorkflowConditionFailed.FirstExecutionRunID,
739 > Started: false, // set explicitly for emphasis
740 > Status: enumspb.WORKFLOW_EXECUTION_STATUS_RUNNING,
741 > Link: responseLink,
742 > }
743 > return resp, StartReused, nil
744 case consts.ErrWorkflowCompleted:
745 // Need to re-evaluate the reuse policy because the previous check didn't lock the current
go.temporal.io/server/service/history/api/workflow_id_dedup.go 2 introduced LOC · 1 range

Open complete file

100 msg := "Workflow execution is already running. WorkflowId: %v, RunId: %v."
101 return nil, generateWorkflowAlreadyStartedError(msg, currentRequestIDs, workflowKey, currentFirstExecutionRunID)
102 > case enumspb.WORKFLOW_ID_CONFLICT_POLICY_USE_EXISTING: workflow_id_dedup.go
103 > return nil, ErrUseCurrentExecution
104 case enumspb.WORKFLOW_ID_CONFLICT_POLICY_TERMINATE_EXISTING:
105 return resolveDuplicateWorkflowStart(shardContext, currentWorkflowStartTime, workflowKey, namespaceEntry, newRunID, parentExecutionInfo, childWorkflowOnly)