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

  <descriptor>
    <name>com/emarson/lemonade/examples/mobank/NoUpdateIsRequired</name>
    <version>1.0</version>
    <description>
      Displays an information alert saying no updates are necessary.
    </description>
    <vendor>E-MARSON</vendor>
  </descriptor>
  
  <arguments>
    <argument key="updateNo" type="Integer"/>  
  </arguments>
  
  <path>
  
    <!-- INSTRUCTION --->
    
    <action name="no updates action">
      <type>general/bluelemon/code</type>
      <definition resultTo="result">
        
        <!-- set the new update number --->
        <blue:set node="com/emarson/lemonade/examples/mobank/UpdateNo"
                  location="permanent">

          <blue:argument type="int" contextKey="updateNo"/>
        </blue:set>

        <!-- go to the main screen --->        
        <blue:call node="com/emarson/lemonade/examples/mobank/MainScreen"
                         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 an info alert
        --->

        <blue:call object="alert" method="initialize">
          <blue:argument type="String" value="No updates"/>
          <blue:argument type="String" value="The content in your phone is up to date"/>
          <blue:argument type="byte" value="AlertType.INFO"/>
          <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>