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

  <descriptor>
    <name>com/emarson/lemonade/examples/mobank/pin/Screen</name>
    <version>1.0</version>
    <description>
      Screen informing a user about the opportunity to 
      secure the moBank application with PIN.
    </description>
    <vendor>E-MARSON</vendor>
  </descriptor>
  
  <path>
  
    <!-- ASSOCIATIONS --->

    <!-- association to RemovePackageScreen --->
    <action name="action on 'No'">
      <type>general/bluelemon/code</type>
      <definition resultTo="backAction">

        <blue:call node="com/emarson/lemonade/examples/mobank/pin/RemovePackageScreen"
                   location="@com/emarson/lemonade/examples/mobank/pin"/>


      </definition>
    </action>
    
    <!-- association to SpecifyPinScreen --->
    <action name="action on 'Yes'">
      <type>general/bluelemon/code</type>
      <definition resultTo="continueAction">

        <blue:call node="com/emarson/lemonade/examples/mobank/pin/SpecifyPinScreen"
                   location="@com/emarson/lemonade/examples/mobank/pin"/>


      </definition>
    </action>
    
    
    <!-- INSTRUCTION --->
      
    <!-- We can use the template to generate the form --->
    <subprocess name="screen form">
      <source>com/emarson/lemonade/templates/YesNoWindow</source>
      <arguments>
        <argument key="title">"moBank PIN"</argument>
        <argument key="text">
          "For security reasons we strongly encourage you to " +
          "create a 4-digits PIN you will be asked for when starting " +
          "the moBank application. Would you like to create your PIN now?"
        </argument>
        <argument key="forwardActionText">"Yes"</argument>
        <argument key="forwardAction">continueAction</argument>
        <argument key="backActionText">"No"</argument>
        <argument key="backAction">backAction</argument>
      </arguments>
      <resultTo>result</resultTo>
    </subprocess>

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

  </path>

</process>