def render_template(template, flow_expression, workitem)

      template = (File.read(template) rescue nil) if is_a_file?(template)

      return render_default_template(workitem) unless template

      template = template.to_s
      workitem = workitem.to_h if workitem.respond_to?(:to_h)

      @context.dollar_sub.s(template, flow_expression, workitem)
    end
def render_template(template, flow_expression, workitem)

      template = (File.read(template) rescue nil) if is_a_file?(template)

      return render_default_template(workitem) unless template

      template = template.to_s
      workitem = workitem.to_h if workitem.respond_to?(:to_h)

      @context.dollar_sub.s(template, flow_expression, workitem)
    end
Do the rendering.