• Categories
  • Search
Friday, June 3, 2016

Oracle ERP Cloud Integration Services - Callback Notification Design and Implementation

Important Note: Please visit Oracle's Application Customer Connect for latest and more information on ERP Integration Services 

Introduction

Bulk import and export operation in ERP
integration services are long running processes that require asynchronous
callback pattern to notify consumer upon job completion. ERP Cloud integration
services provides infrastructure for customer to register their callback
service that could be invoked when import or export job is completed.

Customer may create and host a callback web service either in
Oracle PaaS or on-premise application server to receive notification from ERP
cloud upon job completion.

This post describes how to design, configure and
automate callback services leveraging Oracle Service Oriented Architecture Cloud
Service (SOACS) deployed on Oracle’s cloud Platform As a Service (PaaS)
infrastructure.  For more information on SOA Cloud Service, please
refer to this. However, you could
implement similar solution with various Oracle PaaS services.

Design and Implementation

The callback web service must be SOAP based and implements mandatory
“onJobCompletion” operation. The callback web service endpoint URL is registered
when invoking importBulkData or exportBulkData operations from ERP Integration
services. ERP Cloud will invoke this service upon job competition respectively.

You can leverage any Oracle PaaS solution to host this
service. This post uses SOACS to demonstrate the concept.

This is a typical SOACS composite:

This is a simple BPEL component to receive the callback and
it can be further designed to get artifacts from UCM depending on your case.

Sample Callback Service WSDL

<?xml version= '1.0' encoding= 'UTF-8' ?>
<wsdl:definitions
name="ERPCallback"
targetNamespace="http://xmlns.oracle.com/ERPIntegrationR11/ERPCallback/ERPCallback"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:client="http://xmlns.oracle.com/ERPIntegrationR11/ERPCallback/ERPCallback"
xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
xmlns:ns1="http://TargetNamespace.com/fileService"
xmlns:ns2="http://TargetNamespace.com/nxsdschema"
>
<plnk:partnerLinkType name="ERPCallback">
<plnk:role
name="ERPCallbackProvider"
portType="client:ERPCallback"/>
</plnk:partnerLinkType>
<wsdl:types>
<schema
xmlns="http://www.w3.org/2001/XMLSchema">
<import
namespace="http://xmlns.oracle.com/ERPIntegrationR11/ERPCallback/ERPCallback"
schemaLocation="../Schemas/ERPCallback.xsd"/>
</schema>
<xsd:schema
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:import
namespace="http://TargetNamespace.com/fileService"
schemaLocation="../Schemas/CallbackResponse.xsd"/>
</xsd:schema>
<xsd:schema
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:import
namespace="http://TargetNamespace.com/nxsdschema"
schemaLocation="../Schemas/Response.xsd"/>
</xsd:schema>
</wsdl:types>
<wsdl:message
name="ERPCallbackRequestMessage">
<wsdl:part
name="payload" element="client:process"/>
</wsdl:message>
<wsdl:portType
name="ERPCallback">
<wsdl:operation name="onJobCompletion">
<wsdl:input
message="client:ERPCallbackRequestMessage"/>
</wsdl:operation>
</wsdl:portType>
</wsdl:definitions>

Web Service Security

ERP Cloud Configuration

If you prefer to use HTTPS protocol, then you must import
your SSL certificate in ERP Cloud keystore. Please follow Oracle SR process to
initiate the request in your pod. This is a one-time configuration.

PaaS or On-premise Configuration

ERP cloud implements Oracle Web Service Manager (OWSM) to
secure web services. The security policy for callback is: oracle/wss_saml_token_bearer_client_polic.
This mandates that callback web service in your PaaS or on-premise must be
secured through compatible OWSM server policy: oracle/wss_saml_bearer_or_username_token_service_policy.

The following diagram illustrates the OWSM policy applied to
your SOA Composite reference:


This is a sample SAML assertion from ERP Cloud when invoking
callback service:

<wsse:Security
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
env:mustUnderstand="1">

<saml:Assertion xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion"
MajorVersion="1" MinorVersion="1"
AssertionID="SAML-fCdgV0BqwQDU97xq6frjRw22"
IssueInstant="2016-05-24T01:06:22Z"
Issuer="www.oracle.com">

<saml:Conditions NotBefore="2016-05-24T01:06:22Z"
NotOnOrAfter="2016-05-24T01:11:22Z"/>

<saml:AuthenticationStatement
AuthenticationInstant="2016-05-24T01:06:22Z"
AuthenticationMethod="urn:oasis:names:tc:SAML:1.0:am:password">

<saml:Subject>

<saml:NameIdentifier
Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified">FINUSER1</saml:NameIdentifier>

<saml:SubjectConfirmation>

<saml:ConfirmationMethod>urn:oasis:names:tc:SAML:1.0:cm:bearer</saml:ConfirmationMethod>

</saml:SubjectConfirmation>

</saml:Subject>

</saml:AuthenticationStatement>

<dsig:Signature
xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">

<dsig:SignedInfo>

<dsig:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>

<dsig:SignatureMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>

<dsig:Reference URI="#SAML-fCdgV0BqwQDU97xq6frjRw22">

<dsig:Transforms>

<dsig:Transform
Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>

<dsig:Transform
Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>

</dsig:Transforms>

<dsig:DigestMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>

<dsig:DigestValue>IqAsJkAm490B8xQLk3+ztDPLggw=</dsig:DigestValue>

</dsig:Reference>

</dsig:SignedInfo>

<dsig:SignatureValue>DqM35PHNh4RKvWiZ/QOBYieWl0a9sKk0eFYSISL2NRqK7gLNdH8mTUT3HlBl282b3FsJrEgK25cuV1f2suquyEzOeGUQTd71hueW4xbXg5bjUNAQ+RXjdP3TUr8wy9+Ftv1s2tobZSXyfpxmHDDcsgOEP2MltkItjLKRyCDlHTrqUxBJDW+g5KvwgNhjadA/1ShlBeyA4uv2X3uxa/IyDGr5h82P6v+jUIXtnDjZW0lDphdjZOXx+y943tYPx8SYDaIaf20lb19lHI10nwm76nzo7gU/MAxS2d5uf1YsbH15NN2tD7amwpSznRTt8OgTwgru27XcFVQ+0FGjA4O26Q==</dsig:SignatureValue>

<dsig:KeyInfo>

<dsig:X509Data>

<dsig:X509Certificate>MIIDbDCCAlSgAwIBAgIGAVL8VT1fMA0GCSqGSIb3DQEBCwUAMHgxCzAJBgNVBAYTAlVTMRAwDgYDVQQIEwdNeVN0YXRlMQ8wDQYDVQQHEwZNeVRvd24xFzAVBgNVBAoTDk15T3JnYW5pemF0aW9uMRkwFwYDVQQLExBGT1IgVEVTVElORyBPTkxZMRIwEAYDVQQDEwlDZXJ0R2VuQ0EwHhcNMTYwMjIwMDEzOTUwWhcNMjEwMjE4MDEzOTUwWjBTMRMwEQYKCZImiZPyLGQBGRYDY29tMRYwFAYKCZImiZPyLGQBGRYGb3JhY2xlMRIwEAYKCK8tzPmS9ielPXDmLnIlaF+NvYf2YsQzurFxkzJ37PPeOpImr5bj83gyTKzsnRLETN6j1cQUtCARa+QPuBYw9c2Y4gkoFSyKBS3nRG5ulJmFafoB3SBBfX93126V7rZBjZ8QrzsZhATTZQijs2a7s/X2hNTuGheIWqyerlUrek5PErkPY7eYFijmwn5pcSokUV10Py6dxw+A==</dsig:X509Certificate>

<dsig:X509IssuerSerial>

<dsig:X509IssuerName>CN=CertGenCA, OU=FOR TESTING ONLY,
O=MyOrganization, L=MyTown, ST=MyState, C=US</dsig:X509IssuerName>

<dsig:X509SerialNumber>1455932390751</dsig:X509SerialNumber>

</dsig:X509IssuerSerial>

<dsig:X509SubjectName>CN=service,
DC=us, DC=oracle, DC=com</dsig:X509SubjectName>

<dsig:X509SKI>kFgAwGeiKu8lIiJe62UKOE2V0X8=</dsig:X509SKI>

</dsig:X509Data>

</dsig:KeyInfo>

</dsig:Signature>

</saml:Assertion>

You must configure your SOACS instance as follows:

1. The SOACS instance must support issuer www.oracle.com and LDAP
directory must have saml:NameIdentifier username. In this sample it is
FINUSER1.

2. The SAML assertion also contains digital
signature that must be imported in SOACS’s OWSM keystore. Please refer this
diagram:


Runtime

Please refer “Automate
ERP Inbound Bulk Import Integration – Part I
” post on how to invoke
ERP integration services for import.

This is a sample payload for importBulkData operation: 

<soap:Body>

<ns1:importBulkData xmlns:ns1="http://xmlns.oracle.com/apps/financials/commonModules/shared/model/erpIntegrationService/types/">

<ns1:document xmlns:ns2="http://xmlns.oracle.com/apps/financials/commonModules/shared/model/erpIntegrationService/">

  <ns2:Content>UEsDBBQAAAAIAHSsJUWkOHOwEwEAAHgDAAAXAAAAQXBJbnZvaWNlc0ludGVyZmFjZS5jc3bV0LFOwzAQBuAdiXewOjBdU5/ts+
6EffAAtSBmEVFhjJKyqHN4AqoeszLP7HID0HEmmljRk5RMU67V7aergIGa8IHE/x1NxPhwngsBjBBdG8jlCAn+XizI/OvPX3wLjuvQJQSwECFAAUAAAACAB0rCVFpDhzsBMBAAB4AwAAFwAAAAAAAAAAACAAAAAAAAAAQXBJbnZvaWNlc0ludGVyZmFjZS5jc3ZQSwECFAAUAAAACAAze2pIXdvnRHQAAACpAAAAEQAAAAAAAAAAACAAAABIAQAAQVBURVNULlBST1BFUlRJRVNQSwUGAAAAAAIAAgCEAAAA6wEAAAAA</ns2:Content>

  <ns2:FileName>GL_1234.678.ABC_12345678</ns2:FileName>

  </ns1:document>

  <ns1:jobDetails></ns1:jobDetails>

  <ns1:notificationCode>30</ns1:notificationCode>

  <ns1:callbackURL>https://hostname:port/soainfra/services/default/ERPCallback/ERPCallbackResponse</ns1:callbackURL>

  <ns1:jobOptions></ns1:jobOptions>

  </ns1:importBulkData>

</soap:Body>

Note: In callbackURL, you must provide your callback web
service endpoint URL that ERP Cloud will invoke upon job completion.

The following screen illustrates SOACS runtime instance and
details:


This is a sample message that ERP Cloud returns to your
callback web service:

<?xml
version="1.0" encoding="UTF-8"?><inputVariable>

<part
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
name="payload">

<ns0:onJobCompletion
xmlns:ns0="http://xmlns.oracle.com/scheduler"
xmlns:wsa="http://www.w3.org/2005/08/addressing">

<requestId>17960</requestId>

<state>SUCCEEDED</state>

<resultMessage>{"JOBS":[{"JOBNAME":"Load
Interface File for
Import","JOBPATH":"/oracle/apps/ess/financials/commonModules/shared/common/interfaceLoader","DOCUMENTNAME":"CCLFGL.CONCUR.CCLJEES.1031.zip","REQUESTID":"17957","STATUS":"SUCCEEDED","CHILD":[{"JOBNAME":"Transfer
File","JOBPATH":"/oracle/apps/ess/financials/commonModules/shared/common/interfaceLoader","REQUESTID":"17958","STATUS":"SUCCEEDED"},{"JOBNAME":"Load
File to Interface","JOBPATH":"/oracle/apps/ess/financials/commonModules/shared/common/interfaceLoader","REQUESTID":"17959","STATUS":"SUCCEEDED"}]},{"JOBNAME":"Import
Journals","JOBPATH":"/oracle/apps/ess/financials/generalLedger/programs/common","REQUESTID":"17960","STATUS":"SUCCEEDED"}],"SUMMARYSTATUS":"SUCCEEDED"}</resultMessage>

</ns0:onJobCompletion>

</part>

</inputVariable>

Conclusion

This post illustrates how to implement callback service to receive
an notification from ERP Cloud upon job completion. This is a critical component
of your end-to-end integration flow to act on the outcome and determine the
next steps for downstream or upstream processing. The callback message provides
complete details of all the related jobs including data points to get output
data from UCM. 

Join the discussion

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha
 

Visit the Oracle Blog

 

Contact Us

Oracle

Integrated Cloud Applications & Platform Services