Top Banner
SAP COMMUNITY NETWORK scn.sap.com © 2012 SAP AG 1 Executing a BRFplus Decision Service from an Android device Applies to: Business Rule Framework plus (BRFplus) shipped with SAP NetWeaver 7.0 Enhancement Package 2 or above. For a detailed introduction to BRFplus please visit Business Rules Management at the SDN network and select “BRFplus” in the Related Content section. Summary This document describes the execution of a BRFplus decision service from an Android based mobile device. The document also explains the creation of a NetWeaver Gateway Service for a simple BRFplus decision service. Authors: Joydeep Paul, Saba Samrin Company: SAP Labs India Created on: 18 August, 2012 About the Authors Joydeep Paul is an architect in the BRFplus team and has been working on the topic since 2008. Saba Samrin is a scholar at SAP and is working as intern in BRFplus team. She joined the team on April 2012.
36

Executing a BRFplus Decision Service from an …...functionality accessible via the SAP NetWeaver Gateway Interface. There are several ways to create the There are several ways to

Jul 03, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Executing a BRFplus Decision Service from an …...functionality accessible via the SAP NetWeaver Gateway Interface. There are several ways to create the There are several ways to

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 1

Executing a BRFplus Decision

Service from an Android device

Applies to:

Business Rule Framework plus (BRFplus) shipped with SAP NetWeaver 7.0 Enhancement Package 2 or above. For a detailed introduction to BRFplus please visit Business Rules Management at the SDN network and select “BRFplus” in the Related Content section.

Summary

This document describes the execution of a BRFplus decision service from an Android based mobile device. The document also explains the creation of a NetWeaver Gateway Service for a simple BRFplus decision service.

Authors: Joydeep Paul, Saba Samrin

Company: SAP Labs India

Created on: 18 August, 2012

About the Authors

Joydeep Paul is an architect in the BRFplus team and has been working on the topic since 2008.

Saba Samrin is a scholar at SAP and is working as intern in BRFplus team. She joined the team on April 2012.

Page 2: Executing a BRFplus Decision Service from an …...functionality accessible via the SAP NetWeaver Gateway Interface. There are several ways to create the There are several ways to

Executing a BRFplus Decision Service from an Android device

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 2

Table of Contents

Introduction ......................................................................................................................................................... 3

Business Scenario .............................................................................................................................................. 3

Background Information ...................................................................................................................................... 3

Prerequisites ....................................................................................................................................................... 3

Step-by-Step Procedure ..................................................................................................................................... 3

Creating the Body-Mass Index decision service in BRFplus .......................................................................... 3

Creating Remote-Enabled Function ................................................................................................................ 9

Configuring the Connection from Gateway System to Backend System ...................................................... 12

Creating a Gateway Service (in the Gateway System) ................................................................................. 13 Creating the data model ............................................................................................................................................. 13

Creating the Consumption Model ............................................................................................................................... 18

Assign System Alias to OData Service ...................................................................................................................... 21

Testing the Gateway Service ............................................................................................................................ 22

Creating the Android Application ...................................................................................................................... 23

Create a new application in Android ............................................................................................................. 23

UI Design and Code ...................................................................................................................................... 25

Summary........................................................................................................................................................... 34

Related Content ................................................................................................................................................ 35

Copyright........................................................................................................................................................... 36

Page 3: Executing a BRFplus Decision Service from an …...functionality accessible via the SAP NetWeaver Gateway Interface. There are several ways to create the There are several ways to

Executing a BRFplus Decision Service from an Android device

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 3

Introduction

This document guides you through the process of creating a mobile client for a decision service implemented in BRFplus using SAP NetWeaver Gateway Service.

Business Scenario

We would like to implement a simple Body-Mass Index (BMI) Calculator. The BMI is a common measure used to make a first estimate of whether the relationship between a person‟s height and weight might indicate a medical risk for that person or not.

Background Information

Since we would like to expose our service outside the scope of an SAP system, we need to make our functionality accessible via the SAP NetWeaver Gateway Interface. There are several ways to create the interface but for this document we have used the RFC generator approach.

For more information on SAP NetWeaver Gateway and BRFplus, please refer to the following links:

SAP BRFplus Page on SCN

SAP NetWeaver Gateway Page on SCN.

SAP NetWeaver Gateway Developer Guide.

SAP NetWeaver Gateway How-To guides on SCN.

Prerequisites

The following prerequisites must be fulfilled to complete the steps in this guide:

Access to a NetWeaver system with sufficient authorizations to run the BRFplus workbench.

Access to a configured Gateway 2.0 system.

Knowledge about modeling decision service in BRFplus and using the API‟s.

Firefox web browser with REST add-on.

The following tools need to be installed for developing an Android application:

o Eclipse 3.6

o Android SDK Windows

Step-by-Step Procedure

The following steps guide you through the process of creating a Gateway service based on a decision service modeled in BRFplus and then consuming the service through a mobile application running on the Android platform.

Creating the Body-Mass Index decision service in BRFplus

The Body-Mass Index decision service uses the height and weight information to calculate a measure. The measure in turn is used to derive the category as for instance normal, underweight or obese etc. We will go over the rule creation very briefly as we assume the reader is already familiar with BRFplus modeling.

Step 1: Create an application BMI_SERVICE

In the BRFplus workbench, first create an application BMI_SERVICE as shown below:

Page 4: Executing a BRFplus Decision Service from an …...functionality accessible via the SAP NetWeaver Gateway Interface. There are several ways to create the There are several ways to

Executing a BRFplus Decision Service from an Android device

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 4

Step 2: Create data objects HEIGHT, MASS and BMI_RESULT with the following semantics.

1. HEIGHT is a data element of type QUANTITY and dimension LENGTH as shown below-

2. MASS is a data element of type QUANTITY and dimension MASS as shown below –

Page 5: Executing a BRFplus Decision Service from an …...functionality accessible via the SAP NetWeaver Gateway Interface. There are several ways to create the There are several ways to

Executing a BRFplus Decision Service from an Android device

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 5

3. BMI_RESULT (Text: Body Mass Index) is a structure with two components – MEASURE and

CATEGORY. MEASURE is a data element of type Number (Length: 5, Decimals: 2) and

CATEGORY is a data element of type Text (Length: 2). This is illustrated by the figure below –

Step 3: Once the data objects are created, the next step is to create the function BMI_SERVICE with HEIGHT and MASS as the context data objects and BMI_RESULT as the result data object as shown below:

Step 4: Create the ruleset BMI_RULES (Text: BMI Rules). The ruleset comprises 6 rules altogether which we will summarize in the following section. The first rule (1) determines the calculation schema based on the quantity units.

Page 6: Executing a BRFplus Decision Service from an …...functionality accessible via the SAP NetWeaver Gateway Interface. There are several ways to create the There are several ways to

Executing a BRFplus Decision Service from an Android device

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 6

The decision table „Determination of Calculation Schema‟ is shown below –

The second rule (2) checks if the calculation schema is undefined. If it is, then a log message action is executed. The next rule (3) is an exit condition which stops rule processing if the calculation schema is undefined.

Page 7: Executing a BRFplus Decision Service from an …...functionality accessible via the SAP NetWeaver Gateway Interface. There are several ways to create the There are several ways to

Executing a BRFplus Decision Service from an Android device

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 7

The next two rules ((4) and (5)) derive the measure based on the calculation schema as shown in the figures below –

Page 8: Executing a BRFplus Decision Service from an …...functionality accessible via the SAP NetWeaver Gateway Interface. There are several ways to create the There are several ways to

Executing a BRFplus Decision Service from an Android device

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 8

The last rule (6) derives the category based on the calculated measure using a decision table expression as shown below –

The decision table „Mapping of measure to category’ contains the following rows:

Page 9: Executing a BRFplus Decision Service from an …...functionality accessible via the SAP NetWeaver Gateway Interface. There are several ways to create the There are several ways to

Executing a BRFplus Decision Service from an Android device

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 9

Creating Remote-Enabled Function

Once the decision service is modeled, the next step now is to create a remote-enabled function which will trigger the decision service processing. The remote-enabled function can be either hand-coded or automatically generated from the BRFplus workbench as described in the following section.

The following is an example of a remote-enabled function coded manually:

Page 10: Executing a BRFplus Decision Service from an …...functionality accessible via the SAP NetWeaver Gateway Interface. There are several ways to create the There are several ways to

Executing a BRFplus Decision Service from an Android device

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 10

Function Source Code:

FUNCTION ZBMI_STRUCT_FUNC. *”---------------------------------------------------------------------- *”*”Local Interface: *” IMPORTING *” VALUE(HEIGHT) TYPE FDT_S_QUANTITY *” VALUE(WEIGHT) TYPE FDT_S_QUANTITY *” EXPORTING *” VALUE(BMI_RESULT) TYPE ZSBMI_RESULT *”---------------------------------------------------------------------- DATA: lo_fct TYPE REF TO if_fdt_function, ls_mass TYPE if_fdt_types=>element_quantity, ls_height TYPE if_fdt_types=>element_quantity, lo_context TYPE REF TO if_fdt_context, lo_result TYPE REF TO if_fdt_result, ls_bmi TYPE zsbmi_result, lt_msg TYPE if_fdt_types=>t_message,

Page 11: Executing a BRFplus Decision Service from an …...functionality accessible via the SAP NetWeaver Gateway Interface. There are several ways to create the There are several ways to

Executing a BRFplus Decision Service from an Android device

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 11

lx_fdt TYPE REF TO cx_fdt, lt_log_msg TYPE if_fdt_actn_message_log=>t_log_msg_text, lv_string TYPE string. FIELD-SYMBOLS <ls_msg> TYPE if_fdt_types=>s_message. ls_mass-number = weight-number. ls_mass-unit = weight-unit. ls_height-number = height-number. ls_height-unit = height-unit. TRY.

* 005056B4164A1EE0BBB5313AB47ED4A2 is the UUID of the function BMI_SERVICE

* modeled in the workbench. lo_fct ?= cl_fdt_factory=>if_fdt_factory~get_instance( )->get_function( ‘005056B4164A1EE0BBB5313AB47ED4A2’ ). lo_context = lo_fct->get_process_context( ). lo_context->set_value(: iv_name = ‘HEIGHT’ ia_value = ls_height ), iv_name = ‘MASS’ ia_value = ls_mass ). lo_fct->process( EXPORTING io_context = lo_context IMPORTING eo_result = lo_result ). CATCH cx_fdt INTO lx_fdt. LOOP AT lx_fdt->mt_message ASSIGNING <ls_msg>.

WRITE:/ <ls_msg>-text.

ENDLOOP. ENDTRY.

IF lo_result IS BOUND. lo_result->get_value( IMPORTING ea_value = ls_bmi ). bmi_result-measure = ls_bmi-measure. bmi_result-category = ls_bmi-category. cl_fdt_expr_services=>get_log_entries(

IMPORTING et_log_msg_text = lt_log_msg ). LOOP AT lt_log_msg INTO lv_string.

WRITE: / lv_string.

ENDLOOP.

ENDIF.

ENDFUNCTION.

Page 12: Executing a BRFplus Decision Service from an …...functionality accessible via the SAP NetWeaver Gateway Interface. There are several ways to create the There are several ways to

Executing a BRFplus Decision Service from an Android device

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 12

In contrast to the manually coded function, the following steps illustrate how you can let the BRFplus workbench do all the work for you:

Provide the function group name, function name and check the Local Package checkbox. Then click on Generate button.

The remote-function module is now generated. We can view and execute the function module in SE37 transaction.

Configuring the Connection from Gateway System to Backend System

It is very likely that the BRFplus system and the Gateway system are not the same. In this case we have to configure or setup the RFC connection in the Gateway system. For a detailed description of how to create or

Page 13: Executing a BRFplus Decision Service from an …...functionality accessible via the SAP NetWeaver Gateway Interface. There are several ways to create the There are several ways to

Executing a BRFplus Decision Service from an Android device

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 13

set up an RFC connection between two SAP systems, please follow the link: Generate/Change RFC Connections.

Creating a Gateway Service (in the Gateway System)

We have now provisioned our decision service and also set up the RFC connection to execute our remote function which will trigger the processing of the decision service. As before, we will provide the details of creating a Gateway service using RFC-enabled function module. All the necessary details can be obtained via the aforementioned documents. We will summarize the steps in short and focus on the important ingredients.

In order to create a gateway service, we have to first create a data model and then a consumption model on top of it.

Creating the data model

A data model is created to design and maintain the content of the service based on existing sources, such as Remote Function Call (RFC), Screen Scrapping and Business Object Repository (BOR).

1. Open transaction SE80 in the Gateway system.

2. Select „GW Data Model‟ from the drop down menu.

3. Write the name of the data model you want to create in the text box below the drop down box and

press the ENTER button.

Page 14: Executing a BRFplus Decision Service from an …...functionality accessible via the SAP NetWeaver Gateway Interface. There are several ways to create the There are several ways to

Executing a BRFplus Decision Service from an Android device

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 14

4. Click on Yes button of the popup.

5. A Create data model dialog box appears. In the Type input field, enter PS and in the Create From

section, select the option Generate from Data Source Object. Check the checkbox OData Channel.

Click the OK button.

Page 15: Executing a BRFplus Decision Service from an …...functionality accessible via the SAP NetWeaver Gateway Interface. There are several ways to create the There are several ways to

Executing a BRFplus Decision Service from an Android device

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 15

6. A Create Data Model <Data Model Name> dialog box appears. Enter the Description as „BMI Data

Model‟, System Alias and from the drop down of Data Source Type select ‘2 Remote Function Calls’.

In order to create a system alias, please follow the steps outlined in the SAP help document (link).

Page 16: Executing a BRFplus Decision Service from an …...functionality accessible via the SAP NetWeaver Gateway Interface. There are several ways to create the There are several ways to

Executing a BRFplus Decision Service from an Android device

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 16

7. Click on the Continue button.

8. A Create Object Directory Entry dialog box appears. Click on Local Object button.

9. Click on the Search icon and in the dialog box provide the name of the function that you created.

10. Create mapping for the operations to the data objects used by your function.

11. Create the QUERY operation.

The QUERY operation is used to get a list of the business objects that your Gateway Service is mapped to.

Page 17: Executing a BRFplus Decision Service from an …...functionality accessible via the SAP NetWeaver Gateway Interface. There are several ways to create the There are several ways to

Executing a BRFplus Decision Service from an Android device

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 17

12. Create the READ operation.

The READ operation is used to get the details of a particular business object that your Gateway Service is mapped to.

13. Mark the input fields as key elements.

Page 18: Executing a BRFplus Decision Service from an …...functionality accessible via the SAP NetWeaver Gateway Interface. There are several ways to create the There are several ways to

Executing a BRFplus Decision Service from an Android device

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 18

14. Generate the data model by clicking on the Generate icon. To make the data model persistent, you

need to generate it. There is no Save option for data models.

Creating the Consumption Model

A consumption model is created to expose the content to be consumed as an OData service adhering to REST based principles. Once a consumption model is created, the Gateway service is exposed via the ICF (Internet Communication Framework).

1. Select ‘GW Consumption Model’ from the drop down menu.

Page 19: Executing a BRFplus Decision Service from an …...functionality accessible via the SAP NetWeaver Gateway Interface. There are several ways to create the There are several ways to

Executing a BRFplus Decision Service from an Android device

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 19

2. Enter the name of the consumption model you want to create in the text box below the drop down

box and press the ENTER button.

3. Click on the Yes button of the pop up.

4. An Object Navigator dialog box appears. Enter the description of the consumption model and click

the OK button.

Page 20: Executing a BRFplus Decision Service from an …...functionality accessible via the SAP NetWeaver Gateway Interface. There are several ways to create the There are several ways to

Executing a BRFplus Decision Service from an Android device

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 20

5. Add the consumption model to the data model.

6. Provide the name of the consumption model you created.

Page 21: Executing a BRFplus Decision Service from an …...functionality accessible via the SAP NetWeaver Gateway Interface. There are several ways to create the There are several ways to

Executing a BRFplus Decision Service from an Android device

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 21

7. Copy the URL generated in the consumption model and paste in the URL field of Firefox REST client

for testing the service (described in Section 6).

Assign System Alias to OData Service

In order to consume the created service you need to assign system aliases to the OData service. To assign a system alias to the OData Service, proceed as follows:

1. Open transaction SPRO in the gateway system.

2. Open SAP Reference IMG SAP NetWeaver Gateway OData Channel Administration

General Settings

3. Click on Execute icon of Assign SAP System Aliases to OData Service.

4. In the new window click on icon New Entries.

Page 22: Executing a BRFplus Decision Service from an …...functionality accessible via the SAP NetWeaver Gateway Interface. There are several ways to create the There are several ways to

Executing a BRFplus Decision Service from an Android device

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 22

5. In the Service Doc. Identifier column, enter the name of the consumption model. In the SAP System

Alias column, enter the Alias name and check the checkbox in the Default System column.

6. Click on SAVE icon.

7. On saving the Prompt for Customizing Request dialog appears. Select your request and click OK.

Testing the Gateway Service

Once the consumption model is created, we are now ready to test our new service. For the purpose of testing the correctness of our service, we have used the Firefox REST client. In order to test the service, open the REST client and copy and paste the service URL. You can then inspect the xml response to find out if the expected results were obtained.

Page 23: Executing a BRFplus Decision Service from an …...functionality accessible via the SAP NetWeaver Gateway Interface. There are several ways to create the There are several ways to

Executing a BRFplus Decision Service from an Android device

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 23

Fig. 1

Note: Please do not confuse the „m‟ in the response text 79m or 2m to be associated with a quantity unit. This is

automatically added by the REST client.

Creating the Android Application

Create a new application in Android

1. Open Eclipse.exe.

2. Click on File New Android Project.

3. In the New Android Project dialog write the Project Name as BMI_struct and click on Next.

Page 24: Executing a BRFplus Decision Service from an …...functionality accessible via the SAP NetWeaver Gateway Interface. There are several ways to create the There are several ways to

Executing a BRFplus Decision Service from an Android device

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 24

4. As the build target, select Android 4.0.3 and click on Next.

5. Enter the Package Name as brfplus.BMI.calc and click on Finish button.

Page 25: Executing a BRFplus Decision Service from an …...functionality accessible via the SAP NetWeaver Gateway Interface. There are several ways to create the There are several ways to

Executing a BRFplus Decision Service from an Android device

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 25

UI Design and Code

1. The BMI_struct application is created. Open the main.xml file.

2. Design the UI in the Android with input fields as the import parameters of the RFC and output fields

as the export parameters of the RFC (Height and Weight are the input parameters of RFC and

Measure and Category are the output parameters).

Page 26: Executing a BRFplus Decision Service from an …...functionality accessible via the SAP NetWeaver Gateway Interface. There are several ways to create the There are several ways to

Executing a BRFplus Decision Service from an Android device

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 26

3. Open the AndroidManifest.xml file and add the following uses-permission just after the <uses-

sdk….> tag.

<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.WRITE_SETTINGS"/>

4. Create the request URL that will be sent.

Eg:http://<gateway_host>:<gateway_port>/sap/opu/odata/sap/<GW_consumption_model_name>/<*

>(<**>)

*name of the Entity set generated in the XML response

**input E.g.: height=2,weight=79,height_unit='M',weight_unit='KG'

5. Define the HTTP Client.

6. Create the Get request.

7. Execute the request. Response is an XML document as shown above in Fig. 1.

8. Parse the XML document to get the values of the nodes.

NOTE: The nodes are the mapped properties of the data model which contains the values of the input and output

parameters.

Page 27: Executing a BRFplus Decision Service from an …...functionality accessible via the SAP NetWeaver Gateway Interface. There are several ways to create the There are several ways to

Executing a BRFplus Decision Service from an Android device

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 27

Android Source code: (to be written in BMI_structActivity.java)

Page 28: Executing a BRFplus Decision Service from an …...functionality accessible via the SAP NetWeaver Gateway Interface. There are several ways to create the There are several ways to

Executing a BRFplus Decision Service from an Android device

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 28

Page 29: Executing a BRFplus Decision Service from an …...functionality accessible via the SAP NetWeaver Gateway Interface. There are several ways to create the There are several ways to

Executing a BRFplus Decision Service from an Android device

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 29

9. Save the application.

10. Right click on the application name and click on the Build Project menu.

Page 30: Executing a BRFplus Decision Service from an …...functionality accessible via the SAP NetWeaver Gateway Interface. There are several ways to create the There are several ways to

Executing a BRFplus Decision Service from an Android device

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 30

11. Again right click on the application name and click on Run As and then select the menu 1 Android

Application.

Page 31: Executing a BRFplus Decision Service from an …...functionality accessible via the SAP NetWeaver Gateway Interface. There are several ways to create the There are several ways to

Executing a BRFplus Decision Service from an Android device

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 31

NOTE: To run the application as Android Application you first need to create a new Android Virtual Device (AVD).

12. Steps to create new AVD:

Click on AVD Manager icon in the Eclipse window.

In the AVD Manager dialog box click on New button.

Page 32: Executing a BRFplus Decision Service from an …...functionality accessible via the SAP NetWeaver Gateway Interface. There are several ways to create the There are several ways to

Executing a BRFplus Decision Service from an Android device

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 32

In the Create New AVD dialog enter the name of the AVD, The target as Android 4.0.3 – API

Level 15, the size of SD card as 128 MiB and the Built-in skin as HVGA and then click on Create

AVD.

13. Now select the created AVD and click on Start. In the next dialog box that appears click on Launch.

Page 33: Executing a BRFplus Decision Service from an …...functionality accessible via the SAP NetWeaver Gateway Interface. There are several ways to create the There are several ways to

Executing a BRFplus Decision Service from an Android device

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 33

14. View the output on the Android screen.

Page 34: Executing a BRFplus Decision Service from an …...functionality accessible via the SAP NetWeaver Gateway Interface. There are several ways to create the There are several ways to

Executing a BRFplus Decision Service from an Android device

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 34

Summary

BRFplus provides a flexible set of API‟s which can be easily wrapped over a Gateway service and consumed from devices and applications outside the SAP domain. This document covers a simple scenario of simulating a Body Mass Index decision service from an android device. The concepts can be easily extended to other complex decision service scenarios. A similar implementation can also be carried out for other devices like iPhone or iPad.

Page 35: Executing a BRFplus Decision Service from an …...functionality accessible via the SAP NetWeaver Gateway Interface. There are several ways to create the There are several ways to

Executing a BRFplus Decision Service from an Android device

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 35

Related Content

BRFplus – The Very Basics

How To... Create a Gateway Service Using the RFC Generator

Consuming SAP NetWeaver Gateway Services from Android Applications

For more information, visit the Business Rules Management homepage.

Page 36: Executing a BRFplus Decision Service from an …...functionality accessible via the SAP NetWeaver Gateway Interface. There are several ways to create the There are several ways to

Executing a BRFplus Decision Service from an Android device

SAP COMMUNITY NETWORK scn.sap.com

© 2012 SAP AG 36

Copyright

© Copyright 2012 SAP AG. All rights reserved.

No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice.

Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors.

Microsoft, Windows, Excel, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation.

IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x, System z, System z10, System z9, z10, z9, iSeries, pSeries, xSeries, zSeries, eServer, z/VM, z/OS, i5/OS, S/390, OS/390, OS/400, AS/400, S/390 Parallel Enterprise Server, PowerVM, Power Architecture, POWER6+, POWER6, POWER5+, POWER5, POWER, OpenPower, PowerPC, BatchPipes, BladeCenter, System Storage, GPFS, HACMP, RETAIN, DB2 Connect, RACF, Redbooks, OS/2, Parallel Sysplex, MVS/ESA, AIX, Intelligent Miner, WebSphere, Netfinity, Tivoli and Informix are trademarks or registered trademarks of IBM Corporation.

Linux is the registered trademark of Linus Torvalds in the U.S. and other countries.

Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either trademarks or registered trademarks of Adobe Systems Incorporated in the United States and/or other countries.

Oracle is a registered trademark of Oracle Corporation.

UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group.

Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc.

HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C®, World Wide Web Consortium, Massachusetts Institute of Technology.

Java is a registered trademark of Oracle Corporation.

JavaScript is a registered trademark of Oracle Corporation, used under license for technology invented and implemented by Netscape.

SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP Business ByDesign, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and other countries.

Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal Decisions, Web Intelligence, Xcelsius, and other Business Objects products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Business Objects S.A. in the United States and in other countries. Business Objects is an SAP company.

All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.