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

  <descriptor>
    <name>com/emarson/lemonade/examples/helloWorld/_deployment/Installer</name>
    <version>1.0</version>
    <description>
      The result Bluelemon instruction does the following:
       - sets a STARTUP_INSTRUCTION to call the HelloWorldScreen node,
       - calls the HelloWorldScreen node.
    </description>
    <vendor>E-MARSON</vendor>
  </descriptor>

  <path>
  
    <!-- prepare the HelloWorldScreen --->
    <subprocess name="HelloWorld screen">
      <source>com/emarson/lemonade/examples/helloWorld/HelloWorldScreen</source>
      <resultTo>helloWorldScreen</resultTo>
    </subprocess> 


    <!-- 'PERMANENT' AND 'SESSION' UPDATES ---> 

    <!-- update the STARTUP_INSTRUCTION node to HelloWorldScreen --->
    <action name="update STARTUP_INSTRUCTION">
      <type>general/bluelemon/code</type>
      <definition resultTo="startupUpdate">

        <blue:set node="STARTUP_INSTRUCTION" location="permanent">
          <blue:argument type="byteArr" contextKey="helloWorldScreen"/>
        </blue:set>

      </definition>
    </action>


    <!-- POST-INSTALL INSTRUCTION ---> 
    
    <!-- call the STARTUP_INSTRUCTION node --->
    <action name="update STARTUP_INSTRUCTION">
      <type>general/bluelemon/code</type>
      <definition resultTo="callStartup">

        <blue:call node="STARTUP_INSTRUCTION" location="permanent"/>

      </definition>
    </action>

    <finish name="return the result">
      <return>startupUpdate + callStartup</return>
    </finish> 

  </path>

</process>