- Overview
- Technical Details
- Prerequisites
- Register a Discovery RFX Publication to External Marketplace Application
- Build and Deploy the Application on SAP Cloud Platform
- Start the Public Sourcing Application
- Notes On Retrieving Sourcing Events
- Additional Information
Ariba Public Sourcing is a sample extension application for Ariba Network that runs on SAP Cloud Platform. The purpose of the application is to collect public sourcing events from Ariba Discovery via SAP Ariba Open APIs and to display them in an application running on SAP Cloud Platform.
The application uses the Discovery RFX Publication to External Marketplace API. You can run it either on enterprise, or trial SAP Cloud Platform account in the Neo environment.
These are the SAP Cloud Platform services and features in use:
- Connectivity service - the application uses the Connectivity service to obtain connection to SAP Ariba Open APIs.
- SAP HANA / SAP ASE service
The Ariba Public Sourcing extension is a Java application that calls Ariba's Discovery RFX Publication to External Marketplace API and fetches all available public sourcing events. The events are persisted in a database and displayed in a SAPUI5 front-end. The events could be either fetched manually through the UI or automatically with a scheduler.
To use this extension application, you need to:
- Register an SAP Ariba Open APIs application in SAP Ariba Developer Portal.
- Promote your registered application for production access. (optional, not required for working against SAP Ariba Open APIs sandbox environment)
- Build and deploy the Java extension application on SAP Cloud Platform.
- Configure the Java application connectivity.
- Start the Java extension application.
You need to:
- have an account for SAP Ariba Developer Portal
- have an SAP Cloud Platform trial account
- download or clone the project with Git
- have set up Maven 3.0.x
Register a Discovery RFX Publication to External Marketplace Application in SAP Ariba Developer Portal
You already have an account for SAP Ariba Developer Portal. Open the guide and follow the steps to register a new SAP Ariba Open APIs application that will be used against SAP Ariba Open APIs sandbox environment. At the end, you should have an application key related to the SAP Ariba Open APIs application. You will need it in order to call the Discovery RFX Publication to External Marketplace API, the sandbox environment.
Production access: When you want to work against production environment you should first promote your application for production access. At the end, besides the application key, you will have a set of credentials (Service Provider user and Service Provider password) related to the registered SAP Ariba Open APIs application. You need them in order to call the Discovery RFX Publication to External Marketplace API production environment.
You have already downloaded or cloned the Public Sourcing extension application. Now you have to build the application and deploy it on the SAP Cloud Platform. To do that, use one of the following tools:
- SAP Cloud Platform Cockpit
- Eclipse IDE
-
Go to the
cloud-ariba-public-sourcing-ext
folder. -
Build the project with:
mvn clean install
The generated WAR file ROOT.war
under target sub-folder cloud-ariba-discovery-rfx-to-external-marketplace-ext\target
is ready to be deployed.
You have to deploy the ROOT.war
file as a Java application via SAP Cloud Platform Cockpit. Use Java Web Tomcat 8 as a runtime option.
When using the Eclipse IDE, you can take a look at the structure and code of the application. You have to import the application as an existing Maven project. You also have to choose Java Web Tomcat 8 as a runtime option.
- JDK 8 or later
- Eclipse IDE for Java EE Developers
- SAP Cloud Platform Tools (Installing the SDK for Java Development)
-
You have to clone the
cloud-ariba-discovery-rfx-to-external-marketplace-ext
project.- Оpen the Git Perspective. Choose Windows > Open Perspective > Other. Select Git and choose OK.
- Choose Clone a Git repository.
- Enter
https://github.com/SAP/cloud-ariba-discovery-rfx-to-external-marketplace-ext.git
in the URI field and choose Next. - Set the Directory field and choose Finish.
-
You have to import the
cloud-ariba-discovery-rfx-to-external-marketplace-ext
project as an existing Maven project and then build it.- In the Java EE perspective, choose File > Import > Maven > Existing Maven Project.
- Browse and select the folder where you have cloned the Git repository and choose Finish. Wait for the project to load.
- From the project context menu, choose Run As > Maven Build.
- Enter
clean install
in the Goals field and choose Run. The build should pass successfully.
To deploy the application from Eclipse IDE, follow these steps:
- Set the context path to
/
- In the Project Explorer view right-click on the project and choose Properties > Web Project Settings.
- For
Context root
enter/
- In the Servers view right-click on the white field and choose New > Server.
- Choose if you want to work locally or directly on SAP Cloud Platform
- Local installation
- Select Java Web Tomcat 8 and choose Next.
- Browse to the location of your Java Web Tomcat 8 SDK and choose Next.
- SAP Cloud Platform
- Select SAP Cloud Platform and choose Next.
- Select Java Web Tomcat 8 as a runtime option.
- Local installation
- Add the application to the Configured field and choose Finish.
You need to create HTTP destination on the SAP Cloud Platform:
You configure the destination according to the SAP Ariba Open APIs environment.
Note: you can switch the environments by updating the created destination. You can find sample destinations in the resources folder.
Use the following required properties:
Type: HTTP
Name: ariba-public-sourcing
URL: <SAP Ariba OpenAPIs sandbox environment URL>
Authentication: NoAuthentication
And add four additional properties:
JobIntervalInSeconds: <How often will the Discovery RFX Publication to External Marketplace API be called>
SiteId: <The unique site id. Enter random string in case of sandbox environment>
ApiKey: <SAP Ariba Open APIs application API key>
Use the following required properties:
Type: HTTP
Name: ariba-public-sourcing
URL: <SAP Ariba OpenAPIs production environment URL>
Authentication: BasicAuthentication
User: <SAP Ariba Open APIs Service Provider User>
Password: <SAP Ariba Open APIs Service Provider Password>
And add four additional properties:
JobIntervalInSeconds: <How often will the Discovery RFX Publication to External Marketplace API be called>
SiteId: <The unique site id>
ApiKey: <SAP Ariba Open APIs application API key>
After creating the destination, if you are working against SAP Cloud Platform start (or restart in case the application is already started) the application via the cloud cockpit.
The automatic retrieving of sourcing events from SAP Ariba is commented out in the source code of the Java application and the retrieving is done manually through the UI. If you prefer, you could turn on the automatic retrieving by uncommenting the related logic in PublicSourcingContextListener.java.
- SAP Cloud Documentation - https://help.sap.com/viewer/product/CP/Cloud/en-US
- SAP Ariba Open APIs - https://developer.ariba.com/api
Copyright © 2017-2020 SAP SE or an SAP affiliate company. All rights reserved. This project is licensed under the Apache Software License, version 2.0 except as noted otherwise in the LICENSE file.