<?xml version="1.0" encoding="UTF-8"?>
<flow xmlns="http://www.springframework.org/schema/webflow"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.springframework.org/schema/webflow
      http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd">

  <var name="mail" class="org.unitedfront2.domain.communication.Mail"/>

  <on-start>
    <set name="mail.to" value="simpleUserTable.findByCode('admin')"/>
    <set name="mail.subject" value="'Internal Error'"/>
  </on-start>

  <subflow-state id="form" subflow="mail.create-sub-flow">
    <input name="mail" value="mail"/>
    <input name="unmodifiableTo" value="mail.to"/>
    <input name="ignoreEmailFailure" value="true"/>
    <input name="pageTitleCode" value="'error.Error'"/>
    <input name="pageDescriptionCode" value="'error.Error.body'"/>
    <input name="formSubmitCode" value="'error.Error.submit'"/>
    <input name="statusCode" value="'500'"/>
    <transition on="finish" to="finish"/>
  </subflow-state>

  <end-state id="finish" view="error.ErrorMailSendSuccess"/>

</flow>
