# File lib/ruote/exp/fe_concurrence.rb, line 468
    def reply_to_parent(_workitem)

      #
      # remaining 'wait' case first

      if h.remaining == 'wait'

        if workitem_count >= count_list_size
          #
          # all children have replied

          h.workitem = final_merge

          do_unpersist && super(h.workitem, false)

        elsif h.children_cancelled == nil
          #
          # the concurrence is over, let's cancel all children and then
          # wait for them

          h.children_cancelled = true
          do_persist

          h.children.each { |i| @context.storage.put_msg('cancel', 'fei' => i) }
        end

        return
      end

      #
      # remaining 'forget' and 'cancel' cases

      h.workitem = final_merge

      if h.children.empty?

        do_unpersist && super(h.workitem, false)

      elsif h.remaining == 'cancel'

        if do_unpersist

          super(h.workitem, false)

          h.children.each { |i| @context.storage.put_msg('cancel', 'fei' => i) }
        end

      else # h.remaining == 'forget'

        h.variables = compile_variables
        h.forgotten = true

        do_persist && super(h.workitem, false)
      end
    end