Class Ruote::Exp::ForgetExpression
In: lib/ruote/exp/fe_forget.rb
Parent: FlowExpression

Forgets all of its children.

This expression is somehow deprecated in favour of the :forget attribute that any expression understands.

  sequence do
    participant 'alpha'
    forget do
      sequence do
        participant 'bravo'
        participant 'charly'
      end
    end
    participant 'delta'
  end

In this example above, the flow goes from alpha to bravo and delta. The bravo-charly segment is independent of the main process flow. Charly‘s reply will be forgotten.

Now the equivalent process definition, but using the :forget attribute :

  sequence do
    participant 'alpha'
    sequence :forget => true do
      participant 'bravo'
      participant 'charly'
    end
    participant 'delta'
  end

This expression can be useful for fire-and-forget ‘parallelism’ in processes.

multi forget

Forget multiple children at once.

  forget do
    alice :task => 'take out garbage'
    bob :task => 'clean living room'
  end

The forget expression will reply immediately to its parent expression, it will thus not be cancellable (neither the children will be cancellable).

forget vs lose vs flank

forget : replies to parent expression immediately, is not cancellable (not reachable).

lose : never replies to the parent expression, is cancellable.

flank : immediately replies to the parent expression, is cancellable.

Methods

apply   reply  

Public Instance methods

[Validate]