File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -2242,6 +2242,17 @@ func createRecordWorkflowExecutionStartedRequest(
22422242 "Header_context_key" : contextValueJSONString ,
22432243 }
22442244 }
2245+ // Add CronSchedule to search attributes if it's a cron workflow
2246+ if len (executionInfo .CronSchedule ) > 0 {
2247+ cronScheduleBytes , err := json .Marshal (executionInfo .CronSchedule )
2248+ if err != nil {
2249+ t .Fatal (err )
2250+ }
2251+ if searchAttributes == nil {
2252+ searchAttributes = make (map [string ][]byte )
2253+ }
2254+ searchAttributes [definition .CronSchedule ] = cronScheduleBytes
2255+ }
22452256 return & persistence.RecordWorkflowExecutionStartedRequest {
22462257 Domain : domainName ,
22472258 DomainUUID : taskInfo .DomainID ,
@@ -2293,6 +2304,17 @@ func createRecordWorkflowExecutionClosedRequest(
22932304 "Header_context_key" : contextValueJSONString ,
22942305 }
22952306 }
2307+ // Add CronSchedule to search attributes if it's a cron workflow
2308+ if len (executionInfo .CronSchedule ) > 0 {
2309+ cronScheduleBytes , err := json .Marshal (executionInfo .CronSchedule )
2310+ if err != nil {
2311+ t .Fatal (err )
2312+ }
2313+ if searchAttributes == nil {
2314+ searchAttributes = make (map [string ][]byte )
2315+ }
2316+ searchAttributes [definition .CronSchedule ] = cronScheduleBytes
2317+ }
22962318 return & persistence.RecordWorkflowExecutionClosedRequest {
22972319 Domain : domainName ,
22982320 DomainUUID : taskInfo .DomainID ,
You can’t perform that action at this time.
0 commit comments