Upload
syambabu-allu
View
219
Download
0
Embed Size (px)
Citation preview
8/3/2019 Sup Ec Sample Mci
1/32
Mobile Collision Inspection Sample
Sybase Unwired Platform
Windows
8/3/2019 Sup Ec Sample Mci
2/32
DOCUMENT ID: DC00971-01-0100-01
LAST REVISED: November, 2008
Copyright 2008 by Sybase, Inc.
This publication pertains to Sybase software and to any subsequent release until otherwise indicated in new editions or technical notes.Information in this document is subject to change without notice. The software described herein is furnished under a license agreement, and
it may be used or copied only in accordance with the terms of that agreement.To order additional documents, U.S. and Canadian customers should call Customer Fulfillment at (800) 685-8225, fax (617) 229-9845.
Customers in other countries with a U.S. license agreement may contact Customer Fulfillment via the above fax number. All other internationalcustomers should contact their Sybase subsidiary or local distributor. Upgrades are provided only at regularly scheduled software release dates.No part of this publication may be reproduced, transmitted, or translated in any form or by any means, electronic, mechanical, manual, optical,or otherwise, without the prior written permission of Sybase, Inc.
Sybase trademarks can be viewed at the Sybase trademarks page. Sybase and the marks listed are trademarks of Sybase, Inc. indicatesregistration in the United States of America.
Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries.
Unicode and the Unicode Logo are registered trademarks of Unicode, Inc.
All other company and product names used herein may be trademarks or registered trademarks of their respective companies.
Use, duplication, or disclosure by the government is subject to the restrictions set forth in subparagraph (c)(1)(ii) of DFARS 52.227-7013 forthe DOD and as set forth in FAR 52.227-19(a)-(d) for civilian agencies.
Sybase, Inc., One Sybase Drive, Dublin, CA 94568
http://www.sybase.com/detail?id=1011207http://www.sybase.com/detail?id=10112078/3/2019 Sup Ec Sample Mci
3/32
Contents
Context Summary...................................................................................................4
Usage Scenario.......................................................................................................5
Get Started..............................................................................................................6Prerequisites............................................................................................................................6
Configuring your Environment for the Device Application Designer..............................6
Setting Up the Sample.............................................................................................................6
Starting the Sample Project.....................................................................................................7
Exploring the Database............................................................................................................9
Exploring MBOs.....................................................................................................................10
Mobile Business Objects.............................................................................................10
The Mobile Application Diagram..................................................................................11
Exploring the BlackBerry Application Interface Design..........................................................12
The Device Application Designer................................................................................12Try It Out................................................................................................................14
Deploying the Sample MBOs to Unwired Server...................................................................14
Provisioning the Device with a Device Application.................................................................15
Running the BlackBerry Application.......................................................................................17
Starting the MobileInspec Application.........................................................................17
Working with Claims....................................................................................................18
Working with Customers..............................................................................................20
Working with Policies...................................................................................................22
Working with Payments...............................................................................................22
Synchronizing Data.....................................................................................................23Learn More............................................................................................................27
Related Reference.................................................................................................................27
Project Artifact Reference............................................................................................27
Data Access Layer Reference.....................................................................................27
Device Application Architecture...................................................................................28
Coordinating Samples and Tutorials.......................................................................................29
Additional Information.............................................................................................................29
Getting Help...........................................................................................................................30
Mobile Collision Inspection Sample
8/3/2019 Sup Ec Sample Mci
4/32
Context Summary
The SybInsure Mobile Collision Inspection sample application contains everything you need to explore UnwiredPlatform features.
The Mobile Collision Inspection (MCI) sample is based on this development environment:
Unwired WorkSpace for Eclipse BlackBerry device development
Use SybInsure Mobile Collision Inspection (MCI) to explore possible artifacts and their resulting applications,the development environment, the underlying components, and transactions that can occur between theunderlying components. By using this sample, you will have a comprehensive preview of the benefits UnwiredPlatform can offer, without having to program an application yourself first. If you would like to learn how touse Unwired WorkSpace to create an application, please review the available tutorials created expressly forthis purpose.
Next Steps
1. Review the Usage Scenarioon page 5. The scenario explores the business context and use case forthe sample.2. Follow the setup process in Get Started to install and prepare artifacts in the Eclipse edition of Unwired
WorkSpace.3. Test functionality and features as described in Try It Outon page 14.
Sybase Unwired Platfor4
Context Summary
http://-/?-http://-/?-8/3/2019 Sup Ec Sample Mci
5/32
Usage Scenario
SybInsure is an insurance company that supports collision inspectors by giving them a BlackBerry applicationthat allows them to process collision reports remotely and therefore in a more timely fashion.
Business requirements for SybInsure include:
Reduced claim turnaround time by supporting remote reporting, SybInsure can decrease claim waittimes and thereby offer superior customer support. Reduced response times offer a competitive advantageover to other insurance companies with bigger paper trails and use more formalized bureaucracies.
Reduced maintenance and simplicity the BlackBerry application must easily deploy with little inspectorintervention. The inspector user base is not tech-savvy and does not like to spend time troubleshootingor self-supporting.
Bidirectional updates to enterprise data the information on the remote database must be current, andchanges to the corporate repository must be seamless
Secure transactions care must be taken to authenticate not only the inspector (via credentials storedon an LDAP server), but also to secure the transmission of confidential customer data across the wirelessnetwork.
Dual mode operation
inspectors travel to remote areas to evaluate accident sites. Consequently, mobilenetwork access can be unreliable. Inspectors should be able to adjust claim information offine and thenhave the claim propagated back to the corporate servers when online access becomes available usingthe built-in Unwired Platform synchronization technology.
Comprehensive set of workflow operations inspectors use mobile devices to view, create, or edit, theclaim, customer, payment and policy information while conducting the inspection. A mobile claim inspectionform is used to enter customer feedback, customer signature, and photos of the accident; as well as toupdate claim and inspection status. Inspectors can view the inspection report for each claim; the generatedreport includes complete information about the claim and the customer. Inspection data is uploaded tothe main office database server using the built-in Unwired Platform synchronization technology.
Next: Get Startedon page 6 tells you how to set up this sample on your computer.
Mobile Collision Inspection Sample
Usage Scena
8/3/2019 Sup Ec Sample Mci
6/32
Get Started
To get started with the SybInsure MCI sample, review the prerequisites, then follow this task sequence:
1. Bring all artifacts into the Unwired WorkSpace development environment for Eclipse. See Setting Up the
Sampleon page 6.2. Open connections to the servers that this sample depends upon. See Starting the Sample Projecton page
7.
3. Navigate the consolidated database (ServerDB) that is used to coordinate changes between the enterprisedatabase and the remote database on the BlackBerry.This allows you to explore the tables and relationshipsthat exist, and are the foundation for the Blackberry application. See Exploring the Databaseon page 9.
4. Explore the Mobile Business Objects (MBOs) that use the database for the device application's attributesas well as perform operations against tables in ServerDB. See Exploring MBOson page 10.
5. Review the BlackBerry interface design in the Device Application Designer.The design of the interfacecorrelates to the MBOs that perform database operations. See The Device Application Designeron page12.
Prerequisites
Before you begin importing and setting up the sample, review and complete the prerequisites.
Install Unwired Platform and choosing Eclipse as your development platform. Install the BlackBerry simulator or have access to an actual BlackBerry device. Install and start the BlackBerry MDS Simulator. Start Unwired Server. Ensure that the OpenDS LDAP server and Unified Agent have started by checking the running services
in the Windows Control Panel.
Configuring your Environment for the Device Application Designer
To generate and distribute device applications built with the Unwired WorkSpace Device Application Designer,download the MDS simulator, and the BlackBerry JDE 4.2.1 from the BlackBerry developers' Web site.
1. Go to the BlackBerry Web site at http://blackberry.comand download and install the BlackBerry JDE 4.2.1.
2. Download and install the MDS simulator (BlackBerry_Email_MDS_4.1.2.17.exe).
Setting Up the Sample
Import the sample project archived in mobileInspec.zip into your Unwired WorkSpace environment.
Prerequisites
Do not get started with this sample until completed the prerequisites. See Prerequisiteson page 6.
1. Launch Unwired WorkSpace and choose your workspace by clicking Start > Programs > Sybase >Unwired Platform > Sybase Unwired WorkSpace (eclipse edition).
2. Import mobileInspec.zip.
a) Click File > Import.
Sybase Unwired Platfor6
Get Started
http://blackberry.com/http://blackberry.com/8/3/2019 Sup Ec Sample Mci
7/32
b) In the Import wizard, select General > Existing Projects into Workspace and click Next.c) Choose Select archive file and browse to the location that you saved mobileInspec.zip to.d) Click Finish to import the artifacts in the archive as a project.
3. Edit the file that starts the SybInsure back-end database used by this sample.
a) In WorkSpace Navigator, right click the run.bat file in the DB folder and select Edit file.b) Modify the values for the variables in this file as required, so the command line uses appropriate values
for your environment.DescriptionVariable
Sets the root directory location of the server that hosts the sampleSybInsure database.
For example, the default location is:
C:\Sybase\UnwiredPlatform\Servers\UnwiredServer\SQLAnywhere10
set ASA_DIR=C:\Program Files\SQLAnywhere 10
Sets the project directory.
For example, the default location is:
C:\Documents and Settings\LoginID\workspace
Change LoginIDan appropriate string, for example, jsmith.
set PROJECT_DIR=C:\UEP\UseCase
Sets the path to the database file (ServerDB.db).set PROJECT_NAME=MobileInspec
c) Save the changes.
4. Double-click run.bat.If a second SQLAnywhere icon appears in your system tray (the first should automatically appear becausethe Unified Agent has already loaded the UADB consolidated database for Unwired Platform), the newdatabase server instance has started successfully. When you hover your cursor over that icon, it shouldcorrectly identify the database that is running as ServerDB.
Starting the Sample Project
Once you have imported the sample and started the ServerDB server, you can browse artifacts and openrequired server connections.
1. In the WorkSpace Navigator, expand the MobileInspec folder to view the project artifacts.When you import the project, errors are generated, as indicated by the red "x" beside the root folder andthe Deployment folder. These errors are resolved as you set up your project for your environment.
Project artifacts are contained in these folders: Mobile Business Objects, DB, and Deployment. For adescription of all artifacts contained in this project, see Project Artifact Referenceon page 27.
Mobile Collision Inspection Sample
Get Start
8/3/2019 Sup Ec Sample Mci
8/32
2. Create a connection profile and connect to the ServerDB database.
a) In Enterprise Explorer, right-click the Databases folder and select New.b) Choose Sybase ASA as the connection profile type, and click Next.c) Type MobileInspecDB as the Name, select Auto-connect at startup, and click Next.
d) Configure these properties:ValueProperty
ASA v 10.x for Unwired Server DefaultDriver
The name of your host computerHost
2648Port
ServerDB.dbDatabase name
Keep defaults of dba and sql respectivelyUser name and password
SelectedSave password
When you are finished, click Test Connection and ensure that the ping to the server is successful.Click Finish to exit the wizard. A MobileInspec database is added.
When you connect to the server, a complete set of database elements appear below the ServerDBicon.
This new profile should resolve any connection profiles errors you received when you imported thisproject. If it does not, you may need to ping the server to see whether or not the server is available.
3. Connect to the Unwired Server.
a) In Enterprise Explorer, expand the Unwired Server folder.
Sybase Unwired Platfor8
Get Started
8/3/2019 Sup Ec Sample Mci
9/32
b) Right-click the My Unwired Server icon and choose Connect.When you connect to the server, a complete set of administrable elements appear below the servericon.
Exploring the Database
If you have started and connected to the SQL Anywhere database that acts as the sample's back-endrepository, you can explore the structure and design of the database.
No user intervention or modification is required: the schema, the tables, and relationships have already beenexplicitly design for this use case. However, by understanding the structure of the database, you can betterunderstand how the business logic programmed into the application works in tandem with the database.
1. In the Enterprise Explorer, expand Databases > MobileInspecDB > ServerDB.
2. Right-click ServerDB, and ensure both Show Schemas and Show Owner are selected.
These options allow you to explore the database more intuitively.
3. To browse the tables used by the mobile application, expand ServerDB > Schema > DBA > Tables.
The ServerDB has four tables listed alphabetically: claim, customer, payment, and policy. Expand eachtable to review the table design for each (that is, columns, keys, constraints, and so on).
Table names mostly have a 1-to-1 relationship with the mobile business objects (MBOs) that create the
business logic for the BlackBerry device application.The report MBO uses information from multipledatabases.
To explore the relationship between tables and MBOs more closely, open the mobile application diagram.For information on MBOs and diagrams, see Mobile Business Objectson page 10 and The MobileApplication Diagramon page 11.
For more information on the database structure, see Data Access Layer Referenceon page 27.
4. To review the views, stored procedures, and user-defined functions, expand DBO owner.
Mobile Collision Inspection Sample
Get Start
8/3/2019 Sup Ec Sample Mci
10/32
Exploring MBOs
Review the existing attributes and operations for mobile business objects, see what relationships amongvarious mobile business objects are, and explore how MBOs are bound to ServerDB as their back-end datasource.
1. In WorkSpace Navigator, expand the MBOs folder to view the MBOs created for this sample: claim,customer, payment, policy, and report.
Except for the report MBO, all others match the table names of ServerDB.
2. To see the relationships among these MBOs, and to gather insights on the business logic behind them,right-click any MBO and select Open in Diagram editor.
Mobile Business Objects
Mobile business objects, grouped in a project, form the business logic for mobile applications.
A mobile business object (MBO) is derived from a data source (database server, Web Service, SAP server,and so on). When grouped in projects, MBOs form the business logic for mobile applications that can bedeployed to an Unwired Server and referenced in mobile devices (clients). MBOs include:
Implementation-level details read-only metadata columns that include information about the data in theimplementation. Implementation details also include arguments, which are read-only parameters that arepassed to the back-end data source.
Abstract-level details attributes correspond to class-level properties on the mobile client and map tocolumns. Parameters correspond to synchronization parameters on the mobile client and map to arguments.MBOs can also contain operations, which themselves contain parameters and arguments, and can beused to update, create, or delete data.
Relationships defined between MBOs, link attributes, and parameters in one MBO to attributes andparameters in another MBO.
Sybase Unwired Platfor10
Get Started
8/3/2019 Sup Ec Sample Mci
11/32
You can define MBOs using either a top-down approachdesigning attributes and parameters first, and laterbinding them to a data source, or a bottom-up approachspecifying a data source, and automaticallygenerating attributes and parameters from it.
A mobile application includes MBOs, as well as role and server mappings, and other artifacts that are deliveredto the Unwired Server during deployment.
The Mobile Application Diagram
Each mobile application project has an associated mobile application diagram that provides a graphicalrepresentation of all mobile business objects (MBOs) within the project.
The mobile application diagram is not only a static graphical representation of MBOs.You can copy and pasteexisting objects, create a new object, or even define data sources for MBOs that are not yet bound to abackend repository. However, the application diagram used in this sample is complete.
If the sample project were larger, you could optionally create a filter to view only MBOs of interesteither byexplicitly selecting the MBOs, or by creating a logical group. To explore this functionality, open the UnwiredWorkspace online documentation and click Sybase Unwired WorkSpace > Develop > Developing a MobileBusiness Object > Working with Mobile Business Objects > Managing Mobile Application DiagramFilters.
What the MCI diagram shows
The diagram shows the functionality an inspector has after authentication has occurred. Each of these MBOsare represented in the device application interface as distinct menu items. These menu items perform distinctactions. As the diagram shows, only the report MBO does not allow operations to be performed on theServerDB data:
claim MBO the Claim menu item displays a claim form to input values with which the ServedDB isqueried. The query returns actual user data to the inspector.
customer MBO the Customer menu item displays the same customer information used in the report theinspector can generate.
Mobile Collision Inspection Sample
Get Start
8/3/2019 Sup Ec Sample Mci
12/32
policy MBO the Policy menu item downloads policy information for the customer, based on the policynumber (policy_ID).
payment MBO the Payment menu item allows the inspector to verify the status of the claim, namelywhether the customer has made a current insurance payment prior to the accident.
report MBO the Report menu item generates the inspection report based on the on-site inspection databy using the attributes defined, for example claim number (claim_id), customer information (first_name,last_name, email, policy_ID and msm_ID), and so on.
Exploring the BlackBerry Application Interface Design
Use the Device Application Designer to explore the flow of the BlackBerry application.
The business logic is not held in the application. Instead, the application relies on the MBOs that are deployedto the Unwired Server.The separation of the application interface from the processing and logic componentskeeps the application compact and makes more efficient use of the BlackBerry's battery use.
1. In WorkSpace Navigator, double-click MobileInspec.bob.
2. Click the Flow Design tab to explore the flow of all existing BlackBerry screens.You can also see the
screens themselves by clicking the Screen Design tab.
The Device Application Designer
The Device Application Designer consists of views and pages that allow you to model the interface of thedevice interface screens.
Sybase Unwired Platfor12
Get Started
8/3/2019 Sup Ec Sample Mci
13/32
You can two views to visualize the application in two ways:
Outline shows all the objects in the designer, for all pages but the Introduction or Source page.Theoutline includes context menus that match the context menu selection for the objects on the page. If youselecting a node on the tree outline, the corresponding node in the editor is highlighted, and vice versa.The outline view is related to the object model, so delete and command stack actions appear in this view.For example, if you delete an item, undo and redo commands appear; the same as in the editor.
Thumbnail (image) shows the Flow Design page as a thumbnail. Therefore, when you design a screen
and attach actions to buttons on the Screen Design page, the flow changes, and you can see the changein the thumbnail view.The thumbnail also gives context for the screen you are working on with respect tothe entire application design. This view includes the standard viewable region locator for scrolling theimage.
The Device Application Designer has drag-and-drop functionality, which allows you to drag and drop mobilebusiness objects of certain types and settings onto controls that have the Mobile Business Object Searchoption on the Properties tab.You can also drag and drop mobile business object operations on to controlsthat accept actions.
The Device Application Designer contains several pages:
Introduction
Creating a new custom device application or double-clicking an existing one, opens the Introduction sectionof the Device Application Designer.This page is the starting point for designing your custom device application.You can access help and launch tutorials from this page.
Flow Design
Use this page to specify the manner in which screens link together.You can then link specific screens andactions to a mobile business object on a server.The Palette view shows available screens, alerts, andconnections.
The Flow Design page displays an empty canvas with the Start icon, and the Palette to the right, which showsthe available stock screens, alerts, and connections.You can drag and drop items from the Palette to thecanvas. Screens that you drag to the Flow Design canvas display as icons and show the connection linesbetween them. Dragging a new screen into this page starts a new screen. Double-clicking a screen open theScreen Design page.
Right-clicking anywhere in the Flow Design page displays a context menu.
Screen Design
Use this page to design the screen of your custom device application.The Palette view shows the menu,controls, containers, header and footer, and actions you can use to design a new screen. Drag controls todesign the user interface on the device screen.
The Device Application toolbar includes a list of existing screens.
You can open an different screen by selecting the corresponding screen name from the list.
Source
This page appears only if you have configured it in the Device Application Designer Appearance preferences.This page shows the XML code of the custom device application. You can edit the XML code directly in theSource page, and changes are immediately reflected in the Screen Design and Flow Design pages.
Mobile Collision Inspection Sample
Get Start
8/3/2019 Sup Ec Sample Mci
14/32
Try It Out
Use the sample to explore the requirements of an inspector so that you can better understand the featuresof Unwired Platform. An inspector relies on this mobile solution to accomplish tasks associated with inspectionon the road without having to stop into the office to update information between site visits.
Before you can try out the features of this sample that are described in the table below, you must:
1. Deploy the sample MBOs to Unwired Server.2. Provision the simulator or device with the device application.3. Start the sample on the simulator or device and log in to Unwired Server.
SeeUse caseFeature
The Mobile Application Diagramonpage 11 and The Device ApplicationDesigneron page 12
Reviewing application diagrams anddesign flows.
BlackBerry development and design inthe WorkSpace environment
Deploying the Sample MBOs to
Unwired Serveron page 14 and
Provisioning the Device with a DeviceApplicationon page 15
Deploying the sample MBOs toUnwired Server as a package, and
provisioning the device or simulatorwith the corresponding user interface.
Application provisioning andmaintenance support for BlackBerry
devices
Working with Claimson page 18,Working with Customerson page 20,Working with Paymentson page 22,and Working with Policieson page 22
Opening any of the four MBOsautomatically refreshes data in thedevice database.
Back-end data integration withuser-initiated pull synchronization
Running the BlackBerry Applicationonpage 17
Inspector authentication with the loginscreen. Without the correctcredentials, the inspector cannotaccess the deployed MBOs.
Security features (authentication androle support)
Synchronizing Dataon page 23Changes to claim details are trackedin the device database until they are
submitted to the back-end database.
Back-end database integration withuser-initiated data updates
Deploying the Sample MBOs to Unwired Server
Deploy the sample to the Unwired Server and thereby make the MBO logic available to the user interface(MobileInsepc.bob).
Prerequisites
Ensure you are connected to an Unwired Server.
There are multiple techniques you can use to deploy the mobile application.This sample documents how todeploy the sample from the project. For information on the other options, open the Unwired WorkSpace onlinehelp and click Sybase Unwired WorkSpace > Develop > Developing a Mobile Business Object >Packaging and Deploying Mobile Business Objects.
1. Right-click the MobileInspec project and select Deploy Project.
2. Enter the deploy mode, target version, package namespace, and click Next.
3. Select all boxes to deploy all MBOs and click Next.
4. Select the Unwired Server you are connected to and click Next.
5. Map the connection profile for MobileInspecDB to the Server connection profile of the same name.
Sybase Unwired Platfor14
Try It Out
8/3/2019 Sup Ec Sample Mci
15/32
This mapping process creates a named endpoint to the correct server that give you access to the systemsyou require.
6. Since you do not need to map roles or create a deployment profile for this sample, click Finish to deploythe package to the server you selected.
Provisioning the Device with a Device Application
Use the Generate Device Application wizard to generate a device application for development and testingon a simulator or actual BlackBerry device.
Prerequisites
You must have an existing mobile application project and JDE 4.2.1 installed, as well as have the BlackBerryMDS server simulator started.
1. Resolve references in the application to point to your instance of Unwired Server.
a) in the Device Application Designer, open MobileInspec.bob.b) Click the Flow Design tab.
c) Right-click any node in the flow design, and select Unwired Platform Profile References.d) Select the defined reference and click Edit.e) Choose the connection profile for your Unwired Server and click OK.
Mobile Collision Inspection Sample
Try It O
8/3/2019 Sup Ec Sample Mci
16/32
The name listed in the Sybase Unwired Platform profile column changes to the name you selected.
f) Close the Sybase Unwired Platform Profile References dialog. All references in the device applicationare updated accordingly.
g) Save MobileInspec.bob.
2. To provision the simulator:
a) Right-click MobileInspec.bob and select Generate Device Application.b) In the Generate Device Application wizard:
Expand Favorite Configurations and choose JDE 4.2.1. Simulator Deployment. Expand Locations and select Copy to Simulator Location. If the default location is incorrect, click
Browse and choose the correct simulator location. Also click Start the BlackBerry Simulator AfterCopying to immediately load the application on the simulator.
c) Click Finish.
A progress bar appears, displaying status messages as the application code is generated and compiled.After a few minutes, the BlackBerry simulator appears with the application loaded onto it.
3. To provision a device:
a) Ensure that your BlackBerry device is registered. Unregistered devices cannot connect to the BESserver without an assigned key. Visit blackberry.comfor information on how to register your deviceanominal fee may be required if you have not purchased your device from a wireless carrier.
b) Ensure that the Unwired Server you deployed the package to is running on a demilitarized zone (DMZ).BlackBerry devices cannot connect to servers behind the firewall.To redeploy the sample, see Deployingthe Sample MBOs to Unwired Serveron page 14.
c) Using the BlackBerry Desktop Manager, copy the *.BOB files to the device from the computer thedevice is connected to. *.BOB files that you must transfer include UltraLiteJ, BodFramework, andMobileInspec.
Sybase Unwired Platfor16
Try It Out
http://www.blackberry.com/btsc/articles/219/KB00510_f.SAL_Public.htmlhttp://www.blackberry.com/btsc/articles/219/KB00510_f.SAL_Public.html8/3/2019 Sup Ec Sample Mci
17/32
Running the BlackBerry Application
Use the BlackBerry application to demonstrate some of the important features of Unwired Platform.
Running the application on the device requires that you:
1. Start the MobileInspec application.2. Open one of the MBOs: claims, customer, policies, or payments.
Starting the MobileInspec Application
Load the application and log in to begin exploring the features of this application.
1. Press the Menu button to display the Home screen, then select the MobileInspec icon.
2. On the Login Information screen, enter the user name and password to authenticate with the UnwiredServer.
You can use the administration defaults of supAdmin and s3pAdmin.
If you supply an invalid set of credentials, you cannot proceed. Only authenticated users can access theMobile Inspection Center screen that displays the main menu.
Mobile Collision Inspection Sample
Try It O
8/3/2019 Sup Ec Sample Mci
18/32
Working with Claims
Use the sample application to add, modify, delete, view, and sort a claim.
Adding and Deleting a Claim
Use the Claim MBO to inser t an new claim or delete one that is no longer required. Changes are written to
the compact database installed with the device application.They are not written to the consolidated databaseon Unwired Server until you synchronize your changes.
1. From the Mobile Inspections Center main menu, click Claim.
Progress messages appear indicating whether or not the MBO is being retrieved from the Unwired Server.Upon retrieval, the MBO then begins the upload and download operations, which populates the claim datawith two claims: claim_ID 22 and claim_ID 33:
2. To add a new claim:
a) Click the Menu key and select Create claim.b) In the form that appears, create a claim with these values:
ValueOption
11claim ID
100policy ID
Newclaim status
Your nameinspector name
Newinspector status
c) When you are finished, click Submit to save the information in the compact database on the device.
Sybase Unwired Platfor18
Try It Out
8/3/2019 Sup Ec Sample Mci
19/32
The information you supplied now appears as a row in the claim table.
3. To delete a claim:
a) Choose the claim you want to delete by selecting the row with a claim ID of 22 (the one with a claimstatus of Done).
b) Click the Menu key and select Delete Claim.c) Click Submit.
The claim is removed from the claim table.
When you are finished adding and deleting these rows, the only claims remaining should be claim_ID 11(new) and claim_ID 33 (previously existing from the back-end database).
Updating a Claim
Update an existing claim by changing any of the defined values.
1. With the Claim MBO open, select the row with the claim_ID of 11.
2. Click the Menu key and select Update Claim.
3. In the form that appears make these changes:
Change toOption
Reassignedclaim status
Maya Nandiinspector name
Under reviewinspector status
4. Click the Menu key and select Submit.The values of the claim appear in red in the claims list table.
Viewing Claim Details
View claim details to see the properties of a claim in form view rather than table view. Because there aremultiple properties, this table view may truncate data.
1. Use the trackball to select the claim with an ID of 11.2. To view the claim as a form, select Claim Details.
Sorting Claims
Reorder the list of claims by sorting columns.
1. In the table of listed claims, click the Menu key and scroll with the trackball to display the Sort on Columnoptions.
Mobile Collision Inspection Sample
Try It O
8/3/2019 Sup Ec Sample Mci
20/32
2. Select one of the columns to sort the claims on. Depending on the datatype of the column, claims aresorted alphabetically or numerically.
Creating a Report
A report combines all records from both claim and customer details into a single view.
1. With the claim MBO open, select the row.
2. Click the Menu key and click Report Details.The report view for the selected row appears. As shown, the inspector information, photo and signaturewould normally be fields in a claim MBO, and first and last names would normally be fields in a customerMBO, but instead are integrated into a report view:
Working with Customers
Use the Customer MBO to search, add, delete, or update customer information.
Adding and Deleting a Customer
Use the Customer MBO to insert a new customer or delete one that is no longer required. Changes are writtento the compact database but not written to the consolidated database on Unwired Server until you synchronizeyour changes.
1. From the Mobile Inspections Center main menu, click Customer.
Progress messages appear indicating whether or not the MBO is being retrieved.
2. To add a new customer:
a) Click the Menu key and select Create Customer. This menu item may not be available if you havenot yet viewed a customer profile.
b) In the form that appears, create a customer with these values:
ValueOption
200policy ID
Dorisfirst name
McFarlanelast name
400-1msm ID
c) When you are finished, click Submit to save the information in the compact database on the device.The information you supplied now appears as a red row in the customer table.
3. To delete a customer:
Sybase Unwired Platfor20
Try It Out
8/3/2019 Sup Ec Sample Mci
21/32
Choose the customer to delete by selecting the row with a policy ID of 400.a)b) Click the Menu key and select Delete customer.c) Click Submit.
The test customer you created has been removed from the local database on the BlackBerry device. Onceyou submit the change as a pending operation, the information is synchronized back to ServerDB.
Updating a Customer
Update an existing customer by changing any of its defined values.
1. With the Customer MBO open, enter 400 as the policy ID and click Submit.The customer record for this policy appears.
2. Click the Menu key and select Update Customer.
3. In the form that appears make these changes:
Change toOption
Schulzlast name
4. Click the Menu key and select Submit.
Viewing Customer Details
Open the Customer MBO to search for a customer record using policy_ID as the search criteria.
1. From the Mobile Inspections Center main menu, click Customer.
Progress messages appear indicating whether or not the MBO is being retrieved from the Unwired Server,then the upload and download operation begins.
2. Use the trackball to move the cursor to the policy_ID field and type the policy number you want to searchon.
3. Click the Submit button.
The results are listed a table.For example, searching for policy 300 returns the following result:
Sorting Customers
Reorder the list of displayed customers by sorting columns.
1. In the table of listed customers, press the Menu button and scroll with the trackball to display the Sort onColumn segment.
Mobile Collision Inspection Sample
Try It O
8/3/2019 Sup Ec Sample Mci
22/32
2. Select one of the columns to sort the customers on. Depending on the datatype of the column, customersare sorted alphabetically or numerically.
Working with Policies
Use the Policy MBO to view policy information.
Viewing Policy Details
Open the Policy MBO to search for a policy record using policy_ID as the search criteria.
1. From the Mobile Inspections Center main menu, click Policy.
Progress messages appear indicating whether or not the MBO is being retrieved from the Unwired Server,then the upload and download operation begins.
2. Use the trackball to move the cursor to the policy_ID field and type the policy number you want to searchon.
3. Click the Submit button.The results are listed a table.
For example, searching for policy 300 returns the following result:
Working with Payments
Use the payment MBO to view payment details.
Viewing Payment Details
Open the Payment MBO to search for a payment record using policy_ID as the search criteria.
Sybase Unwired Platfor22
Try It Out
8/3/2019 Sup Ec Sample Mci
23/32
1. From the Mobile Inspections Center main menu, click Payment.
Progress messages appear indicating whether or not the MBO is being retrieved from the Unwired Server,then the upload and download operation begins.
2. Use the trackball to move the cursor to the policy_ID field and type the policy number you want to searchon.
3. Click the Submit button.The results are listed a table.
For example, searching for policy 300 returns the following result:
Synchronizing Data
Synchronization is the term used to refers to the information that is uploaded and downloaded between theUnwired Server and a remote database located on a mobile device.
Data is updated in two ways:
When you load an MBO, Unwired Server downloads data to the device for the back-end database (thatis, serverDB.db), depending on the request you submit with the MBO.
For example, when you use the Policy MBO to get information on a policy ID, the most current informationis passed into the device's version of the database.
When you submit pending operations, all recorded transactions are written to the back-end database.Until then, they are aggregated until all pending operations can be performed in as a group transaction.This aggregation process allows inspectors to still work offline if network access is unavailable.
Checklist of Changes
During the sample walkthrough these changes were made. If you did not follow all steps and examples, usethis list of changes make the necessary data updates now. If you did follow all steps in this sample, you canthen validate updates both in the pending operations list, and in the serverDB.db database.
DetailsOperation
claim ID=11
policy ID=100
claim status=new
inspector name=yours
inspector status=new
Add new claim (11)
cliam ID=22Delete claim (22)
Mobile Collision Inspection Sample
Try It O
8/3/2019 Sup Ec Sample Mci
24/32
DetailsOperation
claim status=reassignmed
inspector name=Maya Nandi
inspector status=under review
Modify new claim (11)
policy ID=200
first name=Doris
last name=McFarlane
msm ID=400-1
Add new customer
policy ID=300Delete a customer
last name=Schulz
Modify new customer (200)
Reviewing and Synchronizing Pending Operations
Pending operations are the add, delete, update operations you performed from an MBO that have beencommitted to the database on the device, but have not yet been synchronized back to the serverDB.db filethat acts as the back-end insurance repository.
1. From any MBO, press the Menu key and select Pending Operations.The Pending Operations screen appears, sorting all transactions first by MBO name, then by transactiontype. If you followed all the changes performed in previous tasks, your screen appears like this:
2. To collapse and expand the view of these operations, press the Menu key and select either Collapse orExpand as needed.
3. To see the details of a single operation, select it, press the Menu key, and select Info.
The information displayed shows details on the pending operation.
Sybase Unwired Platfor24
Try It Out
8/3/2019 Sup Ec Sample Mci
25/32
4. After reviewing the list of pending operations to be performed on information in the back-end repository,press the Menu key and select Submit All Operations.
5. When prompted to confirm, click OK.
All operations you submit are synchronized with the back-end repository.Those changes that were oncedisplayed in red (which indicated an uncommitted change) now appear in black because they have beencommitted to serverDB.db via the synchronization process.
Other options you could choose to perform include:
Delete operation or delete all operations, which removes the transactions from the device's databasecompletely and therefore are never synchronized.
Disable operation, which holds the selected operation back from the group currently being submitted.However, any operations you disable are maintained, until you decide to enable them for future submission,or entirely delete them from the device database.
Validating Synchronization Transactions
Validate synchronization transactions on the back-end consolidated database by browsing tables in UnwiredWorkSpace.
1. In the Enterprise Explorer, expand Databases > MobileInspecDB > ServerDB > Schema > DBA >Tables.
2. Right-click the claim table and select Edit Data.
3. In the Table Filter Data dialog, click OK, as you do not need to filter data for this sample.If Unwired Server successfully synchronized the changes listed in Checklist of Changeson page 23, thetable data opens displaying two claims: 11 and 33.
4. Use the checklist of changes and repeat the previous steps for each table, thereby ensuring that updateshave occurred as expected.
5. (Optional) Display the customer table and add a new customer to it. Save your changes.
For example, the graphic below shows that row 4 is new and unsaved, because it has an asterisk (*)beside it.
Mobile Collision Inspection Sample
Try It O
8/3/2019 Sup Ec Sample Mci
26/32
6. On the BlackBerry, open the Customer MBO and validate that this update has been reflected on the device.
Sybase Unwired Platfor26
Try It Out
8/3/2019 Sup Ec Sample Mci
27/32
Learn More
For more information about this sample, or to get additional help on using Unwired Platform in your enterpriseenvironment, review these section as required by your business needs.
For information about project artifacts, database schemas, and other detailed information on this sample,see Related Referenceon page 27.
For information on how to coordinate your self-directed exploration of Unwired Platform Samples andTutorials, see Coordinating Samples and Tutorialson page 29.
To get help or more information, see Getting Helpon page 30 and Additional Informationon page 29.
Related Reference
Review reference information to understand the implementational and architectural details of this sample.
Project Artifact ReferenceFamiliarize yourself with artifacts of this sample.
All project artifacts are imported into WorkSpace from the MobileInspec.zip file. To explore the project'scontents, expand the project in WorkSpace Navigator. The top-level folder structure of this sample is:
ContentsFolder
The source files for the MBOs used in this sample, as well as their requiredattributes (for example, the tables and columns the MBOs access), and theoperations they perform if any.
Mobile Business Objects
The pointers to the data source used by the MBOs in the sample. In thiscase, there is only one: MobileInspecDB.
Data Source References
The roles defined for the project. The sample project has no roles defined.RolesThe personalization keys defined for the project. The sample project has nopersonalization keys defined.
Personalization Keys
The database files used as the back-end repository for the sample. Thesefiles include the .BAT file that starts the database with all required properties,the database file itself, and its corresponding log file.
DB
The folder where all applicable deployment files are saved. The projectcontain some sample/test deployment files. You can add your owndeployment files if you choose.
Deployment
The folder where generated code is saved.The project contains no generated
code files. However, you can create your own as part of trying out this sample.
Generated Code
Data Access Layer Reference
Because the device database holds a subset of corporate data, the schemas for the consolidated databaseacting as the back-end repository for the sample and the remote device database are the same.
The entity relationship is described in the consolidated database model (serverDB.db).To transfer the subsetof data, a download cursor is defined, so that only the data related to the inspector's immediate workassignments are loaded onto the device.
Mobile Collision Inspection Sample
Learn Mo
8/3/2019 Sup Ec Sample Mci
28/32
This table summarizes the schema for both databases:
Primary keyData typeColumnTable
Yintpolicy_idpolicy
varchar (50)policy_type
varchar (20)policy_status_code
varchar (50)policy_categoryvarchar (200)policy_category_description
Yintpolicy_idcustomer
varchar (50)first_name
varchar (50)last_name
varchar (50)email
vachar (50)messaging_id
Yinclaim_idclaim
intpolicy_id
datedate_of_claim
vachar (50)claim_status
vachar (50)insptector_name
vachar (50)inspection_status
imagephoto
varchar (1000)customer_feedback
imagesignature
Yintpolicy_idpayment
decimalpayment_duedecimalpayment_made
varchar (50)payment_status
Device Application Architecture
The device application for this sample consists of three layers (and their corresponding Web pages or objects)and a listener.
In the presentation layer, the user interface is developed as a series of Web pages that display on theBlackBerry device.
In the business logic layer, business logic is developed independent of the underlying database and
operating system. In the data access layer, simplified access to local data stored in the compact device database allows the
business layer to access and manipulate data. The notification listener waits for incoming events that notify the listener when data has been updated in
the consolidated back-end database. However, this version of this sample does not yet demonstrate thiscapability.
Sybase Unwired Platfor28
Learn More
8/3/2019 Sup Ec Sample Mci
29/32
Coordinating Samples and Tutorials
Unwired Platform includes both samples and tutorials that you can download.
This sample demonstrates the synchronization behavior of Unwired Platform, as well as allows you to explorethe sample artifacts, and deploy them as a functional mobile application. No programming or subsequentUnwired WorkSpace development is required.
You can also download interactive tutorials and cheat sheets that further demonstrate how to use UnwiredPlatform to develop, deploy, and administer Unwired Platform and mobile applications.
Additional Information
Use the Sybase Getting Started CD, the SyBooks CD, and the Sybase Product Manuals Web site to learnmore about Unwired Platform.
Mobile Collision Inspection Sample
Learn Mo
8/3/2019 Sup Ec Sample Mci
30/32
The Getting Started CD contains release bulletins, installation guides, and other documents or updatedinformation not included on the Sybooks CD. It is included with your software.To read or print documentson the Getting Started CD, you need Adobe Acrobat Reader, which you can download at no charge fromthe Adobe Web site using the link provided on the CD.
The SyBooks CD contains product manuals and is included with your software.The Eclipse-based SyBooksbrowser allows you to access the manuals in HTML-based format. Some documentation, however, maybe provided in PDF format as well.
The Sybase Product Manuals Web site is an online version of the SyBooks CD that you can access usinga standard Web browser. In addition to product manuals, you can find links to EBFs/Maintenance releases,Technical Documents, Case Management, Solved Cases, and newsgroups.To access the Product ManualsWeb site, go to http://sybase.com/support/manuals.
In addition, you may also want to access these Web resources:
Sybase Unwired Platform Tech Corner
BlackBerry Developers Network
Ant Script Documentation on Apache.org
Getting HelpEach Sybase installation that has purchased a support contract has one or more designated people who areauthorized to contact Sybase Technical Support.
If you cannot resolve a problem with the online help or other technical documents, please have the designatedperson contact Sybase Technical Support or the Sybase subsidiary in your area.
Sybase Unwired Platfor30
Learn More
http://sybase.com/support/manualshttp://www.sybase.com/developer/library/suptechcornerhttp://na.blackberry.com/eng/developers/http://ant.apache.org/http://ant.apache.org/http://na.blackberry.com/eng/developers/http://www.sybase.com/developer/library/suptechcornerhttp://sybase.com/support/manuals8/3/2019 Sup Ec Sample Mci
31/32
Index
A
additional information 30artifacts
importing 6reference 27
B
BlackBerryapplication architecture 28application, starting 17JDE download 6prerequisites 15
business requirements 5
C
changeschecklist of 23synchronizing 23uncommitted 25
claimsadding 18creating reports 20deleting 19details, viewing 19sorting 19updating 19
connection profiles, creating 7
consolidated databaseexploring 9schema 27
context summary 4customers
adding 20deleting 20details, viewing 21sorting 21updating 21
D
databases
consolidated, exploring 9schema 27
Deploy wizard, using 14Device Application Designer 12, 13
E
emulator, See simulatorentity relationships 27
F
features, Unwired Platform 14Flow Design 13
H
help, getting 30
I
importing projects 6interface design 12
L
layers, architectural 28listener, notification 28logging in 17
M
MBOs 10, 14deploying 14overview 10viewing diagrams of 10
mobile application diagram 11mobile business objects, See MBOs
Nnotification listener 28
O
operations, pending 24
P
paymentsdetails, viewing 23
pending operationsdeleting and disabling 25submitting 24
policiesdetails, viewing 22
prerequisites 6projects
artifact reference 27importing 6
Mobile Collision Inspection Sample
http://-/?-http://-/?-8/3/2019 Sup Ec Sample Mci
32/32
R
referencedata access layer 27project artifacts 27
reports, creating 20requirements 5, 6
Ssample
downloading 6overview 4setting up 6starting up 6, 7
schema 27Screen Design 13ServerDB, exploring 9simulator, starting 15synchronizing
pending operations 24summary of 23
synchronizing (continued)transactions, validating 25
system requirements 6
T
Technical Support , contacting 30transactions, validating 25
tutorials, learing more with 29
U
Unwired Platformfeatures demonstrated 14getting help 30learning more 30profile references 15
Unwired Serverconnection profile 15deploying to 14logging in 17
usage scenario 5
ex