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

  <descriptor>
    <name>com/emarson/lemonade/examples/mobank/_deployment/AddUpdateInfo</name>
    <version>1.0</version>
    <description>
      "Update info" is a text which is being shown to the user
      after processing some updates downloaded to the user's application.
      With this code it is possible to add some text to the 
      message.
      
      This process is used by installers of the updateable
      services (moAccount, moCheers, PIN).
    </description>
    <vendor>E-MARSON</vendor>
  </descriptor>

  <arguments>
    <argument key="text" type="String"/>
  </arguments>

  <path>

    <!-- INSTRUCTION --->

    <!-- Get the text from the session node, update and save --->
    <action name="update info">
      <type>general/bluelemon/code</type>
      <definition resultTo="result">
      
        <!-- get the text we have so far --->
        <blue:get node="com/emarson/lemonade/examples/mobank/UpdateInfo"
                  location="session" toVariable="text"/>

        
        <!-- update it - put two new lines between the two of the texts --->
        <blue:call manager="UtilsManager" method="concat" 
                   toVariable="text">

          <blue:argument type="variable" name="text"/>
          <blue:argument type="byte" value="10"/>
          <blue:argument type="byte" value="10"/>
          <blue:argument type="String" contextKey="text"/>
        </blue:call>
        
        <!-- and save --->
        <blue:set node="com/emarson/lemonade/examples/mobank/UpdateInfo"
                  location="session">

          <blue:argument type="variable" name="text"/>
        </blue:set>
                             
      </definition>
    </action>

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

  </path>

</process>