def current_tree(fexp=root_expression)

      return nil unless fexp

      t = Ruote.fulldup(fexp.tree)

      fexp.children.each do |cfei|

        cexp = fexp(cfei)
        next unless cexp

        ct = current_tree(cexp)

        #trigger = ct[1]['_triggered']
        #if trigger && trigger != 'on_re_apply'
        #    #
        #  # ignore any on_cancel / on_error / ...
        #  #
        #  #ct = t[2][cexp.child_id]
        #  # loses any change in the re_applied tree
        #    #
        #  # just flag the original tree as _triggered
        #  # loses any change in the re_applied tree
        #  #
        #  #ct = t[2][cexp.child_id]
        #  #ct[1]['_triggered'] = trigger
        #    #
        #  # extracts the new tree, discards the layers around it
        #  #
        #  ot = t[2][cexp.child_id]
        #  ct = ct[2][0][2][0]
        #  ct[1]['_triggered'] = [ trigger, ot[1][trigger] ].join('/')
        #end
          # return the real current tree, do not tweak it!

        t[2][cexp.child_id] = ct
      end

      t
    end
def current_tree(fexp=root_expression)

      return nil unless fexp

      t = Ruote.fulldup(fexp.tree)

      fexp.children.each do |cfei|

        cexp = fexp(cfei)
        next unless cexp

        ct = current_tree(cexp)

        #trigger = ct[1]['_triggered']
        #if trigger && trigger != 'on_re_apply'
        #    #
        #  # ignore any on_cancel / on_error / ...
        #  #
        #  #ct = t[2][cexp.child_id]
        #  # loses any change in the re_applied tree
        #    #
        #  # just flag the original tree as _triggered
        #  # loses any change in the re_applied tree
        #  #
        #  #ct = t[2][cexp.child_id]
        #  #ct[1]['_triggered'] = trigger
        #    #
        #  # extracts the new tree, discards the layers around it
        #  #
        #  ot = t[2][cexp.child_id]
        #  ct = ct[2][0][2][0]
        #  ct[1]['_triggered'] = [ trigger, ot[1][trigger] ].join('/')
        #end
          # return the real current tree, do not tweak it!

        t[2][cexp.child_id] = ct
      end

      t
    end
Returns the current version of the process definition tree. If no
 manipulation (gardening) was performed on the tree, this method yields
 the same result as the #original_tree method.

 Returns nil if there are no expressions (happens in the case of an
 orphan workitem)