Developing SAP Workflow Apps for iOS – Setting the Wheels in Motion
OK, we have all enjoyed reading about how to jump start the SAP iOS development in our organization in the excellent post by Guy Soffer – Developing SAP iOS Apps – It’s Simpler Than You Think!
Now, it’s time to do some heavy lifting…
Every organization has many workflow processes, so many managers find themselves constantly being asked to approve a certain leave request here, or a purchase order for a brand new iPhone there (for testing purposes, of course 🙂 ). Some managers might even say that they have two inboxes to maintain – one for the regular emails and the other for the workflow tasks they have to process each day.
Now, I can’t help you create a better email app for iOS, mainly because Apple did a great job on their own, but what I can do is make your life easier while creating the SAP Workflow App. A lot easier…
Here, SAP NetWeaver Gateway comes to my help. By using open protocols, it exposes the complex workflow data (as it is maintained in the standard SAP Business systems) in an easy to consume format. And the best part? When you install an SAP NetWeaver Gateway server, you get a built-in Workflow service! Even if you choose to extend it, the process below still applies.
In order to generate the Workflow app, I will use the SAP NetWeaver Gateway tool for Xcode. It will help me find the workflow service I want to work with. For information about installing and configuring the tool to work with the Gateway demo system, refer to Guy’s blog post again.
Note: The Gateway server I used in my demo is different to the one in the Gateway demo system, so the data you will get will probably be different to that shown in the screen shots below.
After you finish configuring the tool, open it, enter a name for your application in the Application Name field, and choose the “Workflow (iPhone)” application type.
When you click Browse, the tool displays only the valid workflow services – the generic Workflow service and the services that extend it.
Once you have selected the service, press the Next button and select the location where you want to save the generated application. After that, the wizard closes and the app is displayed. Yes, it’s hard to believe, but you are done. 🙂
At this point you must be asking yourself “Done?! where did the rest of the configurations go?!”, or “How does the generated application know what data to present first without me specifying it?!” or my favorite “How do I tell the generated application that in SAPish, ‘approve’ means ‘0001’, and ‘reject’ means ‘0002’?!”
Well the answer to these questions is quite simple. Since the tool knows you are generating a Workflow App, the flow of the generated app is obvious. The first view presents the list of tasks, and from there you can drill-down to see additional data. In addition, the generated app even supports taking actions, which enables you to apply your decision from within the app!
OK enough talking, let’s see the generated application in action.
On the application’s login screen, enter the same user name and password you used earlier to connect to the Gateway server. Once logged in, you can see your Workflow inbox with all the tasks assigned to you. You can filter them by type and, of course, search the tasks.
Once you select a specific task, you can see all its details. If you choose, you may also navigate to see additional data like participants, attachments, and comments (if they exist)
And finally, when you are ready to make a decision, just click on the button, write a comment, and send.
So as you can see, by merely selecting a service and clicking a button, you have generated a full-blown iOS business application.
Moreover, if you are familiar with iOS development, you can easily customize the code of the generated app and adjust it to your needs. The generated code is well-documented and easy to understand. Refer to the tool’s documentation for more information.
And after you show this app to your manager, I’m sure you can ask him for that Leave Request. Judging by how easy it is to approve something using the generated app, I am sure you will get his ‘0001’ 🙂
Feel free to share your feedback in theComments section.
For #SAPGateway blogs and updates please follow @shirilevil Twitter account.