10
// Use this for backlinks to workflow start: the started event is always EventId=1 (FirstEventID)
11
// and is never buffered, so a concrete EventReference is appropriate.
12
>
func GenerateStartedEventRefLink(namespace, workflowID, runID string) *commonpb.Link {
link_util.go
13
>
return &commonpb.Link{
14
>
Variant: &commonpb.Link_WorkflowEvent_{
15
>
WorkflowEvent: &commonpb.Link_WorkflowEvent{
16
>
Namespace: namespace,
17
>
WorkflowId: workflowID,
18
>
RunId: runID,
19
>
Reference: &commonpb.Link_WorkflowEvent_EventRef{
20
>
EventRef: &commonpb.Link_WorkflowEvent_EventReference{
21
>
EventId: common.FirstEventID,
22
>
EventType: enumspb.EVENT_TYPE_WORKFLOW_EXECUTION_STARTED,
23
>
},
24
>
},
25
>
},
26
>
},
27
>
}
28
>
}
29
30
// GenerateRequestIDRefLink builds a Link with a RequestIdReference.