Building a Simple Workflow Application for the Sybase Unwired Server [Part 3]

Similar documents
Loading Images into your Mobile Application

Getting Started Tutorial - Eclipse Edition. Sybase Unwired Platform 1.2

Tutorial: Mobile Workflow Package Development. Sybase Unwired Platform 1.5.2

SUP: Personalization Keys and Synchronize Parameter

Exam Name: Microsoft Managing and Maintaining Windows 8

Installing and configuring an Android device emulator. EntwicklerCamp 2012

DB2 for z/os Stored Procedure support in Data Server Manager

Installing Komplete 5 with Direct Install

1 Build Your First App. The way to get started is to quit talking and begin doing. Walt Disney

How to Install and Configure the Barracuda Outlook Add-In

Managing Automation for SAP BOBJ Enterprise Processes

Securexam Mac User Guide

Enter your Appserv username and password to sign in to the Website

IBM DB Getting started with Data Studio Hands-On Lab. Information Management Cloud Computing Center of Competence.

Oracle General Navigation Overview

Part 1: Understanding Windows XP Basics

BEAWebLogic. Portal. Tutorials Getting Started with WebLogic Portal

Workplace Online Using a standard web browser, simply login at us.awp.autotask.net using the credentials you ve been given.

TYPO3 Editing Guide Contents

Ionic Tutorial. For Cross Platform Mobile Software Development

This guide illustrates how to set up an Apple device for deployment, and deploy an application. It covers how to:

Voyant Connect User Guide

BoardBookit for ipad Quick Start Guide

The guide for the Merrill Mobile catalog available for tablet-based devices. Version 3.0

Installation guide for Choic . Enterprise Edition. When Installing On The Same Server As: Microsoft s Exchange 2000 & 2003 Mail Servers

DESIGN TRANSFORMATIONAL IPAD APPS

Remote Workspace. Nubo End User Guide. Version: 1.3 Date: June, Copyright 2017 by Nubo Inc. All rights reserved. Page 1

GW Box User Guide. Have additional questions? Visit community.box.com for more information and training resources. Contents... 1

Box User Guide. Contents

Sybase Unwired Platform Version 2.0

Installation Guide For Choic . Enterprise Edition. When Installing On The Same Server As: Microsoft s Exchange 5.5 Mail Server

PERSPECTIVE. Mobilizing SAP Enterprise Applications. Abstract. Suresh Santhana & Anoop Kumar

Panic Button Information & Installation Manual

Getting started with System Center Essentials 2007

IT Support Documentation

Installation Guide. 3CX CRM Plugin for ConnectWise. Single Tenant Version

We start by providing you with an overview of the key feature of the IBM BPM Process Portal.

Installing and Configuring the Voice UPB Bridge updated 1-Jan-2019

EVALUATION COPY. Unauthorized Reproduction or Distribution Prohibited SHAREPOINT 2016 POWER USER

Summary of Server Installation

Unit 4 Agresso 571 Web Services. Journal Registration

Installing and Configuring vcloud Connector

Horizon Workspace Administrator's Guide

Connect and Transform Your Digital Business with IBM

General Information. Digital Text vs. Traditional Textbooks

SIS offline. Getting Started

IBM Atlas Policy Distribution Administrators Guide: IER Connector. for IBM Atlas Suite v6

ios Ad Hoc Provisioning Quick Guide

Ten Things You ve Gotta Try in LogMeIn Rescue

Corona SDK Device Build Guide

Visual Workflow Implementation Guide

Sage Construction Central Setup Guide (Version 18.1)

2012 Microsoft Corporation. All rights reserved. Microsoft, Active Directory, Excel, Lync, Outlook, SharePoint, Silverlight, SQL Server, Windows,

Deltek Touch Expense for Ajera. Touch 1.0 Technical Installation Guide

Amplify. Innovate. Empower. At SAP Innovation Camp.

appcompass Developer s Guide For: appcompass Data Integration Studio appcompass Business Rules Studio appcompass Visual Studio Editions

Tutorial: Android Object API Application Development. Sybase Unwired Platform 2.2 SP03

Deploying Citrix Access Gateway VPX with Web Interface 5.4

1. Type in your account and password. If you have Windows, Mac, iphone, or Android, you can download corresponding applications here

INSTALLATION AND USER S GUIDE OfficeCalendar for Microsoft Outlook

SharePoint General Instructions

Mobile Inventory Tracking & Sales Management Software. Installation Procedure

Sophos UTM Web Application Firewall For: Microsoft Exchange Services

PAN 802.1x Connector Application Installation Guide

Mobility Manager 9.5. Users Guide

PARTICIPANT REGISTRATION GUIDE

CoSign Quick Guide Virtual Signing with CoSign

User documentation. BEEM v1.0 January 2010

PANZURA FREEDOM ARCHIVE QUICK START GUIDE STEP-BY-STEP INSTRUCTIONS FOR INSTALLING THE FREEDOM ARCHIVE FREE TRIAL PANZURA VM CLOUD CONTROLLER

Lab Android Development Environment

TIBCO LiveView Web Getting Started Guide

Step 1: Adding Darwin to your computer

Appserv Internal Desktop Access Mac OS Device with Safari Browser. Enter your Appserv username and password to sign in to the Website

Developing Android applications in Windows

Quick Guide to Installing and Setting Up MySQL Workbench

Sybase Unwired Platform 2.1 Sizing Guide

INSTALLATION AND USER S GUIDE OfficeCalendar for Microsoft Outlook

Summary of Server Installation

Agent and Agent Browser. Updated Friday, January 26, Autotask Corporation

Business Intelligence Launch Pad User Guide SAP BusinessObjects Business Intelligence Platform 4.1 Support Package 1

WORKSHARE TRANSACT USER GUIDE

Databases in Azure Practical Exercises

Your . A setup guide. Last updated March 7, Kingsford Avenue, Glasgow G44 3EU

With the X35 there is the ability to use the new remote support feature on the monitor to request assistance. You can add the Horizon support app for

Workshare Transact. User Guide

Setting Up Resources in VMware Identity Manager (On Premises) Modified on 30 AUG 2017 VMware AirWatch 9.1.1

Google Chromebook Starting Guide

Using the JSON Iterator

Using Devices with Microsoft HealthVault

CTC Accounts Active Directory Synchronizer User Guide

How to make a Work Profile for Windows 10

ForeScout Extended Module for MaaS360

2015 Beta 2 Tutorials

Installation guide for Choic Enterprise Edition ON Microsoft s Exchange 2000 Mail Server

Installation Guide - Windows

Dreamweaver MX The Basics

Using WebNow to Process the Fund Establishment Form

CSCI 201 Lab 1 Environment Setup

Microsoft Outlook (A guide to help you better understand and utilize MS Outlook)

Kendo UI. Builder by Progress : Using Kendo UI Designer

Transcription:

MOBILITY Building a Simple Workflow Application for the Sybase Unwired Server [Part 3] By Mark Gearhart, SAP In the third of a 3-part series, we build a simple workflow application for the Sybase Unwired Platform and deploy it to the Android emulator. Mark Gearhart is a Senior Consultant with SAP. He is involved in the development of database architectures and rich internet applications for temporal and realtime systems. His background encompasses the energy and financial industries with a special interest in data storage architectures and fast user interfaces. He can be reached at mark.gearhart@ sapns2.com. Contents Introduction 1 Step 1: Set up the Network 2 Step 2: Register Devices in SCC 3 Step 3: Register the Clients 4 Step 5: Build a Hybrid Web Container 8 Step 6: Deploy to Android Emulator 10 Conclusion 12 Introduction In How to Install and Use the Sybase Unwired Platform for Android Devices [Part 1], the steps for setting up the Android development environment were shown. In part 2, we built a simple mobile application without using Sybase Unwired Platform features, and deployed it on the Android emulator as well as on an actual android device. In part 3, we ll continue building mobile applications. But this time, we ll be using the Sybase Unwired Platform features. This application will operate by mobilizing department data from SQLAnywhere, through the Sybase Unwired Platform, to our mobile clients. For this application, our mobile client will initially consist of an Android Emulator. Later, when we resolve firewall issues, we will complete the final step by deploying the same application to an actual android device. Of the two different types of applications described below, we are going to build a Workflow application: Workflow Application - in this type of application, there are no complex rule-based decisions being performed, rather a more simple request-response type environment is implemented such as employee request vacation, manager approves or denies, as shown in the diagram on the next page titled Mobile Workflow Use Case Scenario. This type of application also uses a Hybrid Web Container technology. Native Application - this type of application gives the developer much more control of application development, and allows access to more complex feature on the device platform. This type of application also requires more coding, knowledge, and time. We are also going to create a Mobile Business Object, or MBO. In order to create any Sybase Unwired Platform mobile application (Native or Workflow), two components are necessary: Mobile Business Object(s) - MBOs User Interface MBOs are always designed using the Unwired Workspace, and they are always deployed to an Unwired Server. Native UIs are created with the IDE of your choice. 1 ISUG TECHNICAL JOURNAL

1 retrieve data. After all, we are just trying to show that all the parts work as expected. OK, here we go. Workflow UIs are created with the Unwired Workspace using the Mobile Workflow Forms Editor. For our MBO, we ll be building one from a database table. MBOs can be built from an SAP BAPI, SOAP Web Service, REST Web Service, tables, or stored procedures. You may not be familiar with a SAP BAPI, or Business Application Programming Interface. A BAPI contains one to many operations that can be called from the MBO which are specific to SAP applications. BAPI s include things like posting a sales order, listing employee benefits, changing passwords, tracking a shipment, etc. The mobile applicaiton developments describe in the rest of the article will proceed as follows: Create a Mobile Application Project Create Mobile Business Objects (MBOs) using the Mobile Application Diagram editor Configure MBOs, e.g. create relationships Deploy MBOs to Unwired Server Depends on the type of application being built: Native applications - use the Generate Code option and then set up projects in the IDE of your choice (Visual Studio, Eclipse, Xcode) Mobile Workflow Applications - create a new Workflow Forms Editor diagram and create screens for the workflow. So, our simple yet functional Mobile Workflow application isn t going to be a involved as a employee requesting vacation. Instead, we will simply retrieve data from the SQL Anywhere database, display it on the screen, and view details about it. We won t have an overly-fancy UI. It will just be a data grid and a button to Step 1: Set up the Network In part 2, we deployed our Hello World code to the Android device by transmitting it across a USB cable connected to the device. For a full-blown Sybase Unwired Platform application, instead of deploying using the Android Development Kit (ADT) we are going to use the deployment capabilities of the Sybase Unwired Platform. Its more complicated. Deployment will be across the network rather than across a USB cable. Obviously if you are going into the business of deploying applications, you don t want to go around plugging devices into your laptop with a USB cable, therefore the Sybase Unwired Platform network deployment method is the way to go. There is really only one thing you have to do here. Instead of plugging in your Android device into your laptop with a USB cable, connect it to a network. Make sure your Android device has access to the Unwired Server running on your laptop. This will be the way to make sure you have a workable network configuration. To check connectivity, first bring up the Unwired Server by running the Start Sybase Unwired Platform desktop as administrator. Then go to your Android device and call up a browser. Enter http://ipaddressofunwiredserver:5001. You should see a white screen: If you don t see this, port 5001 or the IP address is probably being blocked or your Unwired Server is not running, or you haven t got the IP address of your laptop correct. You ll need to get this working before you can deploy to your android device. You should also open up the other ports that the Unwired Server 2 ISUG TECHNICAL JOURNAL

1 will need for communication. Here is the default list as shown in the Sybase Control Center: Sybase Unwired Platform mobile applications must be deployed to the device manually or by using device management products such as Afaria. Afaria is no longer bundled with the Sybase Unwired Platform. It is now puchased separately. Another showstopper might be that your laptop has Intrusion Protection turned on. This has been my case, and there has been no way to disable it since my laptop is company-supplied and I do not have access to the local McAfee dashboard on my laptop. If you are concerned about opening ports in your firewalls to support mobile applications, the Sybase Unwired Platform resolves this through the use of a Relay Server. Mobile devices connect to the Relay Server in the DMZ using only standard HTTP ports. The Sybase Unwired Platform Relay Server is purchased separately. Step 2: Register Devices in SCC This is a one-time-only setup. In order to deploy the mobile application, there needs to be a communication path so that the application can be automatically downloaded from the server to the emulator or device. The place to define this communication path is in the Sybase Control Center (SCC). Once the path has been defined, then anytime you deploy the application to the Unwired Server, a copy of the application will be shipped out. Before you start anything, make sure the Unwired Server is running. To start up the Unwired Server, run the Start Sybase Unwired Platform desktop as administrator. Now call up the SCC. You can do this by running the Start Sybase Control Center desktop as administrator. When it comes up, login with supadmin for the user, and use the password you set up during the Sybase Unwired Platform installation. Click on Applications, and in the view in the right pane, click the Application Users tab: Let s register an application connection for each possible device. In this article, we will be using two devices, an Android 4.0.3 emulator and an actual Android device. Click Register. In the Register Application Connection window, fill in the information for the emulator. For the Sybase Unwired Platform verson 2.1, two things are extremely important. If you don t do this right, nothing will work: Enter an ip address for your Unwired Server, not a hostname. In my case, this is the ip address of my laptop obtained from the ipconfig /all command. If you enter a hostname, deployments will silently fail. There are no clues whatsoever about what s wrong. It took a day to figure this out. Enter an activation code. If you unclick Specify Activation Code and proceed, the box will get automatically re-clicked and you will be assigned a random 3-character activation code. You will never know it happened, so when you try to deploy your application, the deployments will silently fail again with no clues whatsoever. It took two days to figure this one out. You can probably start to see a pattern emerging as far as product support goes. Hopefully it will get better as the products evolve. You can save yourself lots of debug time by entering an ip address and an activation code. Here are the devices to register: 3 ISUG TECHNICAL JOURNAL

2 3 4 5 Here is a use case for an MBO: An enterprise application would like to expose an interface to retrieve and/or create a list of Sales Orders together with its line items. An MBO can be created and would be represented as a Sales Order MBO with an operation to create new sales orders. Once done, you will now have some Application Connection entries. The status will be Pending Activation. This is OK. Once we bring up the Android emulator and Android device, and define their connection information as clients, a connection will be established and data can now be exchanged between the Unwired Server and the clients: Step 3: Register the Clients Now we will register the Android emulator and Android device. Lets start up the Android emulator. You can do this from the system menu by clicking Android SDK tools and then rightclicking AVD Manager -> Run as Administrator: SUP Developer and Administration Certifications and Certification Preparation Exams will be available in 2012. The curriculum will include A), SUP Developer, B), SUP Administrator, C), SAP Mobile Sales Developer Customization, and D), SAP Mobile Workflow and Business Suite Customization From the AVD Manager. Select the Android403 entry and hit the Start button. You ll get a dialog box as follows: 4 ISUG TECHNICAL JOURNAL

6 7 8 9 Click Launch. The emulator should now appear. Call up the application menu and scroll horizontally (if necessary) to find the Sybase Unwired Platform Workflow application: Now click on the menu button, and from the menu selection, click Settings. In the settings window, enter the connection information for android403user that we defined in the SCC: Click on it to open, and enter the password you configured for the Unwired Server during the initial installation: There is no logic in a workflow application - it s just a form that is filled out and sent back. No coding is necessary to build a workflow application. Once this is done, if you go back to the SCC, click the android433user entry, and then click Refresh, you should see that the Application Connection is now online and there are no pending messages to download: 5 ISUG TECHNICAL JOURNAL

1 0 1 2 Then, we ll create a Mobile Application Project called DepartmentWF. Make sure you choose a name that is not the same as any of the MBO s you intend to create. I usually suffix the project so it will always be distinct from any of the objects it contains. To create this project, click File->New->Mobile Application Project, and then enter the name of the project in the dialog box: You can do the same thing with the actual android device. For the device, enter a username of androiddevice rather than android403user. We will maintain 2 application connections, one for an emulator and one for a device. Now that these steps are finished, when we deploy a mobile application to either the emulator or the device, it should deploy successfully because both application connections are online. One thing to note is that status of the connection will go offline when viewed from the SCC when the emulator is down or the device is powered off. This is OK. When you start up either, their status will go back online. Step 4: Start the Project Let s mobilize our department data. First we ll call up the Unwired Workspace and connect to both the sample database and the Unwired Server. This can be done by right-clicking each in the Enterprise Explorer pane (lower left pane) and the clicking Connect. You ll know they are connected when you see (SQL Anywhere...) and (Unwired Server...) next to the entries: When you click Finish, the project will get generated with four folders, and the main pane will contain a tab for a Mobile Application Diagram: To mobilize department data, we ll need to create an MBO, or Mobile Business Object. We do this by dragging the department table from the sample database across into the Mobile Application diagram: 6 ISUG TECHNICAL JOURNAL

3 4 5 6 7 After you proceed through the screens without changing any of the defaults, a progress dialog will launch: Let it run to completion. Once complete, a Deployment Status dialog will appear. You can click OK to finish the sequence: The MBO is created with update, delete and create methods and a meta-data representation of the data we wish to mobilize. We now need to deploy the Department MBO definition to the Unwired Server. We can do this by looking in the Mobile Business Objects section of our project, right-mouse clicking on Department, and chosing the Deploy Project option. The MBO will use message-based replication to send data to and from the device, and it will be deployed to the Unwired Server we started earlier. We also make sure we specify the correct database where the department table exists. Once this is complete, we can deploy the MBO: Once deployed, we can look into the Enterprise Explorer (lower left pane). Here we can look at the Unwired Server we connected to and find the actual MPO we ve deployed, which is Department: 7 ISUG TECHNICAL JOURNAL

8 9 1 2 Step 5: Build a Hybrid Web Container Right-click on DepartmentWF in the Workspace Navigator. Click New->Mobile Workflow Forms Editor. Let s give this a file name of DepartmentContainer.xbw. For our workflow forms starting point, we are going to select can be started, on demand, from client: In the Flow Design Editor, we are going to drag and drop the MBO definition of Department that we ve defined and deployed to our Unwired Server. This in turn creates a number of stock screens for creating and deleting department data: Click on the Start Screen and then on the Screen Design tab. Drag and drop the MenuItem on the Palette into the menu shown in blue, and call the menu Retrieve: 8 ISUG TECHNICAL JOURNAL

3 4 5 1 If you intend to use the Sybase Unwired Platform, it looks like you will also be ramping up on Powerbuilder. A mini Powerbuilder interface is used in the Unwired Workspace to construct the visual components. It looks like SAP may have found a use for this technology. In the properties for the menu item Retrieve, change the type of the menu item to Online Request: And invoke the object query findall: Make sure the Mobile Business Object we re going to use is Department: Server-initiated workflows can be initiated by an email notification or Data Change Notification. An example is receipt of an approval request. Device-initiated workflows can be opened on a mobile device by a user. An example is a user submitting a travel expense report. Our success screen for the department query is now Department: 9 ISUG TECHNICAL JOURNAL

2 3 4 5 Let s deploy. Click the toolbar button for the Mobile Workflow Package Generation. This will also deploy to the Unwired Server. Assign the workflow to a user device. In this case we are using the Unwired Server bth516785a and the workflow user android403user: If we now go back to Flow Design, we can see that the Start Screen now links to Department: Step 6: Deploy to Android Emulator First we will deploy to the Android emulator. Before you do the deployment, you should confirm that the emulator is running and can communicate with the Unwired Server. Referring back to Step 2, bring up the SCC and the Android emulator. Find the Sybase Mobile WorkFlow app and call it up. When it prompts you for a password, enter the password you used for the Sybase Unwired Platform installation. Once the Sybase Mobile WorkFlow is logged in, I m not sure what s happening. Either it is pinging the Unwired Sever, or the Unwired Server is pinging it. Anyway, someone s ping should be working and the Android emulator should be ready to receive a deployment. You can check the status of the applicaition connection by looking at the status of the android403user in the SCC. Check the entry in the Application Connections tab and then click Refresh. The status should say online. Click Finish. This will generate the workflow package and deploy it to the Unwired Server. It will be assigned to the user device you specified. In the console, you can see whether all of the steps have completed successfully: 10 ISUG TECHNICAL JOURNAL

6 7 8 9 There are two synchronization models. Replication-based Synchronization (RBS) is best suited for occasionally connected devices with a defined upload/download (sync-button) user experience. Message-based synchronization (MBS) is best suited for occasionally disconnected devices and an always-on user experience. We can now go over the the Android emulator and see that we have a new workflow: Clicking on the icon will run the workflow and will retrieve the data. If you click menu, the menu we built will appear and we can click Retrieve. The result is the straight department list we expected: Enterprise Information System (EIS) data is data residing in backend systems such as enterprise databases, Web Services, REST Services, and SAP ERP and CRM systems. We can go into details by just drilling down on each item: 11 ISUG TECHNICAL JOURNAL

1 Conclusion We ve now mobilized data from SQLAnywhere, through the Sybase Unwired Platform, to our mobile clients using the Mobile Workflow Development Model. This model, versus the Native Application Development Model, lets you quickly create simple mobile workflows without writing any code in the application frontend. When utilizing this model as a starting point, you can add business logic by placing code in the backend using techniques such as triggers and stored procedures and messages. 12 ISUG TECHNICAL JOURNAL