Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Ariba Discovery RFx Publication to External Marketplace API sample extension application.

License

Notifications You must be signed in to change notification settings

SAP-archive/cloud-ariba-discovery-rfx-to-external-marketplace-ext

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Not Maintained

Ariba Public Sourcing

REUSE status

Content:

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:

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:

  1. Register an SAP Ariba Open APIs application in SAP Ariba Developer Portal.
  2. Promote your registered application for production access. (optional, not required for working against SAP Ariba Open APIs sandbox environment)
  3. Build and deploy the Java extension application on SAP Cloud Platform.
  4. Configure the Java application connectivity.
  5. Start the Java extension application.

You need to:

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

Build the Application

  1. Go to the cloud-ariba-public-sourcing-ext folder.

  2. 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.

Deploy the Application Using the Cockpit

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.

Prerequisites

Build the Application from Eclipse

  1. You have to clone the cloud-ariba-discovery-rfx-to-external-marketplace-ext project.

    1. Оpen the Git Perspective. Choose Windows > Open Perspective > Other. Select Git and choose OK.
    2. Choose Clone a Git repository.
    3. Enter https://github.com/SAP/cloud-ariba-discovery-rfx-to-external-marketplace-ext.git in the URI field and choose Next.
    4. Set the Directory field and choose Finish.
  2. You have to import the cloud-ariba-discovery-rfx-to-external-marketplace-ext project as an existing Maven project and then build it.

    1. In the Java EE perspective, choose File > Import > Maven > Existing Maven Project.
    2. Browse and select the folder where you have cloned the Git repository and choose Finish. Wait for the project to load.
    3. From the project context menu, choose Run As > Maven Build.
    4. Enter clean install in the Goals field and choose Run. The build should pass successfully.

Deploy the Application from Eclipse

To deploy the application from Eclipse IDE, follow these steps:

  1. Set the context path to /
    1. In the Project Explorer view right-click on the project and choose Properties > Web Project Settings.
    2. For Context root enter /
  2. In the Servers view right-click on the white field and choose New > Server.
  3. Choose if you want to work locally or directly on SAP Cloud Platform
    1. Local installation
      1. Select Java Web Tomcat 8 and choose Next.
      2. Browse to the location of your Java Web Tomcat 8 SDK and choose Next.
    2. SAP Cloud Platform
      1. Select SAP Cloud Platform and choose Next.
      2. Select Java Web Tomcat 8 as a runtime option.
  4. 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.

SAP Ariba Open APIs sandbox environment

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>
SAP Ariba Open APIs production environment

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.

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.