<?xml version="1.0" encoding="UTF-8"?>
<process xmlns:blue="http://www.e-marson.com/bluelemon">

  <descriptor>
    <name>com/emarson/lemonade/examples/mobank/AuthenticationFailed</name>
    <version>1.0</version>
    <description>
      Go back to the authentication screen and show the 
      error alert 'Login failed'.
    </description>
    <vendor>E-MARSON</vendor>
  </descriptor>

  <path>
  
    <!-- INSTRUCTION --->
  
    <action name="failure action">
      <type>general/bluelemon/code</type>
      <definition resultTo="result">

        <!-- go to the authentication screen --->
        <blue:call node="com/emarson/lemonade/examples/mobank/AuthenticationScreen"
                  location="@com/emarson/lemonade/examples/mobank"/>


        <!-- create the instance of the alert --->
        <blue:newInstance module="com/emarson/lemonade/bluelemon/midp1/Alert"
                          toVariable="alert"/>


        <!-- 
            set its title and text, mark this is a warning alert
        --->

        <blue:call object="alert" method="initialize">
          <blue:argument type="String" value="Login failed"/>
          <blue:argument type="String" value="Login failed - please try again."/>
          <blue:argument type="byte" value="AlertType.ERROR"/>
          <blue:argument type="short" value="1500"/>
        </blue:call>

        <!-- show it to the screen and return --->
        <blue:call manager="GeneralManager" method="setCurrent">
          <blue:argument type="variable" name="alert"/>
        </blue:call>

      </definition>
    </action>

    <finish name="done">
      <return>result</return>
    </finish>

  </path>

</process>