sub dry_run {
my ($self, $hyp) = @_;
- my ($outer_hyp, @inner_events) = $self->inner_action->dry_run($hyp);
+ my ($outer_hyp, @inner_events) = $self->inner_action->dry_run(
+ $hyp->but(
+ action_applications => [ @{$hyp->action_applications}, $self ],
+ ),
+ );
my ($scope, @events) = $outer_hyp->scope->apply_updates(
DX::Update::SetValue->new(
target_path => $self->target_path,
$self->_fmt_action_generic(BindValue => $action, $meta);
}
+sub _fmt_action_setboundvalue {
+ my ($self, $action, $meta) = @_;
+ $self->_fmt_action_generic(SetBoundValue => $action, $meta);
+}
+
sub _fmt_action_generic {
my ($self, $name, $action, $meta) = @_;
my $path = join '.', map $self->_fmt($_, $meta), @{$action->target_path};
is => 'ro', isa => ArrayRef[Action], required => 1
);
+has action_applications => (
+ is => 'ro', isa => ArrayRef[Action], required => 1
+);
+
has action_policy => (is => 'ro', isa => ActionPolicy, required => 1);
sub head_proposition { shift->outstanding_propositions->[0] }
resolved_propositions => DX::ResolvedPropositionSet->new_empty,
outstanding_propositions => \@recheck,
actions => [],
+ action_applications => [],
action_policy => $ap,
);
resolved_propositions => DX::ResolvedPropositionSet->new_empty,
outstanding_propositions => $prop_seq->members,
actions => [],
+ action_applications => [],
action_policy => DX::ActionPolicy::Allow->new,
);
return DX::SearchState->new(
$hyp->but(
scope => $scope,
actions => [ @{$hyp->actions}, $self ],
+ action_applications => [ @{$hyp->action_applications}, $self ],
),
@events
);
);
my $old_qstate = $self->shell_state->current_query_state;
my $qstate = $old_qstate->with_additional_proposition($prop);
- my $old_action_count = @{
- $old_qstate->search_state->current_hypothesis->actions
+ my $old_application_count = @{
+ $old_qstate->search_state->current_hypothesis->action_applications
+ };
+ my @applications = @{
+ $qstate->search_state->current_hypothesis->action_applications
};
- my @actions = @{$qstate->search_state->current_hypothesis->actions};
push our @Result,
- map [ output => $_ ], @actions[$old_action_count..$#actions];
+ map [ output => $_ ],
+ @applications[$old_application_count..$#applications];
$self->_set_shell_state(
$self->shell_state->but(
current_query_state => $qstate