switch recheck to using an on_completion_step
Matt S Trout [Sun, 17 Jul 2016 18:44:02 +0000 (18:44 +0000)]
lib/DX/Step/CompleteRecheck.pm
lib/DX/Step/EnterRecheck.pm
lib/DX/Step/ResolveProposition.pm

index 35b805b..a00c796 100644 (file)
@@ -27,7 +27,6 @@ sub apply_to {
     current_hypothesis => $re_hyp->but(
       resolved_propositions => $rps
     ),
-    is_solution_state => 1
   );
 }
 
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,
     ),
   );
index 0cd04f1..ee5ff14 100644 (file)
@@ -87,6 +87,7 @@ sub _recheck_one {
   my $ss = $old_ss->but(
     next_step => DX::Step::EnterRecheck->new(
       proposition_list => [ $prop ],
+      on_completion_step => DX::Step::MarkAsSolution->new,
     ),
   );