lib/demiurge/intention.rb
# Most intentions will send a cancellation notice when they are
# cancelled. By default, this will include who cancelled the
# intention and why.
#
# If the cancellation info Hash includes "silent" with a true
# value, by default no notification will be sent out. This is to
# avoid an avalache of notifications for common cancelled
# intentions that happen nearly every tick. Examples include an
# agent's action queue being empty so it cancels its intention.
# These are normal operation and nobody is likely to need
# notification every tick that they didn't ask to do anything so
# they didn't.
#
# {#cancel_notification} can be overridden by child classes
# for more specific cancel notifications.
#
# @return [void]
# @since 0.0.1
Most intentions will send a cancellation notice when they are
cancelled. By default, this will include who cancelled the
intention and why.

If the cancellation info Hash includes "silent" with a true
value, by default no notification will be sent out. This is to
avoid an avalache of notifications for common cancelled
intentions that happen nearly every tick. Examples include an
agent's action queue being empty so it cancels its intention.
These are normal operation and nobody is likely to need
notification every tick that they didn't ask to do anything so
they didn't.

{#cancel_notification} can be overridden by child classes
for more specific cancel notifications.
Most intentions will send a cancellation notice when they are cancelled . By default this will include who cancelled the intention and why . If the cancellation info Hash includes " silent " with a true value by default no notification will be sent out . This is to avoid an avalache of notifications for common cancelled intentions that happen nearly every tick . Examples include an agent ' s action queue being empty so it cancels its intention . These are normal operation and nobody is likely to need notification every tick that they didn ' t ask to do anything so they didn ' t . { #cancel_notification } can be overridden by child classes for more specific cancel notifications .
def cancel_notification
      return if @cancelled_info && @cancelled_info["silent"]
      @engine.send_notification({
                                  :reason => @cancelled_reason,
                                  :by => @cancelled_by,
                                  :id => @intention_id,
                                  :intention_type => self.class.to_s,
                                  :info => @cancelled_info
                                },
                                type: Demiurge::Notifications::IntentionCancelled, zone: "admin", location: nil, actor: nil,
                                include_context: true)
      nil
    end
def cancel_notification return if @cancelled_info && @cancelled_info [ "silent" ] @engine . send_notification ( { :reason => @cancelled_reason , :by => @cancelled_by , :id => @intention_id , :intention_type => self . class . to_s , :info => @cancelled_info } , type : Demiurge :: Notifications :: IntentionCancelled , zone : "admin" , location : nil , actor : nil , include_context : true ) nil end
Most intentions will send a cancellation notice when they are
cancelled.
Most intentions will send a cancellation notice when they are cancelled .
None
void
since
None