During April SAP ran the SAP Netweaver Gateway Partner-built Solution Drive to try increase the adoption of SAP Netweaver Gateway, by offering training and free certification of your app or UI, Netweaver Gateway Interface, or both.
I thought this was a great opportunity and decided to take on the challenge. Having already been experimenting with Netweaver Gateway and the Netweaver Gateway productivity accelerator, I decided to take on one of the most common business requirements there is, SAP Business Workflow.
Thanks to the excellent SAP standard Netweaver Gateway Workflow Services (WFSERVICE & WFHUBSERVICE) and the Gateway productivity accelerator tools for eclipse, I had an excellent starting point and foundation already built for my app.
Intro to Workflow Services
There are 2 services available as part of the SAP Netweaver Gateway Workflow Services framework, they are:
- WFSERVICE – for use when running the service on the backend system (Embedded deployment)
- WFHUBSERVICE – for use when running SAP Netweaver Gateway system as a Hub installation connecting to remote systems running the SAP Netweaver Gateway BEP Add-on. (Central Hub Deployment)
To better understand the deployment options, check out the SAP Help on Deployment Options. In my case I had setup Gateway directly on the backend system. So I ended up using the WFSERVICE option, so what I am referring to here in this blog is focusing on the Embedded deployment option using WFSERVICE. I believe they both function similarly, however I have not tried the WFHUBSERVICE option yet. The services are actually extremely well documented in the SAP Netweaver Gateway help, so it’s definitely worth a read.
The SAP Netweaver Gateway Workflow Services exposes all the core functionality around SAP Business Workflow including actioning decisions for tasks, forwarding tasks, attachments, substitution, notifications and much more. In addition to this, it is also highly customisable via the config tables and 3 Badis which are made available for adding in custom code.
Configuring Workflow Services in 10 easy steps
1. In transaction SPRO, go to SAP Netweaver->Gateway Service Enablement->Content->Workflow Settings
2. Go into “Maintain Task Names and Decision Options”
3. For each workflow type above that you would like to appear in the Workflow service, enter the Workflow ID, the step ID (which you can find in the workflow definition) and the path to an image in the mime repository which you have uploaded for use for that workflow type, as well as a step description (Workflow type description)
4. Select the specific workflow type and enter the Decision key, Icon Mime repository path (Icon to be used for the decision) and the Decision text
5. Return to the menu path in SPRO and select “Enable Task Filter” and Activate the filter
6. Go to transaction /IWFND/MAINT_SERVICE
7. Click Add Service button
8. Search for WFSERVICE and click on the /IWWRK/WFSERVICE to add.
9. Fill in the package and press the green tick
10. You are now complete, you should see the service in the Service Catalog and can call on it byclicking on the Call browser button, where you will be able to see the path to the service and the response.
Customizing Workflow Services
It can customized via the config tables mentioned above, or if there are more complex requirements which require custom coding, this can be done via 3 Badis which are made available in the framework. One of which I have utilized in my app in order to return more details for work item details.
These Badis are:
/IWWRK/ES_WF_MODIFY_ITEMS_IB -To change the task subject on inbox and outbox queries and when reading specific items.
/IWWRK/ES_WF_CUST_EXT_IB -To add extensible elements and change of task subject and description when reading a specific item.
/IWWRK/ES_WF_WI_BEFORE_UPD_IB -To make new functionality applicable before a decision has been applied on a ‘User Decision’ item.
SAP Netweaver Gateway Productivity Accelerator Tools
The Productivity accelerator tool actually has a workflow template starter app. See these blogs on how to generate your own:
- Gal Roter – Developing SAP Business Workflow Apps for Android
- Chandrashekhar Mahajan – How to create Android application based on SAP Workflow with help of Gateway Productivity Accelerator (GWPA)
The tool is great for proof of concepts, or to fast-track development, but still a lot of work is required to refine the apps, which is expected since the Gateway productivity accelerator is only a “Wizard” type starting point for an application, and is not intended for creating production ready apps.
Thanks to this great tool, it allowed me to spend more time on refining the UI/UX and additional functionality such as offline capability and other native features. It reduces much of the need to write all the low level service handling code, as the Service Proxy is automatically generated and all the parsing of data is taken care of by the OData SDK which is called on by generated proxy methods. There obviously is still a need to understand how to call OData requests and how to handle the responses, but much of it is handled by the OData SDK library and generated code.
Thanks to the free certification offered by the SAP Netweaver Gateway Partner-built Solution drive, I have decided to release this version of the app for free.
You can download it through google play by searching for “pokit action” or by clicking the link below:
Some screenshots below:
The app includes a demo mode to get a feel for it, but can also be connected to a live Netweaver Gateway system which has the Workflow Services configured. All feedback is welcome.
SAP Netweaver Gateway is a really great product and I’m looking forward to seeing increased customer adoption especially now that as of SAP Netweaver 7.4 it is a standard component and no longer an add-on.
Part 2 of this blog covers my experience and lessons learned in building a native Android Mobile Workflow app for SAP Netweaver Gateway: Mobile Workflow using SAP Netweaver Gateway – Part 2 – Native Android Experience
The iOS version is currently in development and will be available in the next few months.