# File lib/ruote/exp/fe_subprocess.rb, line 176
    def apply

      return invoke_engine_participant if attribute(:engine)

      ref = attribute(:ref) || attribute_text

      raise "no subprocess referred in #{tree}" unless ref

      pos, subtree = Ruote.lookup_subprocess(self, ref)

      fs, vs = compile_atts.partition { |k, v| k.match(/^f(ield)?:./) }

      fields = h.applied_workitem['fields']
      fs.each { |k, v| Ruote.set(fields, k.split(':', 2).last, v) }

      vars = Hash[vs.collect { |k, v| [ k.split(':', 2).last, v ] }]

      vars.merge!('tree' => tree_children.first)
        # NOTE : we're taking the first child here...

      launch_sub(pos, subtree, :variables => vars)
    end