7676pub ( super ) enum NexusOperationCommand {
7777 #[ display( "Start" ) ]
7878 Start { operation_id : String } ,
79+ #[ display( "StartSync" ) ]
80+ StartSync ,
7981 #[ display( "CancelBeforeStart" ) ]
8082 CancelBeforeStart ,
8183 #[ display( "Complete" ) ]
@@ -185,9 +187,7 @@ impl ScheduledEventRecorded {
185187 ca : NexusOperationCompletedEventAttributes ,
186188 ) -> NexusOperationMachineTransition < Completed > {
187189 NexusOperationMachineTransition :: commands ( [
188- NexusOperationCommand :: Start {
189- operation_id : String :: default ( ) ,
190- } ,
190+ NexusOperationCommand :: StartSync ,
191191 NexusOperationCommand :: Complete ( ca. result ) ,
192192 ] )
193193 }
@@ -197,9 +197,7 @@ impl ScheduledEventRecorded {
197197 fa : NexusOperationFailedEventAttributes ,
198198 ) -> NexusOperationMachineTransition < Failed > {
199199 NexusOperationMachineTransition :: commands ( [
200- NexusOperationCommand :: Start {
201- operation_id : String :: default ( ) ,
202- } ,
200+ NexusOperationCommand :: StartSync ,
203201 NexusOperationCommand :: Fail ( fa. failure . unwrap_or_else ( || Failure {
204202 message : "Nexus operation failed but failure field was not populated" . to_owned ( ) ,
205203 ..Default :: default ( )
@@ -212,9 +210,7 @@ impl ScheduledEventRecorded {
212210 ca : NexusOperationCanceledEventAttributes ,
213211 ) -> NexusOperationMachineTransition < Cancelled > {
214212 NexusOperationMachineTransition :: commands ( [
215- NexusOperationCommand :: Start {
216- operation_id : String :: default ( ) ,
217- } ,
213+ NexusOperationCommand :: StartSync ,
218214 NexusOperationCommand :: Cancel ( ca. failure . unwrap_or_else ( || Failure {
219215 message :
220216 "Nexus operation was cancelled but failure field was not populated" . to_owned ( ) ,
@@ -228,9 +224,7 @@ impl ScheduledEventRecorded {
228224 toa : NexusOperationTimedOutEventAttributes ,
229225 ) -> NexusOperationMachineTransition < TimedOut > {
230226 NexusOperationMachineTransition :: commands ( [
231- NexusOperationCommand :: Start {
232- operation_id : String :: default ( ) ,
233- } ,
227+ NexusOperationCommand :: StartSync ,
234228 NexusOperationCommand :: TimedOut ( toa. failure . unwrap_or_else ( || Failure {
235229 message : "Nexus operation timed out but failure field was not populated" . to_owned ( ) ,
236230 ..Default :: default ( )
@@ -412,6 +406,15 @@ impl WFMachinesAdapter for NexusOperationMachine {
412406 _: Option < EventInfo > ,
413407 ) -> Result < Vec < MachineResponse > , WFMachinesError > {
414408 Ok ( match my_command {
409+ NexusOperationCommand :: StartSync => {
410+ vec ! [
411+ ResolveNexusOperationStart {
412+ seq: self . shared_state. lang_seq_num,
413+ status: Some ( resolve_nexus_operation_start:: Status :: StartedSync ( true ) ) ,
414+ }
415+ . into( ) ,
416+ ]
417+ }
415418 NexusOperationCommand :: Start { operation_id } => {
416419 vec ! [
417420 ResolveNexusOperationStart {
0 commit comments