Tuesday, March 17, 2020

SOA CS Instance Provisioning

1.       Login to Oracle Cloud and Browse till classic infrastructure
a.       Once you login – the logged in cloud url will be https://console.#####.oraclecloud.com/
b.       Browse to Profile àService User Console
c.       You will enter a similar URL - ttps://myservices-cacct-####.console.oraclecloud.com/mycloud/cloudportal/cloudHome
d.       Click à Select classic infrastructure
2.       Create pre-requisites before provisioning Oracle SOA Cloud Service:
a.       Create Storage Backups for DB and SOA
                                                               i.      Click Top Left Navigation Menu à Storage ClassicàCreate ContaineràGive name (DBBackUp)
                                                             ii.      Click Top Left Navigation Menu à Storage ClassicàCreate ContaineràGive name (SOABackUp)
3.       Create Database Cloud Instance and SOA Cloud Instance
a.       Create Database Cloud Instance:
                                                               i.      Click Top Left Navigation Menu àDatabase ClassicàCreate Instance
                                                             ii.      Provide Instance Name(SOACSEEDB<UserName>) and other details as per Oracle Standards and generate the SSH Key. Download and save it to your local system.  The DB instance is now created. Provision time for this instance is almost 30 mins .
b.       Create SOA Cloud instance:
                                                               i.       Click Top Left Navigation Menu àSOA
                                                             ii.      GiveDetails. Give details of Database instance previously created and can use the public key previously generate. Provide details as per Oracle Standards and Business Needs. The SOA instance is created after 60mins.

Sunday, March 1, 2020

Retry using OIC

How to add retry logic in OIC


In a regular JCA adapter, there are properties for setting the number of retries.  

OIC as of now doesn’t allow retry options for Synchronous service but it does allow retry options in Asynchronous service.

In Asynchronous service the errors can be resubmitted. As per OIC documentation
Resubmitting the failed instances can be done as 
§  Single failed message resubmissions
§  Bulk failed message resubmissions


Retry can be done at integration level as well. I am providing the steps below which can be applied to the integration. This example is for SOAP Trigger. Ensure that Trigger has optional element as a RetryCounter-

Step 1: Create Integration. Create a Stage and drag an Invoke (example an external SOAP service). 
Step 2: Create an Invoke Connection with URL and Security details from integration created in Step1.  
Step 3: Set the retry counter value in OIC LookUp
Step 4: In Stage Error Handler create a SwitchCase, drag the above connection and map parameters from the main flow. 
Step 5: In the switch condition, the retry counter value should be less than the LookUp value created in Step3. 
Step 6: In Case 1 – Update the retry counter, In Case2 – Invoke the connection created in Step2. 

Thursday, February 27, 2020

Using LookUps in OIC

Here is an demo for using a LookUp in OIC



Browse OIC IntegrationDesignerLookUpsCreate

Step1: You can select respective adapters. I have chosen as per the adapters that I am using for this integration.








Step2: Once Lookup is created. Go the Integration Mapper, then drag the lookupvalue function to the input literal (blank space)









Follow the instructions. Provide default text and map the source. Once done - The integration is good to be activated. 

Note – A csv file can also be used for importing values.

Tuesday, February 25, 2020

Types of OIC integrations


OIC supports the below mentioned types of Integrations. I have copied details from OIC in the table below.

App Driven Orchestration
Multi-step Integration flow invoking applications, integrations and processes triggered by an Application or API.
Scheduled Orchestration
Multi-step Integration flow invoking applications, integrations and processes triggered by a Schedule. Commonly used for Batch/Bulk Integrations or File processing.
File Transfer
Seamlessly and securely move files across the network.
Basic Routing
Basic App to App Routing with Data Mapping.
Publish To OIC
Publish messages from Apps to OIC Pub/Sub Channel.
Subscribe To OIC
Subscribe to messages from OIC Pub/Sub Channel.

More details can be found here This documentation is very easy to follow for understanding the Integration types. 



Sunday, February 23, 2020

Create REST Integration using Oracle Integration Cloud

Using OIC this post explains easiest way to create a REST API using OIC integration



Step 1: Create an outbound Rest Connection using adapter as REST and type as INVOKE. Keep Connection Type-REST API Base URL
Provide- REST URL and Security Policy as needed to create Outbound


Step 2: Create Generic Inbound Rest Connection using adapter as REST and type as TRIGGER. The creds needed to invoke will be basic and will be same as the creds needed to login to OIC.

Step 3: Create a Basic Routing integration (Basic App to App with Data Routing). Drag the REST connection created in Step 2 



















Provide a Name and DataType in Specify Query Parameters.

Configure the Response Payload
















Click enter sample JSON which corresponds to the Invoke Connection created in Step 1
{
  "id": "Value"
}

Step 4: Drag the REST connection created in Step 1 into Drag and Drop an Invoke and perform the same steps as done in Step 3

Step 5: Do the mapping for Execute and Execute Response. Do validations and the mappings should now look green. 

Step 6: Add tracking. 








Step 7: Activate the integration
Step 8: Get the URL details and set up the SOAP UI with the URL. Give the UserId and Password used to login the OIC. Provide the Domain from the URL.
Step 9: Add the string, since it’s a GET and provide value. Run the request and the response received will be response. 

Tuesday, February 18, 2020

Decrypt, Unzip and Transfer files using Oracle MFT


Oracle MFT 12.2.1.3.0 Use Case

Those familiar to MFT will find it easier to understand this post. Oracle Managed File Transfer (MFT) is a high performance, standards-based, end-to-end managed file gateway.
Use case – Inbound Transfer of an encrypted zip containing multiple files using Oracle MFT 12.2.1.3

Oracle MFT provides the easiest way to do a file transfer which needs encryption and compression of multiple files. The following diagram will explain how to achieve this - 




Flow 1 – Decrypt and Unzip the source file into a temporary location -
1.       Have PGP key installed in MFT server needed to be decrypted
2.       Create Source, In Advanced Properties Specify Regular Expression as (?i)\b(INCOMING.*zip.pgp) if the file format is INCOMING.zip.pgp
3.       Create Target with Temp folder location. Temp folder location is the place where the file will get unzipped.
4.       Create MFT transfer and keep the following –










Flow 2 – Move the unzipped files to the vendor location
1.       The incoming zip format should always be the same.
2.       Create Source with the same location as Flow 1, Step 3
3.       Create target with Vendor location.
4.       Create transfer with above created Source and Target


Tuesday, February 11, 2020

Create Service Now ticket using OSB 12C


Service Now is a SAS service to support IT Service Management for Helpdesk and workflows. This post will help you create a Service Now incident using OSB using Email. I am using JDEV Studio Edition Version 12.2.1.1.0 for the post.

1.       Step1: Create a Business Service in OSB. Set Transport as ‘email’
a.       Service Type: Any XML
b.       Provide your email to the Endpoint URI (this will be overwritten later)
c.       Once saved, Provide SMTP server to the Email Transport Configuration.

2.       Create a WSDL from the below schema-
<xsd:sequence>
            <element name="to" type="string" minOccurs="1"/>
            <element name="subject" type="string" minOccurs="1"/>
            <element name="from" type="string" minOccurs="1"/>
            <element name="body" type="string" minOccurs="1"/>
            <element name="type" type="string" minOccurs="1"/>
            <element name="cc" type="string" minOccurs="0" nillable="true"/>
            <element name="name" type="string" minOccurs="0" nillable="true"/>
            <element name="content" type="base64Binary" minOccurs="0" nillable="true"/>
   </xsd:sequence>

3.       Create a Proxy using the created WSDL. In the route node call the Business Service created in Step 1. Update the transport headers.


4.       Insert into the attachment, if an attachment is needed to be passed -
<con:attachment xmlns:con="http://www.bea.com/wli/sb/context">
<con:Content-Type>{$body/sen:sendEmailRequest//*[local-name()='type']/text()}</con:Content-Type>
<con:Content-Transfer-Encoding>base64</con:Content-Transfer-Encoding>
<con:body>{$decodedContent}</con:body>
</con:attachment>

5.       Finally changes with respect to service now. Verify with Service Now team the email format and the parameters that needs to be sent to have a Service Now ticket created. You can use the below concat to format the request going to Business Service and this will create ticket using the Email API of Service Now.

//constructing the email. needs to be in this order
concat('^',  $ticket.group   ,
fn:codepoints-to-string(10)  ,
'^',  $ticket.userId     ,
fn:codepoints-to-string(10),
'^',  $ticket.impact    ,
 fn:codepoints-to-string(10),
 '^',  $ticket.affectedci    ,
 fn:codepoints-to-string(10),
 '^',  $ticket.area     ,
 fn:codepoints-to-string(10),
 '^',  $ticket.subarea    ,
 fn:codepoints-to-string(10),
 '^',  $ticket.urgency     ,
 fn:codepoints-to-string(10),
 '^',  $ticket.operatorId     ,
 fn:codepoints-to-string(10),
 '^',  'incident'    ,
 fn:codepoints-to-string(10),
 '^' , $ticket.nonci,
 '^', + $ticket.title  ,
  fn:codepoints-to-string(10), '^',   $ticket.description ,
 fn:codepoints-to-string(10)  )

FBDI Introduction

FBDI  stands for File Based Data Import. It is a pattern provided by Oracle to have the data loaded into Oracle ERP Cloud. Its usually u...