last if $state->isa('DX::State');
if ($state->isa('DX::ObservationRequired')) {
if ($self->observation_policy->($state->observer)) {
- my ($type, $value) = $state->observer->run;
+ my @ob = $state->observer->run;
$state = $state->resume;
- $state->facts->{$type}->set_value($value);
+ while (my ($type, $value) = splice(@ob, 0, 2)) {
+ $state->facts->{$type}->set_value($value);
+ }
} else {
die "Observation refused";
}