Go to primary content
Oracle® Retail Integration Cloud Service Implementation Guide–Concepts
Release 22.1.201.0
F56230-01
  Go To Table Of Contents
Contents

Previous
Previous
 
Next
Next
 

10 Integration with External Applications

RIBforExt is the Oracle Retail Enterprise Integration component designed to address the connectivity requirements for 3rd Party integrations in a hybrid cloud topology where the RIB is deployed in the Retail Integration Cloud Services.

In a hybrid cloud scenario customers no longer have access to RIB's JMS server and cannot directly publish and subscribe to messages on the JMS topics. The RIB-EXT app is designed to fill that gap, it provides Web Service based APIs to publish to and subscribe from the RIB's JMS from third party systems.

RIBforEXT has all of the RIB flows available for the deployment time configuration based on the customer use cases.

RIB-EXT out-of-the-box provides the complete set of publishers, subscribers and retry adapters needed for the external application to integrate with Oracle Retail applications using RIB infrastructure.

The selective list of publisher and subscriber adapters needed by each specific external application is defined by the customer's implementation team.

Surrounding text describes integration-with-extapps.png.

Implementing RIB-EXT

RIB-EXT is an Oracle Retail Integration Application that provides necessary communication channel for external applications to publish and consume message from RIB's JMS on cloud and premise.


Note:

For more information on WDSL's, see the Oracle Retail Integration Bus Integration Guide and for information on plugable jar, see the Client Connector For Oracle Retail Integration Cloud Service 22.1.201.0 (Patch) available on My Oracle Support.

How to Send/Receive Messages to/from the RIB System Using SOAP APIs

There are two solutions for connecting the RIB-EXT with third party using SOAP:

  1. Use RIB-EXT with FileIO (this is SOAP based flow).

    The FileIO app retrieves the data files from RIB-EXT to a folder and can send data files to RIB-EXT from that folder.

    FileIO is ready solution you can use directly. Below is the link where you can find some details about it. For more information, see the Oracle Retail Enterprise Integration Overview Guide for RICS (PDF)

    You can download FileIO from My Oracle Support Patch Search. Look for the file p30120970_16003100_Generic\RIBCloudConnectorClientSideComponentsPak16.0.031.zip\RibFileIo16.0.031ForAll16.x.xApps_eng_ga.zip

  2. Otherwise, you can use RIB-EXT without FileIO (this is also a SOAP-based flow). However, you need to program the custom implementation logic to consume the messages from RIB EXT.

    Implementation logic is entered into the rib-plugin-sample\WEB-INF\lib\your-impl-16.0.031.jar file.

External Application as a Publisher (soap-app)

For external applications to publish to the RIB JMS on cloud, it needs to use a publishing webservice provided by rib-ext .The WSDL URL of publishing service is as follows:

http://<rib-ext-host>:<port>/ApplicationMessagePublishingServiceBean/ApplicationMessagePublishingService?wsdl

An external application can publish messages using the above webservice only when rib-ext is configured as a soap-app.

External Application as a Subscriber (soap-app)

For an external application to consume the message from the RIB's JMS on cloud, it has to host the Injector Service. Injector Service is a SOAP webservice that is made available as a pluggable jar.

Subscriber adapters in rib-ext makes a SOAP call to Injector service to send the message to the external application. The WSDL URL of injector service is as follows:

http://<external-app-host>:<port>/ApplicationMessageInjectorBean/InjectorService?wsdl

The following example describes the steps to configure an external application to publish and subscribe using RIB on cloud:

  • Include rib-private-app-plugin-22.1.201.0.jar in to the external application deployable file for example, ext-app.ear/lib.

External Application as a Publisher (rest-app)

For external applications to publish to the RIB JMS on cloud, it needs to use a publishing webservice provided by rib-ext. The end point of publishing service is as follows:

API Rest End Point
Application WADL http://<rib-ext-host>:<port>/rib-<app>-services-web/resources/application.wadl
Ping resource http://<rib-ext-host>:<port>/rib-<app>-services-web/resources/publisher/ping
Publish resource http://<rib-ext-host>:<port>/rib-<app>-services-web/resources/publisher/publish

An external application can publish messages using the above webservice only when rib-ext is configured as a rest-app.

External Application as a Subscriber (rest-app)

For an external application to consume the message from the RIB's JMS on cloud, it has to host the Injector Service. Injector Service is a ReST webservice that is made available as a pluggable jar.

Subscriber adapters in rib-ext makes a ReST call to Injector service to send the message to the external application. The End Point of injector service is as follows:

http://<external-app-host>:<port>/ rib-injector-services-web/resources/injector/inject

The following example describes the steps to configure an external application to publish and subscribe using RIB on cloud:

  • Include rib-injector-services-web-22.1.201.0.war in to the external application deployable file for example, ext-app.ear/lib.

How to implement ReST Client to Call the Publisher Service

In order to publish messages to RIB via ReST service, a standard JAX-RS client API can be used. We provide a few helper libraries and payload jars (RBO contracts) to be used on the classpath of a client application. In other words, these libraries should be packaged as part of the application war/ear file.

Required Libraries are as below.

  • application-message-publishing-service-consumer-22.0.0.000.jar

  • commons-logging-1.2.jar

  • rib-public-api-22.0.0.000.jar

  • retail-private-int-common-util-22.0.0.000.jar

  • retail-public-payload-java-beans-22.0.0.000.jar

  • retail-public-payload-java-beans-base-22.0.0.000.jar

  • retail-rest-service-common-util-22.0.0.000.jar

  • rib-private-common-22.0.0.000.jar

API Info URL
Application WADL http://<examplehost>:<port>/rib-<app>-services-web/resources/application.wadl
Ping resource http://<examplehost>:<port>/rib-<app>-services-web/resources/publisher/ping
Publish resource http://<examplehost>:<port>/rib-<app>-services-web/resources/publisher/publish

See "Appendix - Sample Data from Integration Monitoring Service" for sample code.

How to implement Injector Service (CONSUME messages from RIB) using ReST

Here is the Rest service contract detail:

  1. Keep the path as Injector/inject.

    @Path("/injector")
    
  2. Use POST for this service. As the input message object itself has identifier (message type- CRE/MOD) they don't need to use the PUT/PATCH. they can use message type to build the implementation logic.

    @POST
    @Path("/inject")
    @Consumes({MediaType.APPLICATION_XML})
    
  3. The input would be MediaType.APPLICATION_XML and the structure would be 'ApplicationMessage' object. (file attached for reference).

    <xs:element name="ApplicationMessage">
      <xs:complexType>
        <xs:sequence>
          <xs:element name="family" type="string25"/>
          <xs:element name="type" type="string30"/>
          <xs:element name="businessObjectId" type="string255" minOccurs="0"/>
          <xs:element ref="ApplicationMessageRoutingInfo" minOccurs="0" maxOccurs="unbounded"/>
          <xs:element name="payloadXml" type="xs:string"/>
        </xs:sequence>
      </xs:complexType>
    </xs:element>
    
  4. Customer can utilize the payload.properties file for validation of message family and type.

  5. Return type should be JSON, see below example:

    String message = "{\"message\": \"Inject successful.\"}";
    return Response.ok(message, MediaType.APPLICATION_JSON).build();
    
  6. For exception response customer needs to follow the structure of exceptionVO.

Error Handling

The RIB infrastructure provides a mechanism called RIB error hospital to handle and manage the error messages. When the publishing or subscription of a message fails in the rib-ext for some reason, it lands in error hospital with a reason code. The retry adapters in the rib-ext application are responsible for retrying the messages in error hospital.

Oracle RIB Hospital Administration (RIHA) is a Weblogic application that allows the management of messages in error hospital. Some of the RIHA operations include:

  • Viewing error messages

  • Editing error messages

  • Retrying error messages

  • Stopping error messages

For more information, see the Oracle Retail Integration Bus Hospital Administration Guide.

Monitoring Integration

To monitor live statistics of various components involved in RIB integration system like RIB adapter, error hospital, JMS server, RTG provides a live monitoring application called the Retail Integration Console (RIC).

The RIC is the user interface application designed to provide a unified view of the RTG integration products within the business context of the Oracle Retail applications. It provides near real time statistics regarding the message flows, JMS topics, historical trends of each message family, performance comparisons, and static information like application configuration.

For more information, see the Oracle Retail Integration Console User Guide.