Sample: Mobile Workflow Employee Directory

Sybase Unwired Platform 2.0 ESD #1

DOCUMENT ID: DC01644-01-0201-02 LAST REVISED: August 2011 Copyright © 2011 by Sybase, Inc. All rights reserved. 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 international customers 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 at http://www.sybase.com/detail?id=1011207. Sybase and the marks listed are trademarks of Sybase, Inc. ® indicates registration in the United States of America. SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. 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 mentioned may be trademarks of the respective companies with which they are associated. Use, duplication, or disclosure by the government is subject to the restrictions set forth in subparagraph (c)(1)(ii) of DFARS 52.227-7013 for the DOD and as set forth in FAR 52.227-19(a)-(d) for civilian agencies. Sybase, Inc., One Sybase Drive, Dublin, CA 94568.

Contents
Context Summary ..................................................................1 Usage Scenario ......................................................................3 Get Started .............................................................................5 Prerequisites ...................................................................5 Registering the Device in Sybase Control Center ..........6 Importing the Sample .....................................................7 Working with the Sample Project ....................................9 Exploring the Database ..................................................9 Exploring MBOs ............................................................10 Mobile Business Objects .....................................10 The Mobile Application Diagram ..........................11 Exploring the Mobile Workflow Interface Design ..........12 The Mobile Workflow Forms Editor ......................12 Try It Out ...............................................................................15 Deploying the Sample MBOs to Unwired Server ..........15 Installing the Mobile Workflow Package .......................16 Installing the Mobile Workflow Container on the iOS Simulator ..................................................17 Configuring the BlackBerry Simulator for Mobile Workflow Packages .........................................18 Configuring the Android Emulator for Mobile Workflow Packages .........................................19 Installing Sybase Messaging Runtime on Windows Mobile ..............................................20 Generating Code for a Mobile Workflow Package ...........................................................23 Running the Sample on an iOS Simulator ....................25 Running the Sample on a BlackBerry Simulator ...........31 Running the Sample on an Android Emulator ..............33 Running the Sample on a Windows Mobile Emulator ...37 Additional Modifications ................................................39

Sample: Mobile Workflow Employee Directory

iii

Contents

Learn More ...........................................................................45 Related Reference ........................................................45 Project Artifact Reference ....................................45 Troubleshooting Mobile Device Connectivity Issues ..............................................................46 Learn More about Sybase Unwired Platform ................47 Getting Help ..................................................................48 Index ..................................................................................49

iv

Sybase Unwired Platform

Context Summary

Context Summary
Use the Sybase® Mobile Workflow Employee Directory sample to explore artifacts and the resulting mobile workflow package, the development environment, and the underlying components. The Employee Directory sample is a mobile workflow. It is a secure mobile application that is accessible from a supported smartphone. From their mobile devices, employees can use the Employee Directory to: • • • • • Search for an employee by first name, last name, phone number, or department name. Navigate the organizational hierarchy (by manager and direct reports). Create an employee favorites list. Employees can be added or removed from this list. Initiate a phone call, open e-mail messages, or open a Google map of the employee’s office location. Sign up for notification of new hires or departures.

The Employee Directory sample is based on a development environment that uses: • • • • Sybase Unwired Platform Sybase Unwired Workspace, an Eclipse development environment Mobile Workflow device development The iOS, Android, BlackBerry, and Windows Mobile device platforms

Using this sample provides a comprehensive preview of the benefits Unwired Platform can offer. To learn how to create a mobile workflow package, see Tutorial: Mobile Workflow Package Development. Next steps 1. Review the Usage Scenario on page 3, which explores the business context and use case for the sample. 2. Follow the setup process in Get Started on page 5 to install and prepare artifacts in the Eclipse edition of Unwired Platform. 3. Test functionality and features as described in Try It Out on page 15.

Sample: Mobile Workflow Employee Directory

1

Context Summary 2 Sybase Unwired Platform .

Sample: Mobile Workflow Employee Directory 3 . company employees can quickly communicate with their colleagues and understand with whom they need to interact. Business requirements for the company include: • Provide access to enterprise data sources – by supporting remote access to the employee directory. Secure transactions – the employee (with credentials stored on an LDAP server) must be authenticated. and secure transmission of confidential internal data across the wireless network ensured. • • Next: Get Started on page 5 shows you how to set up the sample on your computer. Reduced maintenance and more simplicity – the mobile workflow package must easily deploy with little or no employee intervention. The employee user base does not want to spend time troubleshooting or self-supporting.Usage Scenario Usage Scenario A company provides its employees with a mobile workflow for their mobile devices that allows them to use the company directory remotely.

Usage Scenario 4 Sybase Unwired Platform .

x. 3. See Exploring MBOs on page 10. review and complete the prerequisites.2. or 6. See Working with the Sample Project on page 9. 4.3 • • • Sample: Mobile Workflow Employee Directory 5 . • • Install Unwired Platform. See Importing the Sample on page 7.0.0 • Android SDK Platform-tools • Android SDK tools For iOS.NET Compact Framework 3. install: • BlackBerry JDE 6. install: • Windows Mobile emulator (or have access to an actual device) • Windows Mobile 6. Review the Prerequisites on page 5. See Exploring the Database on page 9. Open connections to the servers that this sample depends on. 6. or 4. install: • iOS simulator (or have access to an actual device) • Xcode 4 (MacBook or iMac) with iOS SDK 4. Bring all artifacts into the Unwired Platform development environment for Eclipse. The design of the interface correlates to the MBOs that perform database operations. In the sampledb database. See Exploring the Mobile Workflow Interface Design on page 12. 2. For Android.2 and higher. 1. install: • SDK Platform Android 2. For Windows Mobile. 6.1. or 3. For more information on configuring the BlackBerry Development Environment. Review the mobile workflow form interface design in the Mobile Workflow Forms Editor. see Developer Guide for BlackBerry. explore the existing tables that are the foundation for the mobile workflow package.Get Started Get Started You must complete the setup tasks before you can use the Employee Directory sample.5 SDK • Active Sync 4.5 For Blackberry.0 simulator and MDS. Prerequisites Before you begin importing and setting up the sample. Explore the mobile business objects (MBOs) that perform operations against tables in the sampledb database. 5. Note: Sybase Mobile Workflow also supports BlackBerry JDE 5.0.5 • .0. which includes the BlackBerry 6.

the server name is the IP address or fully qualified name of the Relay Server host. Default: 5001 • Farm ID – a string associated with the Relay Server farm ID. click Devices. some steps may differ. some steps may differ. Log in using: User ID : supAdmin Password: s3pAdmin • • • • Note: This was tested and verified using the versions indicated above. Task 1. Click Register. If you are reregistering or cloning a device. 6. Start Unwired Server: In Windows. • Port – the port used for messaging connections between the device and Unwired Server. 6 Sybase Unwired Platform . Default: 0 • Activation code length – the number of characters in the activation code. numbers 0 – 9. 4. Start the simulator or connect the device.mycompany. If using Relay Server. In the right pane. • Server name – the DNS name or IP address of the primary Unwired Server. select View > Select > Unwired Server Cluster Management View. In the Register Device window.Get Started Note: If you are using a different version. such as user1. 2. In the left pane. such as "myserver. select Start > Programs > Sybase > Unwired Platform > Start Unwired Platform Services. Registering the Device in Sybase Control Center Use Sybase Control Center to register the device. Start Sybase Control Center: In Windows. this is the Relay Server port. or a combination of both. If using Relay Server. In Sybase Control Center. enter the required information: • User name – enter a user name. this value cannot be changed. 3. 5. Log in to Sybase Control Center using the supAdmin/s3pAdmin user name and password. Can contain only letters A – Z (uppercase or lowercase). select Device Users. select Start > Programs > Sybase > Sybase Control Center. If you are using a different version.com". Prerequisites You must be connected to Sybase Control Center.

a) Click File > Import. 1. Note: <server_name> should be the actual name of your machine. Ensure that the Mobile Development Perspective is open. Importing the Sample Import the sample project archived in EmpDir2_0. select General > Existing Projects into Workspace and click Next. or a combination of both. b) In the Import wizard. This value can contain letters A – Z (uppercase or lowercase). Import EmpDir2_0. Sample: Mobile Workflow Employee Directory 7 . Start Unwired WorkSpace and choose your workspace by clicking Start > Programs > Sybase > Unwired Platform > Unwired WorkSpace. (Optional) Select the check box adjacent to Activation Code to enter the code sent to the user in the activation e-mail. 2.zip into Sybase Unwired Platform. numbers 0 – 9. Acceptable range: 1 to 10 characters.zip.Get Started • • Activation expiration (hours) – the number of hours the activation code is valid.

9. select Sybase ASA as the connection profile type. and database name. Provide values for the database server type. connection profile name. 8. click Test Connection. ping the server to see whether or not it is available. and configure these connection properties: Property Host Port Database name User name Password Save password Value The default is localhost. In the Enterprise Explorer. c) In Drivers. A sampledb database connection profile is added.x for Unwired Server Default. and click Next. sql. b) In New Connection Profile. Right-click the empDir. When you are finished. If it does not. d) Click OK in the Ping Succeeded window. Copy the empDirImages folder from the Workspace Navigator to C:\. 3. 5500 sampledb Use the default. This new profile should resolve any connection profiles errors you received when you imported the EmpDir project. dba. then select Execute SQL Files. Right-click the EmpDir project and select Open in Diagram Editor. right-click the Database Connections folder and select New. Start the sample database by executing <UnwiredPlatform_InstallDir>\UnwiredPlatform \Servers\UnwiredServer\bin\sampledb. d) Click Finish to import the artifacts in the archive as a project.sql file. enter sampledeb. Use the default. 4. Ensure that the advanced developer profile is selected. 8 Sybase Unwired Platform . Right-click the EmpDir project and select Deploy Project. Select this option. 6. Select Message-based. 5.Get Started c) Choose Select archive file and browse to the location where you saved EmpDir2_0.bat start from the command line. e) Click Finish. 7.zip. select ASA v 11. in Name. create an ASA connection profile and connect to sampledb by following these steps: a) In Enterprise Explorer.

Get Started For more information. By understanding the structure of the database. 12. In the Sybase Control Center. 2. When you connect to the server. open Workflow (for iOS) or go to the Inbox (for BlackBerry or Windows Mobile) and choose Workflows. In Enterprise Explorer. keys. expand Database Connections > sampledb > sampledb. expand Tables. click Refresh and ensure that the status for the registered user is Online. 2. to review the table design for each (columns.xbw and select Generate Mobile Workflow Package. In WorkSpace Navigator. see the section called Install and Configure the Mobile Workflow Container On the Device in Developer Guide for Mobile Workflow Packages. Connect to the Unwired Server: a) In Enterprise Explorer. 1. then select the workflow named Empdir. you can now explore its structure and design. Sample: Mobile Workflow Employee Directory 9 . Expand each table of interest. Exploring the Database If you have started and connected to the database. On the device. expand the EmpDir folder to view the project artifacts. you can better understand how the business logic programmed into the mobile workflow works with the database. Project artifacts are contained in the Mobile Business Objects and Deployment folders. Right-click EmpDir. you can browse artifacts and open required server connections. The tables have been explicitly designed for this sample. such as Emps or EmpFavorites. Configure the Sybase Settings on the device for the newly created user. 10. 11. Working with the Sample Project Once you have imported the sample and started the EmpDir database server. To browse the tables used by the mobile application. a complete set of administrable elements appear below the server icon. and so on). b) Right-click the My Unwired Server icon and choose Connect. expand the Unwired Server folder. 1. constraints. 13.

EmpFavorites and Emps match two of the table names in sampledb. MBOs include: • • Implementation-level details – read-only metadata columns that include information about the data in the implementation. and explore how MBOs are bound to the EmpDir table as their back-end data source. link attributes. To see the MBOs and understand the business logic behind them. or a bottom-up approach – specifying a data source. as well as role and server mappings. Mobile Business Objects Mobile business objects form the business logic for mobile applications and workflows. A mobile application includes MBOs. Web Service. and parameters in one MBO to attributes and parameters in another MBO. and can be used to update. 2. and automatically generating attributes and parameters from it. In WorkSpace Navigator. and later binding them to a data source. • You can define MBOs using either a top-down approach – designing attributes and parameters first. Parameters correspond to synchronization parameters on the mobile client and map to arguments. expand the EmpDir > Mobile Business Objects folder to view the MBOs created for this sample (EmpFavorites. and so on). 10 Sybase Unwired Platform . Abstract-level details – attributes correspond to class-level properties on the mobile client and map to columns. MBOs can also contain operations. right-click any MBO and select Open in Diagram Editor. which themselves contain parameters and arguments. and ListEmpFavorites). When a sync happens. Relationships – defined between MBOs. 1. the changes are sent to the Sybase Unwired Platform server and changes in the actual enterprise database are sent to the mobile device. With Mobile Workflow. there is no client-side store that is synchronized with the server's consolidated database. When users makes changes. Emps. those changes only apply to their local copy of the data. or delete data. even though the user exchanges data with the server. SAP® server. and other artifacts that are delivered to the Unwired Server during deployment. For native applications a database runs on the mobile device. MBOs form the business logic for mobile workflows that can be deployed to an Unwired Server and referenced in mobile devices (clients).Get Started Exploring MBOs Review the existing attributes and operations for mobile business objects. A mobile business object (MBO) is derived from a data source (database server. create.

What the Mobile Application Diagram Shows The diagram shows the different objects and how they are related to each other : • • • Emps MBO – represents employee information. The Mobile Application Diagram is not only a static graphical representation of MBOs. create a new object. Sample: Mobile Workflow Employee Directory 11 . To explore this functionality. open the Unwired Platform online documentation and click Sybase Unwired WorkSpace Mobile Business Object Development > Develop > Working with Mobile Business Objects > Mobile Business Object General Properties > Managing Mobile Application Diagram Filters and Logical Groups. ListEmpFavorites MBO – represents a listing of an employee's favorites.Get Started The Mobile Application Diagram Each mobile application project has an associated Mobile Application Diagram that provides a graphical representation of all mobile business objects (MBOs) within the project. However. For a larger project. or even define data sources for MBOs that are not yet bound to an enterprise data source. you might want to create a filter to view only selected MBOs – either by explicitly selecting the MBOs. You can copy and paste existing objects. the application diagram used in this sample is complete as provided. EmpFavorites MBO – represents a list of commonly contacted employees. or by creating a logical group.

Screen Design Use this page to design the screen of your custom device mobile workflow. Screens that you drag to the Flow Design canvas are displayed as icons and show the connection lines between them.xbw. Right-clicking anywhere in the Flow Design page displays a context menu. opens the Introduction section of the Mobile Workflow Forms Editor. The Mobile Workflow Forms Editor has drag-and-drop functionality. double-click empDir. You can also see each individual screen by selecting it. then clicking the Screen Design tab. Flow Design Use this page to specify the manner in which screens link together. or double-clicking an existing one. Instead. In WorkSpace Navigator. the mobile workflow package relies on the MBOs that are deployed to the Unwired Server to provide the business logic. This page is the starting point for designing your custom device mobile workflow. which shows the available screens and connections. Drag controls to design the user interface on the device screen.Get Started Exploring the Mobile Workflow Interface Design Use the Mobile Workflow Forms Editor to explore the mobile workflow package. You can drag and drop items from the Palette to the canvas. 2. The Flow Design page displays an empty canvas with the Palette to the right. 1. The Palette view shows the menu and controls you can use to design a new screen. The Mobile Workflow Forms Editor The Mobile Workflow Forms Editor consists of views and pages that allow you to model the interface of the device screens. Business logic is not stored in the mobile workflow package. You can access help and launch tutorials from this page. The Palette view shows available screens and connections. The Mobile Workflow Forms Editor contains three pages: • Introduction Creating a new custom device workflow. which allows you to drag and drop mobile business objects onto the Flow Design page. The separation of the workflow interface from the processing and logic components keeps the workflow compact and makes more efficient use of the client device’s battery. Dragging a new screen into this page starts a new screen. Click the Flow Design tab to explore the flow of all existing screens. Double-clicking a screen opens the Screen Design page. You can then link specific screens and actions to a mobile business object on a server. • • 12 Sybase Unwired Platform . You can also drag and drop mobile business object operations onto the Flow Design page.

Get Started The Device Workflow toolbar includes a list of existing screens. Sample: Mobile Workflow Employee Directory 13 . You can open a different screen by selecting the corresponding screen name from the list.

Get Started 14 Sybase Unwired Platform .

In addition. 2.Try It Out Try It Out Deploy the sample MBOs. target version.xbw). and run the sample on a device simulator. register device users. Right-click the EmpDir project and select Deploy Project. and package name. and click Next. open the Unwired Platform online help and click Sybase Unwired WorkSpace . Note: Skip this section if you have already implemented the steps in Get Started > Setting Up the Sample. 1. Sample: Mobile Workflow Employee Directory 15 . In the sections that follow you will be able to see basic usage of the Workflow application. For information on the other options. the device cache. Task There are multiple techniques you can use to deploy the mobile application. This sample documents how to deploy the sample from the project. adding a confirmation dialog.Mobile Business Object Development > Develop > Packaging and Deploying Mobile Business Objects. and debugging. Prerequisites Ensure you are connected to an Unwired Server. Now that you have set up your sample project and understand the MBOs that are used. you can deploy those MBOs to Sybase Unwired Server and run the sample on a device simulator. then run the mobile workflow application on it. including the look and feel on the device. Accept the defaults for the deploy mode. you will learn how to apply optional modifications to the sample. Deploying the Sample MBOs to Unwired Server Deploy the sample to the Unwired Server to make the MBO logic available to the user interface (empDir. Select Message-based. You can install a device simulator.

6. Select My Unwired Server and click Connect.Try It Out 3. b) Accept the defaults and click OK. This mapping process creates a named endpoint to the correct server that gives you access to the systems you require. 7. This window is only seen if you are using the Advanced Developer Profile. Click Finish to deploy the package to the Unwired Server. 16 Sybase Unwired Platform . If you are using the Advanced profile. install the Mobile Workflow package. Accept the defaults for Domain and Security configuration. map the connection profile for sampledb to the Server connection profile of the same name. and generate the Mobile Workflow package files. and click Next. 5. 8. select New Server Connection. (Optional) In the Packager User-defined Classes window. 4. Installing the Mobile Workflow Package Configure the emulator or simulator. Select all boxes to deploy all MBOs and click Next. a) From Server Connection. click Next.

smb://<machine DNS name> or smb://<IP Address>. Prerequisites • • Register the device in Sybase Control Center Xcode 4 (MacBook or iMac) with iOS SDK 4. You can use the provided source code in Xcode to build your own customized user interface and configure other resources.1.framework • QuartzCore.xcodeproj so that it opens in the XCode IDE.tar. This creates a Workflow folder. Unarchive the MobileWorkflow-2.dylib • libstdc++.0. If necessary. The project builds and the simulator starts. double-click WorkFlow. Configuring iOS Connection Settings Goal: Configure the settings for the Mobile Workflow application.3.2.1.framework • CoreFoundation. 2.1.A. add these frameworks from the SDK to the project by selecting Project > Edit Active Target > <ProjectName> > General: • Security.gz from your Sybase Unwired Platform installation <UnwiredPlatform_InstallDir>\UnwiredPlatform \ClientAPI\Workflow\ios to a location on your Mac: 3.0. select Go > Connect to Server.framework • libicucore.gz. for example.Try It Out Installing the Mobile Workflow Container on the iOS Simulator The Workflow Container referenced in this procedure is a sample container. In XCode.dylib 6. 4.x Task 1.dylib • libz. From your Mac.tar. 5. b) Enter the name or IP address of the machine.2. connect to the Microsoft Windows machine where Sybase Unwired Platform is installed: a) From the Apple menu. Sample: Mobile Workflow Employee Directory 17 .framework • AddressBook. You see the shared directory. select Build > Build. In the Workflow folder. Copy the MobileWorkflow-2.

Go to your iOS simulator Settings and click WorkFlows. These include: • • • • • CommonClient.cod – shared code that can be used by native Sybase Unwired Platform BlackBerry applications.cod – messaging library. Enter the settings for the Mobile Workflow application: • Server Name – the machine that hosts the server where the mobile application project is deployed. navigate to Options > Third Party Applications > Sybase Settings. The default is 5001. • Activation Code – the activation code for the user.0. • Company ID – the company ID you entered when you registered the device in Sybase Control Center.cod – the main Mobile Workflow application. 2. 1. 4. MocaClient. MessagingClientSettings. • Server Port – Unwired Server port number. the Mobile Workflow icons. Copy the required .Try It Out 1. 1. Navigate to <UnwiredPlatform_InstallDir>\UnwiredPlatform \ClientAPI\Workflow\BB. Start the MDS server by clicking Start > Research in Motion > BlackBerry JDE 6. MessagingClientApp. • Server Port – Unwired Server port number. 3. Configuring BlackBerry Connection Settings Configure the connection settings for the Mobile Workflow application on the BlackBerry simulator.0 > MDS-CS. Enter the settings for the Mobile Workflow application: • Server Name – the machine that hosts the server where the mobile application project is deployed. 2. WorkflowResources. The default is 5001. Start the BlackBerry simulator.cod files to the BlackBerry simulator directory. 18 Sybase Unwired Platform . 2. Configuring the BlackBerry Simulator for Mobile Workflow Packages Copy the .cod – Sybase Settings options screen where the user enters the server connection information. for example. 123. 0 (zero). 0 (zero). in this case. On your simulator. in this case. such as user1.cod – image resources for the Mobile Workflow application. • User Name – the user you registered in Sybase Control Center.cod files to the BlackBerry simulator directory. • Company\Farm ID – the company or farm ID you entered when you registered the device in Sybase Control Center.

Configuring the Android Emulator for Mobile Workflow Packages Configure the Android emulator. The Sybase Mobile Workflow application should now appear in the emulator.Try It Out • • User Name – the user you registered in Sybase Control Center. Click New. 5. Run the Android SDK Manager and select Virtual devices. 2. in this case. From the Sybase Settings screen. Start the Mobile Workflow application. Prerequisites Install the Android SDK and run the SDK Manager to install SDK Platform Android version 2. delete the device user previously created in SCC. repeat these commands to ensure the files are properly installed.apk and Workflow. provide a name. navigate to Settings > Sybase Settings. On your simulator. If you encounter an error indicating the device is offline. The Settings log indicates if you are successfully connected to the server.2 or higher. 4. 0 (zero). for example. (Optional) Select Wipe User Data. Configuring Android Connection Settings Configure the connection settings for the Mobile Workflow application on the Android simulator.2 or higher for the target. Android SDK Platform tools. Enter the settings for the Mobile Workflow application: • Server Name – the machine that hosts the server where the mobile application project is deployed. If you selected Wipe User Data. Select Menu > Save to save the settings. The default is 5001.apk. reinstall the apk files if they were previously installed. 3. which are located in \UnwiredPlatform\ClientAPI \Workflow\Android. Sample: Mobile Workflow Employee Directory 19 . and recreate the device user in SCC. Run platform-tools\adb and install SybaseDataProvider. Activation Code – the activation code for the user. • Server Port – Unwired Server port number. 3. 1. 2. 123. • Company\Farm ID – the company or farm ID you entered when you registered the device in Sybase Control Center. and select 2. In the Android emulator. and Android SDK Tools. Task 1. start the newly created virtual device. then select Menu > show Log to verify that the connection is active.

for example.cab once to start the installation. Installing Sybase Messaging Runtime on Windows Mobile Start the Device Emulator Manager and your synchronization software. right-click the device you want to use.Try It Out • • User Name – the user you registered in Sybase Control Center. From the list of devices. 3.0 and double-clicking dvcemumanager. Use File Explorer on the device emulator to browse to the SUPMessaging_Pro. 4.cab file to a folder on your mobile device. Task 1. for example: 5. Select Save to save the settings. The Settings log indicates if you are successfully connected to the server. Start the Mobile Workflow application.cab file. The synchronization software appears. and the device must be connected and cradled.NET Compact Framework 3. Right-click on the device again and select Cradle. From the Sybase Settings screen. and select Connect. and install Sybase Messaging Runtime. then select Show Log to verify that the connection is active. 20 Sybase Unwired Platform . Activation Code – the activation code for the user. 123. 3. Start the Device Emulator Manager by navigating to C:\Program Files \Microsoft Device Emulator\1. Go to <UnwiredPlatform_InstallDir>\UnwiredPlatform\ClientAPI \Workflow\WM and copy the SUPMessaging_Pro. The synchronization software must be running. Prerequisites • • The Sybase Messaging runtime client requires that you have Microsoft . 6. 2. cradle the device. Click on SUPMessaging_Pro.5 Redistributable installed.

Sample: Mobile Workflow Employee Directory 21 . 5. In Windows Explorer. 4. or Windows 2008. Select File > Connection Settings. Click OK. If you are using Windows Vista. install Virtual PC 2007 SP1 and Windows Mobile Device Center to manage synchronization settings.com/windowsmobile/enus/help/synchronize/device-synch. 1.microsoft. When installation is complete. 2. Note: Microsoft ActiveSync is for Windows XP. Windows XP requires ActiveSync version 4. 3.com/windowsmobile/en-us/downloads/microsoft/device-centerdownload.microsoft. Select Allow Connections to One of the Following. Windows 7. Download the Windows Mobile Device Center from http:// www.5. Save it to your local machine. Under This Computer is Connected to. 7. select Work Network. 8. double-click setup. Download Microsoft ActiveSync from http://www. then select DMA.msi.mspx. ActiveSync starts automatically. Double-click the ActiveSync icon. and its icon appears in the Windows toolbar. 6. restart your machine.Try It Out Installing Microsoft Synchronization Software Install and configure Microsoft synchronization software so you can deploy and run a mobile application on a Windows Mobile emulator.mspx.

123. In the Sybase Settings screen. 22 Sybase Unwired Platform . Task Note: This procedure uses a Windows Mobile 6. In the Connection screen. enter the connection settings: • Server Name – the machine that hosts the server where the mobile application project is deployed. 3. The default is 5001. select Start > Programs > Sybase Settings. • Server Port – Unwired Server port number. such as user1 • Activation Code – the activation code for the user. 2. in this case. • User Name – the user you registered in Sybase Control Center. click Connection. If you use a different emulator version. On the emulator.Try It Out Configuring Windows Mobile Connection Settings Configure the connection settings on the Windows Mobile emulator.0 Professional Edition emulator. the user interface will vary slightly from this tutorial. Prerequisites The Sybase messaging runtime client must be installed on the Windows Mobile emulator. 0 (zero). • Farm/Company ID – the farm or company ID you entered when you registered the device in Sybase Control Center. 1.

2. In the Mobile Workflow Application Designer. Prerequisites Complete these tasks: • • • The device must be registered in Sybase Control Center. (Windows Vista. start it now.Try It Out Note: "localhost" should be the name of your machine. user1. Deploy to an Unwired Server Assign workflow to users Sample: Mobile Workflow Employee Directory 23 . click . Click Done. and in Deploy Mode. and click Get Users. select: Option Favorite configurations Generate Unwired Server Profile Description (Optional) Select a configuration. Generating Code for a Mobile Workflow Package Generate the files for the Mobile Workflow package and deploy them to the Unwired Server. select New. If Microsoft ActiveSync is not running. Select a user. Windows 7. Select this option. start it now. (Windows XP) If Windows Mobile Device Center is not running. In the New Mobile Workflow Package Generation wizard. for example. Deploy the mobile workflow package to an Unwired Server. Windows 2008) Task 1. 4. Select Generate into the project. Select My Unwired Server as the profile with which to associate the mobile workflow package.

In the Mobile Workflow Package Generation wizard. The mobile workflow package appears in Enterprise Explorer in the Workflows folder under Unwired Server. 24 Sybase Unwired Platform . click Finish.Try It Out 3. The files for the mobile workflow package are generated and stored in the specified location as a .zip file.

Sample: Mobile Workflow Employee Directory 25 . 1. Launch the Workflow application. Launch the iOS simulator. 2.Try It Out Running the Sample on an iOS Simulator Run the Workflow application to try out the Employee Directory sample on your iOS simulator. then set a password. You can see the Sybase mobile workflow client application.

Try It Out The workflows are listed. 3. The Credential screen appears once. and server notifications appear as e-mail messages in the Messages section. Select the empDir application. 26 Sybase Unwired Platform .

Your credentials are cached by the mobile workflow and are not requested again. Provide the user ID and password.Try It Out 4. Search the employee directory in a variety of ways. Sample: Mobile Workflow Employee Directory 27 . 5. Use the % symbol to represent wildcards.

28 Sybase Unwired Platform . Select one of the results to display Employee Details. 6.Try It Out The following are example search results for employees whose names begin with Jo.

8. 9. Create a notification e-mail message when an employee is hired or terminated. This functionality requires additional setup and configuration of an e-mail server. and request the list from the Search screen. In the Employee Details screen. • Navigate through the company hierarchy by selecting the Manager or Direct Reports. The e-mail message is sent to those employees who registered for notifications. Go to the Options screen. do any of the following: • View attachments such as images using the attachment viewer. The insert Sample: Mobile Workflow Employee Directory 29 . which allows you to enable or disable notifications.Try It Out 7. Add a commonly contacted employee to a favorites list.

sql are provided as examples. 10.Try It Out and delete triggers provided in EmpDir. 30 Sybase Unwired Platform . To simulate this process. Provide the information to send to the device. An e-mail notification now appears on the device. use the Send a Notification wizard.

In the Employee Details screen. 5. In the Messages section. Launch the BlackBerry simulator. followed by a credentials screen. 3. Sample: Mobile Workflow Employee Directory 31 . 1. Add a commonly contacted employee to a favorites list. Use the % symbol to represent wildcards. Search the employee directory in a variety of ways. Select Workflows. 7. do any of the following: • View attachments such as images using the attachment viewer. • Navigate through the company hierarchy by selecting the Manager or Direct Reports. and server notifications appear as e-mail messages. Your credentials are cached by the mobile workflow and are not requested again.Try It Out Running the Sample on a BlackBerry Simulator Run the Workflow application to try out the Employee Directory sample on your BlackBerry simulator. 2. Select the empDir application. 6. the workflows are listed. 4. and request the list from the Search screen. A help screen appears. Provide the user ID and password.

sql are provided as examples. which allows you to enable or disable notifications. 8. Provide the information to send to the device. This functionality requires additional setup and configuration of an e-mail server. To simulate this process. The e-mail message is sent to those employees who registered for notifications. The insert and delete triggers provided in EmpDir.Try It Out Go to the Options screen. use the Send a Notification wizard. 32 Sybase Unwired Platform . 9. Create a notification e-mail message when an employee is hired or terminated.

Launch the Android emulator. Launch the Workflow application. 2. 1. Sample: Mobile Workflow Employee Directory 33 . and enter your password.Try It Out Running the Sample on an Android Emulator Run the Workflow application to try out the Employee Directory sample on your Android emulator.

Use the % symbol to represent wildcards: 5. 4. Your credentials are cached by the mobile workflow and are not requested again. Select the empDir application. 34 Sybase Unwired Platform . and server notifications appear under the Sybase Workflows screen. Select one of the results to display Employee Details. 6.Try It Out The workflows are listed in the next screen. Enter your user ID and password. 3. Attachments such as images are displayed using the attachment viewer. You can search the employee directory in a variety of ways. Search the results for employees whose names begin with Jo.

Sample: Mobile Workflow Employee Directory 35 . which allows you to enable or disable notifications. Navigate through the company hierarchy by selecting the Manager or Direct Reports buttons. 8.Try It Out 7. To simulate this process. The insert and delete triggers provided in EmpDir. use the Send a Notification wizard. When an employee is hired or terminated. From the Search screen navigate to the Options screen. This requires additional setup and configuration of an email server.sql are provided as examples. 9. an e-mail message is sent to those employees who registered for notifications. Simulate a notification e-mail message.

Try It Out The information you provide in the Send Notification to a Device User dialog is sent to the device: A notification now appears on the device: 36 Sybase Unwired Platform .

Use the % symbol to represent wildcards. 4. 1. Select the empDir application. Search the employee directory in a variety of ways. 3. followed by a credentials screen. Select Workflows. A help screen appears. and server notifications appear as e-mail messages.Try It Out Running the Sample on a Windows Mobile Emulator Run the Workflow application to try out the Employee Directory sample on your Windows Mobile emulator. Launch the Windows Mobile emulator. Provide the user ID and password. 2. 5. In Outlook E-mail the workflows are listed. Your credentials are cached by the mobile workflow and are not requested again. Sample: Mobile Workflow Employee Directory 37 . The following are example search results for employees whose names begin with Jo.

and request the list from the Search screen.Try It Out 6. Create a notification e-mail message when an employee is hired or terminated. The e-mail message is sent to those employees who registered for notifications. Provide the information to send to the device. The insert and delete triggers provided in EmpDir. 8. use the Send a Notification wizard. which allows you to enable or disable notifications. Add a commonly contacted employee to a favorites list. In the Employee Details screen.sql are provided as examples. • Navigate through the company hierarchy by selecting the Manager or Direct Reports. do any of the following: • View attachments such as images using the attachment viewer. Go to the Options screen. 38 Sybase Unwired Platform . Select one of the results to display Employee Details. This functionality requires additional setup and configuration of an e-mail server. 9. 10. To simulate this process. 7.

including the look and feel on the device.Try It Out Additional Modifications Apply additional modifications to the sample. start. select Window > Preferences > Sybase. To use a basic look and feel. the device cache. Basic Look and Feel When you develop a workflow. Inc > Mobile Development > Mobile Workflow Forms Editor: Sample: Mobile Workflow Employee Directory 39 . and debugging. adding a confirmation dialog. and debug easily. it is recommended that you begin with a basic look and feel. This will enable you to generate a smaller workflow package that you can deploy.

you could add a gradient background and footer by replacing the customBeforeWorkflowLoad and customAfterNavigateForward functions with the contents of the Customization\gradientAndFooter.zip file. Ensure the look and feel setting is set to Basic for this example. delete the previously generated contents if the sophisticated look and feel was previously selected. Run the Package Generate wizard to redeploy the mobile workflow.zip file that is deployed to the device.js file. since that platform already uses buttons instead of native menus. When you use the basic look and feel.png into that folder. replace the contents of these same functions with the contents in Customization \menusToButtons.txt. all the contents under the html folder are included in that . Customized Look and Feel You can further customize the look and feel by modifying the Custom. If you prefer to replace menu items with buttons instead of adding a gradient background and footer. Note that this change does not apply to iOS.txt file included in the EmpDir project. Then create an images folder under the generated html folder and copy EmpDirImages\gradient2. For example.Try It Out When you generate the . 40 Sybase Unwired Platform .

with color: black Add a Confirmation Dialog To add a confirmation dialog.txt included in the EmpDir project. 666666). you could modify the color-stop values in the following code: For example. suppose you would like to modify this entry: . modify color: #FFF.js with the contents in Customization\beforeSubmit.0a3.css file. FFFFFF)). replace the contents of the customBeforeSubmit function in Custom. and run the Package Generation wizard to redeploy the mobile workflow: Sample: Mobile Workflow Employee Directory 41 . color-stop(0. To use a color-stop value of #B2CFDA and white.left bottom.left top. For example.ui-body-a { … background-image: -webkit-gradient(linear. color-stop(0.mobile-1. modify the html\css\jquery \jquery.Try It Out To make changes to the sophisticated look and feel.

phone number. select the By First Name menu item on the Search page and enter a value of 240.js with the contents in Customization\beforeShowScreen. and the results will be available even when the device is not connected to the network if you invoke the search within 4 minutes of the previous search. and open e-mail messages. To make these changes. 42 Sybase Unwired Platform .txt included in the EmpDir project: Improve Searches To improve your searches. This will result in faster results in subsequent searches. set the On-device cache timeout property. and e-mail text fields with clickable links to open Google Maps. replace the contents of the customBeforeShowScreen function in Custom.Try It Out Add Clickable Links You can add custom code to replace the location. In addition. which is equivalent to 4 minutes. For example. you can replace the attachment viewer link with an img tag so the employee's image can be shown without navigating to another screen. dial the phone.

To simulate the workflow message that would be passed into the workflow as a result of a menu action or a server notification. Sample: Mobile Workflow Employee Directory 43 . add ?screenToShow=Search.html. The simplest way to do this is to drag and drop the generated html file. Add a parameter to the URL to indicate the screen to be displayed. we can execute the menu action on a mobile device or simulator and then copy the workflow message that was sent to the device. such as workflow.Try It Out Use a Debugger At times it is useful to be able to step through the customized code with a debugger. onto a browser such as Chrome and press <Ctrl>-<Shift>-J to display the Java Script Console. For example.

The message should appear as follows: <XmlWidgetMessage> <Header></Header> <WidgetScreen>Favorites</WidgetScreen> <RequestAction>Favorites</RequestAction> <Values> <Value key="ListEmpFavorites" type="LIST"> <Values key="100010" state=""> … </XmlWidgetMessage> 4. which is derived from the rmi. Click on a favorites item to see the details screen.js. Now you can add a breakpoint. in the workflows shown in the browser. Modify the TraceConfig. b.xml file located at C:\Sybase\UnwiredPlatform \Servers\MessagingServer\Data\TraceConfig. Restart the Sybase Messaging Service by running the following commands from a command prompt: net stop Sybase Messaging Service net start Sybase Messaging Service 3. a. 5. On the device.Try It Out 1.txt file that contains the device user name in it. Open a desktop browser such as Chrome to the appropriate URL such as http:// servername/EmpDir_Sol/EmpDir/html/workflow. perform a search to return the favorite items. select an employee. To use that breakpoint.xml in the html folder. and click the Remove menu item. Press <Ctrl>-<Shift>-J to display the Java Script Console. copy the returned message and paste it into a file named rmi. Copy the generated html folder to a Web server. 44 Sybase Unwired Platform .xml file that contains the workflow message with the data from a previous query. such as the htdocs folder on Apache. for example. select Favorites. in the customBeforeSubmit function. Click the Scripts tab and select Custom. In the folder C:\Sybase\UnwiredPlatform\Servers\UnwiredServer \logs\WorkflowClient locate a . Click on Favorites to view the data.html? screenToShow=Search. 7. Within that file.xml and ensure that the WorkflowClient is set to debug: <Module Name = "WorkflowClient" "WorkflowClient"/> Level = "Debug" Desc = 2. 6.

• • For information about project artifacts. and other detailed information on this sample. see Related Reference on page 45. the database file itself. All project artifacts are imported into Sybase Unwired Platform from the EmpDir.zip file. see Learn More about Sybase Unwired Platform on page 47. Project Artifact Reference Familiarize yourself with artifacts of this sample. • Related Reference Review reference information to understand the implementational and architectural details of this sample. database schemas. To get help or more information. The sample project has no roles defined. The toplevel folder structure of this sample is Folder Mobile Business Objects Contents The source files for the MBOs used in this sample. To explore the contents of the project. and documentation. The sample project has no personalization keys defined. Data Source References Roles Personalization Keys DB Sample: Mobile Workflow Employee Directory 45 .Learn More Learn More Learn about this sample. and the operations they perform if any. For information on how to coordinate your self-directed exploration of Unwired Platform samples. and its corresponding log file. as well as their required attributes (for example. The database files used as the back-end repository for the sample. The personalization keys defined for the project. tutorials. the table and columns the MBOs access). see Getting Help on page 48. The roles defined for the project. In this case. These files include the . expand the project in WorkSpace Navigator.BAT file that starts the database with all required properties. or get additional help on using Unwired Platform in your enterprise environment. The pointers to the data source used by the MBos in the sample. there is only one: PurchaseOrderDB.

com. Out of Network This may indicate a network problem. 2. If it does not. As a first step on the device or simulator choose Restart Client and then Show Log (not available on iOS). If you are using a BlackBerry simulator. Viewing the device or simulator's log file can be helpful in determining connectivity problems. Wrong Device for Code This indicates that the user name specified is being used by another device. Windows 7) Active Sync connection. An empty white page should appear. Verify that the server name and port are correct. Cannot Connect to Server 1. You can add your own deployment files if you choose. This is also the port number used when creating the device user. verify that MDS is running. In SCC.com. Check the device or simulator's network settings and verify them by opening a browser to a website such as google. 46 Sybase Unwired Platform . Bad User Name or Code This indicates that the activation code or user name specified is incorrect.Learn More Folder Deployment Contents The folder where all applicable deployment files are saved. ensure that there is an Active Sync (Windows XP) or Windows Mobile Device Center (Windows Vista. create a new device user. On a Windows Mobile simulator. Server Response Timeout This indicates that a networking problem exists. Check the device or simulator's network settings and verify connectivity by opening a browser to a website such as google. Recheck the settings on the device and in SCC. Open a browser on the device or simulator or machine that is running the simulator to http://MACHINE_NAME_WHERE_SUP_IS_INSTALLED:5001 where 5001 is the messaging based synchronization port number shown in SCC under Servers > Server Name > Properties > Messaging Based Synchronization Port. The project contains some sample/test deployment files. configure your firewall settings to unblock port 5001. Troubleshooting Mobile Device Connectivity Issues Provides troubleshooting information for mobile device connectivity issues to the Unwired Server.

or the Product Documentation Web site. If necessary. Select Servers > Server Name > Server Configuration > Messaging > BlackBerry Push Configuration.jsp?topic=/com.docsetSUP-2.sybase. or refer to other development documents in the Sybase Unwired Platform documentation set.sdn. Redeploy your workflow after performing this action. Disabled: Low Storage This issue may occur on a Windows Mobile simulator.com/help/index. browse to Device\Program Files\Sybase\Messaging \AMP and delete the sub folder.sap. Online Help See the online help that is installed with the product.0/doc/html/title.Learn More Awaiting Server Notification After you deploy a workflow. Check the Sybase Product Documentation Web site regularly for updates: http:// infocenter. if it does not appear on the device and this message is seen. you may need to modify the BlackBerry Push Configuration in SCC. Samples Sample applications are fully developed.com/irj/sdn/mobile. Learn More about Sybase Unwired Platform Once you have finished.0.pubs. If this works and the device is a BlackBerry. working applications that demonstrate the features and capabilities of Sybase Unwired Platform. try some of the other samples or tutorials. Tutorials Try out some of the other getting started tutorials to get a broad view of the development tools available to you. Click on Sybase Unwired Platform and navigate to Samples. Developer Guides Learn about using the API to create device applications: • • • • Developer Guide for BlackBerry Developer Guide for iOS Developer Guide for Mobile Workflow Packages Developer Guide for Windows and Windows Mobile Customize and automate: Sample: Mobile Workflow Employee Directory 47 .infocenter. Check the SAP Development Network (SDN) Web site regularly for updates: http:// www.sybase. try restarting the client. On the device check Settings > System > Memory.html.

48 Sybase Unwired Platform . If you cannot resolve a problem using the online help or other technical documents. have the designated person contact Sybase Technical Support or the Sybase subsidiary in your area. and administration. Getting Help Each Sybase installation that has purchased a support contract has one or more designated people who are authorized to contact Sybase Technical Support.Learn More • • Developer Guide for Unwired Server Management API – customize and automate system administration features. such as data handling. Developer Guide for Unwired Server – customize and automate server-side implementations for device applications. Javadoc and HeaderDoc are also available in the installation directory.

installing and configuring 21 Android 19 Android emulator 33 applications generating code for device 23 artifacts reference 45 H help. exploring 9 Simulator 15 Sophisticated look and feel 39 SUPMessaging_Pro. exploring 9 D Debugging 39 deploying configuring ActiveSync for 21 deploying to Unwired Server 15 device applications generating code for 23 P prerequisites 5 projects artifact reference 45 E Emulator 15 emulator connection settings. installing and configuring 21 Mobile Application Diagram 11 mobile applications generating code for 23 C Clickable links 39 Confirmation dialog 39 consolidated database. getting 48 I installing Microsoft ActiveSync 21 synchronization software 21 interface design 12 iOS simulator 25 B Basic look and feel 39 BlackBerry simulator 31 M MBOs overview 10 Microsoft ActiveSync. registering 6 R reference project artifacts 45 registering the emulator in SCC 6 F Flow Design 12 S sample learn more 45 Screen Design 12 ServerDB.cab 20 G generating code for a device application 23 Sample: Mobile Workflow Employee Directory 49 .Index Index A ActiveSync. configuring 22 emulator.

contacting 48 synchronization software installing 21 T tutorial configuring the Android emulator 19 W Windows emulator connection settings 22 Windows Mobile emulator 37 50 Sybase Unwired Platform .Index Sybase Control Center register device 6 registering the emulator 6 status 6 Sybase Mobile Workflow 19 Sybase Unwired Platform getting help 48 learning more about 47 Technical Support.

Sign up to vote on this title
UsefulNot useful