Skip to Content

In my earlier blog, I explained how we can create Android application consuming OData with GWPA. In this blog, I will explain about creating Android application based on SAP Workflow!


Basically we will use demoformabs (Demo Absence Notification workflow) having workflow ID WS70000704.


We will use steps 000087 Create notification of absence and 000048 Approve notification of absence as highlighted below.

/wp-content/uploads/2013/06/android_wf1_230084.jpg

And workflow service WFSERVICE shipped with gateway.

/wp-content/uploads/2013/06/android_wf2_230085.jpg

You can follow detailed steps mentioned in How-to guide at http://scn.sap.com/docs/DOC-29199


Now it’s time to develop android application!


Create new project and provide details.

/wp-content/uploads/2013/06/android_wf3_230096.jpg

Select Workflow Application.

/wp-content/uploads/2013/06/android_wf4_230097.jpg

Assuming you configured the connection for backend SAP NetWeaver Gateway system, you will be able to see all services available. Now search with WF and you will find available workflow services in your system. Select workflow service WFSERVICE.

/wp-content/uploads/2013/06/android_wf5_230098.jpg

Click on OK and Finish.

Finally, application structure will look as below.

/wp-content/uploads/2013/06/android_wf6_230105.jpg

Now it is time to test our application.

Select Run As –> Android Application. It will launch Android emulator where you will be able to see your application. Provide credentials which you used to configure backend SAP NetWeaver Gateway system.

/wp-content/uploads/2013/06/android_wf7_230106.jpg

It will display workflow items available in your work list. Here, I have below 3 tasks in my work list.

/wp-content/uploads/2013/06/android_wf8_230107.jpg

Click on any single task which will open details of that task.

/wp-content/uploads/2013/06/android_wf9_230108.jpg

On clicking Decision button, it will give 2 options as displayed below.

/wp-content/uploads/2013/06/android_wf10_230109.jpg

You can then put comments and process it.

/wp-content/uploads/2013/06/android_wf11_230110.jpg

After processing task, it will disappear from your inbox.

/wp-content/uploads/2013/06/android_wf12_230114.jpg

You can see workflow items in transaction SBWP (SAP Business Workplace)

/wp-content/uploads/2013/06/android_wf13_230115.jpg

If you again process items in Android application, accordingly it will be removed from you inbox. Now I processed one more item and hence my inbox will display single task.

/wp-content/uploads/2013/06/android_wf14_230116.jpg

We can verify again by going back to SAP Business Workplace. And as per below screen, it contains single work item.

/wp-content/uploads/2013/06/android_wf15_230120.jpg

It is very easy to develop workflow based android application with the help of SAP NetWeaver Gateway Productivity Accelerator (GWPA). we can develop nice android application just within few minutes!


To report this post you need to login first.

16 Comments

You must be Logged on to comment or reply to a post.

  1. Vishwanath Srinrangam

    Hi Chandra,

    Excellent article. Lots of thanks to you for sharing this info. I have a question for you.

    When we develop this android app, will it work when the user is not in the office network ?

    If yes, do we need to make any specific configurations for that ? Please let me know your response.

    Thank you.

    Vishwanath

    (0) 
    1. Chandrashekhar Mahajan Post author

      Hi,

      This app will not work without network as this app can be categorized as online/always connected kind of app.  Of course, workflow items will be accumulated in backend ABAP system as usual and once you will come into network, you will able to see all those workflow items on your mobile device. But processing these items from mobile will require network.

      I hope, this will clear your doubts.

      Regards,

      Chandra

      (0) 
  2. Daniel Myslinski

    Hi,

    I find this tutorial very helpful but I have a problem with receving data from SAP.

    Everything seems to be fine but when i try to logon logcat in eclipse returns the following error:

    01-08 13:56:52.539: E/Connectivity(758): Delta handling is disabled. Please add Persistence & Cache libraries to enable it.

    Both libraries are included in the project. Do you have any idea what could I do wrong?

    Regards,

    Daniel Myslinski

    (0) 
  3. Ankur Jindal

    Hi Chandra,

    I have implemented this sample app but after login, i am getting error “Http error: data provider implementation does not exist” Please let me know if you have faced the same problem and know its solution.

    Regards,

    Ankur Jindal

    (0) 
      1. Ankur Jindal

        Hi,

        No, i am not getting any data for service. When i am login, it is redirecting to next page, giving error and coming back to Login page. I am using service from netweaver demo server. and i did not make any work flow changes. I have just followed your blog from App creation part.

        Regards,

        Ankur Jindal

        (0) 
  4. Venkatesh Manam

    Hi Chandrashekhar,  

    Thanks for Excellent article. This help us understand the mobile WF.


    Here I have a question in UI side can you please guide me.


    How much customization is possible in UI side?


    1. Grouping the WF inbox item in different folders based on Modules and folder kind of  view in WF inbox is it possible?

    2. It is possible to view the full details of each WF item??

    3. It is possible to change the view/Design of ‘APPROVE’, ‘REJECT’ and ‘FORWARD’.

    4. Header Level and Item level Approval are possible ??

    5. Is it possible to using the SAP Netweaver Gateway as middle ware to interact with SAP business data and by using any flash UI technology as front design we can achieve above 4 points?  


    If yes, do we need to make any specific configurations / Software for that? Please let me know.


    Thanks in Advance.

    Venky.

    (0) 
    1. Chandrashekhar Mahajan Post author

      Yes you can customize UI screen to any extend!

      you can consume GW service and on top of it can use any other UI technology to build application provided that UI technology should be capable to consume OData service!

      Regards,

      Chandra

      (0) 
      1. Venkatesh Manam

        Hi Chandra,

        Thanks for reply.


        I’m trying Workflow Application using SAP NetWeaver Gateway as PHP frond end.

        Here im facing the issue while Approving the workflow. 

        while executing function we use the HTTP Method POST

        http: //server:port/sap/opu/odata/IWWRK/WFSERVICE/ApplyDecision?workitem_id=’000000071609’&dec_key=’0001’&comments=’Approved’

        im not getting the response from X-CSRF-TOKEN.

        Please help me on this.

        Thanks in advance.

        Venky 

        (0) 
  5. suman kumar chinnam

    Hi Chandrashekhar,

    Nice blog. I have implemented the steps as it is mentioned in this blog and also implemented BADI’s as mentioned in the blog “How to expose SAP business workflow with SAP”. I am getting workitems from ecc and navigating to decision screen as well but I am getting HTTP error during last step of decision step. I am getting error after I enter my comments and click on APPROVE button. I am not sure why I am getting this error. Can you please help me to solve this issue.

    Thanks,

    Suman

    (0) 
  6. Thushara Ratnayake

    Hi Chandrashekhar    ,

    Nice blog , Thanks a lot .

    i have followed up all the steps and developed workflow app with connect to SAP demo NW system .

    Everything was fine , but when i try to run the application on Emulator as well as Mobile phone following error occurred . can anyone help me to fix this issue .

    01-08 13:56:52.539: E/Connectivity(758): Delta handling is disabled. Pleaseadd Persistence & Cache libraries to enable it.


    How can i fix this issue .


    Regards,

    Thushara

    (0) 
    1. Chandrashekhar Mahajan Post author

      Hi Thushara,

      Sorry but as of now I do not have answer to your question. May be you can raise this question in the forum so that you will get more answers.

      Regards,

      Chandra

      (0) 
  7. Vijay Chanchlani

    Hi Chandra,

    Excellent write-up.

    We are creating a POC for one of our customers to Expose SAP Inbox and following your blog I was able to do that…well almost.

    I have done all the configuration steps that you had mentioned in the Backend and I am able to access the WFSERVICE url on the browser by providing my credentials.

    Then I created an Android application like you mentioned(for 3.1 version) by consuming the URL in eclipse. Initially it gave me SSL issues, but then I uploaded the backend system certificate in JRE using keytool and was able to consume the service and create the project. So far, so good.

    Now when I try to run the application on Android virtual device, it says “login failed” for the same credentials that work on browser.

    In the logs, it again says some SSL certificate issue.

    Could you please help me on this as this looks like the last hurdle now.

    Regards,

    Vijay.

    (0) 

Leave a Reply