Skip to content

Signal Action Failure

Definition

<signal_action_failure reason="failure_reason"/>

The plan item that will make a perform plan stop running, indicating failure through the output of a "report(action_status(some_action, aborted(failure_reason)))" move.

Attribute Type Description
reason string An identifier which will be used to identify the report move that will be generated
action string The action that will be stopped from executing. Optional.

Parents

Children

None.

Behaviour

The <signal_action_failure reason="some_failure_reason"/> will make TDM treat the perform goal of the containing plan as failed. This means that the remains of the plan (if any) will not be executed, and that a report move indicating goal abortion ("report(action_status(some_action, aborted(some_failure_reason)))") will be output.

The failure reason is a snake cased string, which doesn't need to be declared.

If a particular action is specified, then that action will be stopped with a report being generated. The containing plan will continue to execute.

Examples

Signal Action Failure element indicating the failure reason of "no_money"

<signal_action_failure reason="no_money"/>

Goal that will always fail with the reason "phone_not_avalable"

<goal type="perform" action="action_that_always_fail">
    <plan>
        <signal_action_failure reason="phone_not_available"/>
    </plan>
</goal>

Signal Action Failure element indicating the failure reason of "no_money" for the action "some_action"

<signal_action_failure reason="no_money" action="some_action"/>

Goal that will fail the action "call_someone" with the reason "phone_not_avalable"

The cancel_calling action itself needs to be stopped using signal_action_completion.

<goal type="perform" action="cancel_calling">
    <plan>
        <signal_action_failure action="call_someone" reason="phone_not_available"/>
        <signal_action_completion/>
    </plan>
</goal>