Site Engineer Example

In this document we talk you through an example of how to take an existing business system and create a mobile client application by using the Net Caboodle toolkit and Caboodle mobile gateway.

This example explains how to create a mobile application that allows service engineers in the field to access and order the equipment and parts they need to repair applicances.

In this document we are using a fictious company who provide a statewide service to all the leading appliance manufactories and retailers.

Introduction

For the purposes of this example we have invented a company called "Appliance Fixers" that provide a statewide service to all the leading appliance manufactories and retailers.

At any one time the company have hundreds of engineers in the field responding to calls to repair fridges, freezers and cookers etc.

The engineers have small vans carrying a cross section of the most frequently required parts that their company's database predicts. However, because the service engineers cannot carry every part for every appliance they often find that they haven't got the part required to fix the appliance. So whilst on the customer site they have to telephone the depot to check when a required part is available and ask the call center to book in a new appointment with the customer to coincide with the delivery of the new part.

The company's management team are concerned by how much this extra step is eating into their profit -- because they have to train and pay staff at the call center to answer the phone and use the parts database to check the availability of the required part.

As "Appliance Fixers" is still expanding, it means that there are going to need more engineers in the field and hire more staff to manage the call center.

So the company decide that they can reduce costs by providing access to the parts and appointments database directly the field engineers cellular phones, therefore removing the need to keep expanding the call center.

The Existing System

The existing system being used by this company consists of an Oracle database with Oracle Forms client applications, so the first step is to look at how to integrate this type of system into a mobile business application, with mobile clients.

Looking at the options

Because no existing Java technology-based service was available to connect to, the first step is to define a service interface that could expose the functionality required by the mobile client applications -- this can take the form of a Java RMI service, Jini service or JavaBean.

In this document we will look at an RMI based solution, but you could used a bean-based approach as we did with the database messaging example, which you can download.

After the requirements gathering the following Java RMI service interface is agreed, based on the knowledge that the service engineers carry catalogues supplied by the manufacturers, listing all their spare parts along with the part numbers.

Defining the interface

public interface PartsDatabase extends Remote{
	public PartItem getAvailability(String partID)
		throws RemoteException;
	public void orderPart(String partID,String engineerID)
		throws RemoteException;
   	public void bookAppointment(String engineerID,String customerID, Calendar date)
			throws RemoteException;

}

In the above service interface the type PartItem contains all the information from the depot about how many items are in stock, how many are on order etc. The engineer in the field can then use this information to inform the customer, order the part and book the next appointment with the customer, all without the need for somebody at the call center to be involved.

Writing the service connector

Back at Quark's Appliance Fixers the Part Database service has been implemented as a Java RMI service, that uses JDBC to communicate with the Orcale database.

Whilst Transactions created on the device could have been used to ensure atomicity, the decision was taken to control the transactions directly from the service, utilizing Oracle transactions.

Moving onto the device

Net Caboodle provides plugins for NetBeans and Eclipse, which can connect to Java RMI based services and generate the connector code required by a mobile device to communicate with that service.

The connector code (also referred to as mobile stubs) generated by the plugins does not actually communicate directly with the remote service, but instead communicates with the Caboodle mobile gateway, therefore allowing you to keep your business services behind a firewall.

Having used the Caboodle stub generator it becomes very easy to start writing the mobile client code to use the service. Below is how the mobile client interacts with the Parts Database.

//call when your MIDlet is initialised.
PartsDatabase service=PartsDatabaseFactory.getService();


//initialise a security provider to force gateway authentication
SecurityProvider securityProvider=SecurityFactory.getProvider();


//show Login screen, then authenticate
securityProvider.authenticate(user,pw,domain);


//display a screen to input the part number
PartItem item=service.getAvialability( partNumber );


//display the results screen with an option to order the part

The Results

 

Summary

By using Net Caboodle, we have given service engineers the ability to check the availability of a part, order it and create a follow appointment all from their cellular phone,

The management team at the company can now grow their business without the need to recruit and train more staff at their call center. The service engineers in the field are also happy, because they no longer have to phone and wait while someone in the call center enters information on their behalf.

The mobile stubs generated by the Net Caboodle plugin remove the need to write any of your own code for a mobile business application to communicate with existing business services.

All communication between the mobile stubs and the Net Caboodle Gateway are encrypted.

By using the Net Caboodle gateway authentication it is possible to stop any mobile client accessing business service with having first b een authenticated by the gateway.

Downloads

Related documents

Message Board Example
This example includes the source code for a simple POJO (Plain Old Java Object) service and for a mobile MIDP client that can send and receive messages to/from other mobile device.

Database connector Example
In this article (which include a source code download) we explain how to create a mobile (MIDP) messaging client that reads and stores messages in a relational database.

MIDP File Sharing Example
In this example we take a look at how to write a simple POJO (Plan Old Java Object) service that allows MIDP clients to store data remotely for either personal or public consumption -- you can think of this example like an Internet file sharing service for Mobile devices.

Support and Feedback

If you have any questions relating to this article please contact us

 

 

 

Copyright notice

The information within this document remains the sole property of Net Caboodle - www.netcaboodle.com

No part of this document may be copied or reproduced in any form or by any means, and the information
contained within it is not to be communicated to a third party, without the prior written consent of
Net Caboodle. All trademarks remain the property of their respective owners. NetCaboodle, Caboodle server
and Raven are all trademarks of Net Caboodle.