func (ms *MutableStateImpl) GetSignalInfo(
initiatedEventID int64,
ri, ok := ms.pendingSignalInfoIDs[initiatedEventID]
return ri, ok
}
// GetSignalExternalInitiatedEvent get the details about signal external workflow
Frontier kind: Code frontier
unlabeled · c_81a4c1e5dd72
8 tests · 7481 LOC · 237 files · introduces 0 tests · 68 LOC · 4 files
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.
Every exact file and test below is linked only from the concept that introduces it.
go.temporal.io/server/service/history/historybuilder/TestHistoryBuilder_AddDifferentEvents/When_WorkflowTaskCompletedEvent_added_it_will_be_placed_in_memLatestBatchgo.temporal.io/server/service/history/historybuilder/TestHistoryBuilder_AddDifferentEvents_WorkflowFinishEvents/When_WorkflowTaskCompletedEvent_added_it_will_be_placed_in_memLatestBatchgo.temporal.io/server/service/history/historybuilder/TestHistoryBuilder_AddDifferentEvents/When_SignalExternalWorkflowExecutionInitiatedEvent_added_it_will_be_placed_in_memLatestBatchgo.temporal.io/server/service/history/historybuilder/TestHistoryBuilder_AddDifferentEvents_WorkflowFinishEvents/When_SignalExternalWorkflowExecutionInitiatedEvent_added_it_will_be_placed_in_memLatestBatchgo.temporal.io/server/service/history/historybuilder/TestHistoryBuilder_AddDifferentEvents/When_WorkflowTaskScheduledEvent_added_it_will_be_placed_in_memLatestBatchgo.temporal.io/server/service/history/historybuilder/TestHistoryBuilder_AddDifferentEvents_AssignmentEventId/Adding_batched_event_will_set_event_id_to_next_event_id_allocated_by_HistoryBuildergo.temporal.io/server/service/history/historybuilder/TestHistoryBuilder_AddDifferentEvents_WorkflowFinishEvents/When_WorkflowTaskScheduledEvent_added_go.temporal.io/server/service/history/historybuilder/TestHistoryBuilder_AddDifferentEvents/When_WorkflowTaskStartedEvent_added_it_will_be_placed_in_memLatestBatchgo.temporal.io/server/service/history/historybuilder/TestHistoryBuilder_AddDifferentEvents_WorkflowFinishEvents/When_WorkflowTaskStartedEvent_added_go.temporal.io/server/common/persistence/client/TestQuotasSuite/TestAPITypeCallOriginPriorityOverrideMappinggo.temporal.io/server/common/persistence/client/TestQuotasSuite/TestBackgroundTypeAPIPriorityOverrideMappinggo.temporal.io/server/common/persistence/client/TestQuotasSuite/TestCallerTypeDefaultPriorityMappinggo.temporal.io/server/common/persistence/client/TestQuotasSuite/TestRequestPrioritiesOrderedEvery collected test enters the hierarchy at exactly one concept.
No tests are introduced at this concept. Its intent tests are introduced by other concepts.
Every collected source range enters the hierarchy at exactly one concept.
4 files ranked by introduced lines: 68 introduced LOC across 13 ranges. Expand a file to inspect source; the > gutter marks introduced lines.
func (ms *MutableStateImpl) GetSignalInfo(
initiatedEventID int64,
ri, ok := ms.pendingSignalInfoIDs[initiatedEventID]
return ri, ok
}
// GetSignalExternalInitiatedEvent get the details about signal external workflow
command *commandpb.SignalExternalWorkflowExecutionCommandAttributes,
targetNamespaceID namespace.ID,
opTag := tag.WorkflowActionExternalWorkflowSignalInitiated
if err := ms.checkMutability(opTag); err != nil {
return nil, nil, err
}
event, batchID := ms.hBuilder.AddSignalExternalWorkflowExecutionInitiatedEvent(workflowTaskCompletedEventID, command, targetNamespaceID)
mutable_state_impl.go
si, err := ms.ApplySignalExternalWorkflowExecutionInitiatedEvent(batchID, event, signalRequestID)
if err != nil {
return nil, nil, err
}
// TODO merge active & passive task generation
event,
); err != nil {
return nil, nil, err
}
}
event *historypb.HistoryEvent,
signalRequestID string,
// TODO: Consider also writing signalRequestID to history event
initiatedEventID := event.GetEventId()
si := &persistencespb.SignalInfo{
Version: event.GetVersion(),
InitiatedEventBatchId: batchID,
InitiatedEventId: initiatedEventID,
RequestId: signalRequestID,
}
ms.pendingSignalInfoIDs[si.InitiatedEventId] = si
ms.updateSignalInfos[si.InitiatedEventId] = si
ms.approximateSize += si.Size() + int64SizeBytes
ms.executionInfo.SignalExternalCount++
ms.writeEventToCache(event)
return si, nil
}
func (ms *MutableStateImpl) AddUpsertWorkflowSearchAttributesEvent(
func (r *TaskGeneratorImpl) GenerateSignalExternalTasks(
event *historypb.HistoryEvent,
attr := event.GetSignalExternalWorkflowExecutionInitiatedEventAttributes()
scheduledEventID := event.GetEventId()
version := event.GetVersion()
targetWorkflowID := attr.GetWorkflowExecution().GetWorkflowId()
targetRunID := attr.GetWorkflowExecution().GetRunId()
targetChildOnly := attr.GetChildWorkflowOnly()
_, ok := r.mutableState.GetSignalInfo(scheduledEventID)
if !ok {
return serviceerror.NewInternalf("it could be a bug, cannot get pending signal external workflow: %v", scheduledEventID)
}
targetNamespaceID, err := r.getTargetNamespaceID(namespace.Name(attr.GetNamespace()), namespace.ID(attr.GetNamespaceId()))
task_generator.go
if err != nil {
return err
}
// TaskID, VisibilityTimestamp is set by shard
WorkflowKey: r.mutableState.GetWorkflowKey(),
TargetNamespaceID: targetNamespaceID.String(),
TargetWorkflowID: targetWorkflowID,
TargetRunID: targetRunID,
TargetChildWorkflowOnly: targetChildOnly,
InitiatedEventID: scheduledEventID,
Version: version,
})
return nil
}
)
return NewImmediateKey(u.TaskID)
}
func (u *SignalExecutionTask) GetVersion() int64 {
}
return u.VisibilityTimestamp
}
func (u *SignalExecutionTask) SetVisibilityTime(timestamp time.Time) {
}
return enumsspb.TASK_TYPE_TRANSFER_SIGNAL_EXECUTION
}
func (u *SignalExecutionTask) String() string {
case TASK_TYPE_TRANSFER_START_CHILD_EXECUTION:
return "TransferStartChildExecution"
return "TransferSignalExecution"
case TASK_TYPE_TRANSFER_RESET_WORKFLOW: