switch recheck to using an on_completion_step
[scpubgit/DX.git] / lib / DX / Step / EnterRecheck.pm
index c7dc447..3f5c643 100644 (file)
@@ -8,6 +8,8 @@ with 'DX::Role::Step';
 
 has proposition_list => (is => 'ro', required => 1);
 
+has on_completion_step => (is => 'ro', required => 1);
+
 sub apply_to {
   my ($self, $old_ss) = @_;
 
@@ -52,7 +54,9 @@ sub apply_to {
     is_solution_state => 0,
     on_exhaustion_step => undef,
     on_solution_step => DX::Step::CompleteRecheck->new(
-      resume_search_state => $old_ss,
+      resume_search_state => $old_ss->but(
+        next_step => $self->on_completion_step
+      ),
       was_recheck_for => $prop,
     ),
   );