166
func newWorkflowIDPrecondition(workflowID string) connector.Precondition {
167
return func(subject any) bool {
169
>
if workflowID == "" {
170
>
return true
171
>
}
172
173
>
fileName, ok := subject.(string)
util.go
174
>
if !ok {
175
return false
176
}
177
178
>
if strings.Contains(fileName, workflowID) {
util.go
179
>
fileNameParts := strings.SplitN(fileName, "_", 5)
180
>
if len(fileNameParts) != 5 {
181
return true
182
}
183
>
return strings.Contains(fileName, fileNameParts[3])
util.go
184
}
185
187
}
188
}