188
}
189
190
>
func newWorkflowTypeNamePrecondition(workflowTypeName string) connector.Precondition {
util.go
191
>
return func(subject any) bool {
192
>
193
>
if workflowTypeName == "" {
194
>
return true
195
>
}
196
197
>
fileName, ok := subject.(string)
util.go
198
>
if !ok {
199
return false
200
}
201
202
>
if strings.Contains(fileName, workflowTypeName) {
util.go
203
>
fileNameParts := strings.SplitN(fileName, "_", 5)
204
>
if len(fileNameParts) != 5 {
205
return true
206
}
207
>
return strings.Contains(fileName, fileNameParts[2])
util.go
208
}
209
211
}
212
}