Method: Roby::Transaction#removing_plan_relation

Defined in:
lib/roby/transaction.rb

#removing_plan_relation(parent, child, relations) ⇒ void

This method returns an undefined value.

Hook called when a relation is removed between plan objects that are present in the transaction

If the removed relation is still present in the transaction as well, it invalidates the transaction and calls DecisionControl#removing_plan_relation(self, parent, child, relations, info)

for further action

Parameters:

  • parent (PlanObject)

    the parent object represented by its proxy in self

  • child (PlanObject)

    the child object represented by its proxy in self

  • relations (Array<Relations::Graph>)

    the graphs in which a relation has been added



1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
# File 'lib/roby/transaction.rb', line 1003

def removing_plan_relation(parent, child, relations)
    present_relations = relations.find_all do |rel|
        parent.child_object?(child, rel)
    end

    unless present_relations.empty?
        invalidate(
            "plan removed a relation #{parent} -> #{child} in #{relations}"
        )
        control.removing_plan_relation(self, parent, child, relations)
    end

    nil
end