SAP NetWeaver Gateway exposes the complex workflow data (as it is maintained in the standard SAP Business systems) in an easy to consume OData service. When you install an SAP NW Gateway server, you get a built-in Workflow service. Even if you choose to extend it, the process below still applies.
In order to develop a business workflow app for Android, I will again use the SAP NetWeaver Gateway plugin for Eclipse. It will help me locate the workflow service I want to work with and to generate the application logic and UI to consume the service.
For information about installing and configuring the plugin, you can refer to one of my previous posts.
Start by opening the New Project wizard and select Starter Application Project under the SAP NetWeaver Gateway node. Give your project a name, and select Android from the dropdown of available target platforms. Follow the wizard steps and select the Workflow Application template from the templates page of the wizard.
After selecting the application template I will need to specify the workflow service by either providing the URL or browsing the Gateway service catalog. The service I will use here is WFSERVICE.
The flow of the generated app is straight forward: The first activity is a splash screen. Then, on the application’s login screen you need to enter a user name and password you use to connect to the Gateway server. Once logged in, you can see the Workflow inbox with all the tasks assigned to that user. From the inbox screen you can filter the tasks by type and, of course, search the tasks. In addition, you can take action on a task right from the inbox by long pressing on an item. Alternately, selecting a task will navigate to the task details activity to show all tasks’ additional data, and also lets you apply your decision there. The detailed data may include (if exist) description of the task, comments,
attachments, other participants, xprops, etc.
Once I wish to take a decision, I click on the Decision button, select my decision, optionally write a comment, and send.
If you are familiar with Android development, you can easily customize the code of the generated app and adjust it to your needs. Feel free to share your
feedback in the Comments section.
You can see a live example by my colleague Michal Keidar:
For #SAPGateway blogs and updates please follow @shirilevil Twitter account.