CUSTOMER AREA
Login: Password:
General Information
Services
Bluelemon Scenarios
Download Lemonade
Lemonade Tutorial
Lemonade Distilled
How to build a service
1. Hello World!
2. moAccount
3. moBank
4. moBank: PIN
5. moBank: Blue SMS
moBank enhanced
MOBANK: PIN

This is a continuation of the third example.

This example demonstrates another value that an organisation can gain from using the architecture shown earlier: the possibility to manage the MIDlet from the server can be used not just to install new services but also to update the moBank application itself.

In the previous example the user only had to log in when the application was first launched. After that the application would jump right to the main screen when started. In this example we will offer the option to set up a PIN for the application. If the user chooses to install this update, the application will start asking for a PIN when the MIDlet is started, and if a wrong PIN is entered three times, the user will have to log in again.

To see this example in action, you need to install the moBank application from the previous example and call "Update" five times (the demo is configured to deliver this service as an update upon the fifth update).

SCENARIO

The user activates "Update..." and sees the following message:

The main menu is updated:

When the user selects "Setting a PIN", an info screen is displayed:

If the user chooses "No" he or she is asked whether they would like to set the PIN later. If they choose "No" again, the whole "PIN setting" feature will be removed from the MIDlet.

If the user chooses to set up a PIN, they need to fill in two input fields. The input is validated. If the data is correct, the PIN is stored and the user will need to enter it when the application is started.

The user can enter a wrong PIN twice - and only a warning message will be displayed. If a wrong PIN is entered for the third time, the whole PIN functionality will be removed from the MIDlet and the user will have to log in using the full user id and password.

FUNCTIONAL DIAGRAM

The Screen instruction displays a screen asking the user to set up a PIN. If the answer is positive, SpecifyPinScreen is called, otherwise - RemovePackageScreen.

SpecifyPinScreen displays two text input fields where the user enters 4-digit PIN. Option "Save" refers to VerifyPinSaveAndRemove, which reads the entered PINs, validates them and, if the PIN is correct, stores it the "permanent" location and updates STARTUP_INSTRUCTION to one that will request the PIN. The final action of VerifyPinSaveAndRemove is to call RemovePackage.

RemovePackageScreen is a instruction that asks the user whether they would like to set up the PIN in the future. RemovePackage is associated with "No".

RemovePackage deletes all resources associated with this service from the MIDlet.

LOCATION DIAGRAM

All instructions are placed in the "pin" package.

Notice the NewStartupInstruction which belongs to the package but was not shown in the functional diagram. This is the instruction that will replace the content of STARTUP_INSTRUCTION node when the PIN is set.

DEPLOYMENT STRATEGY

We need one installer that will be used by the controller which delivers the PIN functionality to the user:

SOURCE CODES

Take a look at all the s'N's processes for this example >>>

Copyright 2008 E-MARSON Home   JavaPeople   JP Projects   About E-MARSON    Careers   Contact         Wersja polska