Showing posts with label oracle fusion middleware. Show all posts
Showing posts with label oracle fusion middleware. Show all posts

Thursday, November 14, 2019

Inventory Inquiry in Oracle Order Management Cloud OMS - CWInventoryInquiry


Inventory Inquiry in Oracle OMS :
Asynchronous.

We were initially struggling on how to fetch the inventory details for an Item from Oracle OMS Cloud.

Here are some helping steps which you can follow if you have similar requirement.

Step 1 : 

Ref :
https://docs.oracle.com/cd/E69185_01/cwdirect/pdf/180/cwdirect_user_reference/ST01_09.htm#Rfg42874

Inventory Inquiry API Setup Requirements
To use the inventory inquiry API, you need to configure the INV_INQURY process in Working with Integration Layer Processes (IJCT), and have the external system send a correctly formatted Inventory Inquiry Request XML Message (CWInventoryInquiry) to a queue specified for the job. Similarly, the external system must be prepared to receive the response described under Inventory Inquiry Response XML Message (CWInventoryInquiryResponse). Typically, you would use CWIntegrate to generate the request message and translate the response message.

Login to OMS :

Grant Acces to your user :

Fast Path : WWSA





Click on Authentication : 




Add your user here !

Ref : https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-state=g9uip4sox_4&_afrLoop=475460742941022#FIX

Next :

Fast Path : IJCT   -> Hit enter


Step 2 :

Search for INV_INQURY




Change and set it up as :


Click on more -> Work with Queues.



Create





Set It up as :


Step 3 :

Now as everything is set up in OMS we need to work on the API :

API :  CWMessageIn

URL : https://<serverl_URL>/SerenadeSeam/sxrs/SerenadeREST/CWMessageIn

Make sure the Target here is the Inbound Job Name

Body :

<Message source="CWIntegrate" target="INV_INQUR2" type="CWINVENTORYINQUIRY" > <InventoryInquiry company="51" item_number="AB1001" /> </Message>

Authorization : Basic




Step 4 :

URL : https://<server_URL>/SerenadeSeam/sxrs/jms/getFromQueue

Body :

{ "queueName": "INV_INQURY_OUT" }

Authorization : Basic

Here Queue name is the Outbound queue that is mentioned while setting up in IJCT.




You have the XML response in the message section of the JSON !!

Wednesday, March 6, 2019

Using WAIT/Delay/Sleep in OSB Code


Using WAIT/Delay/Sleep in OSB Code


In Oracle Service Bus 12C, wait activity is not supported by and hence we will be using a piece of java code , which will be basically make the thread to sleep for certain milliseconds passed to the method.


Step 1 :- Download the JAR




Piece of Java Callout : 
********************
Will attach the link to the JAR file that you need to import in your Jdev / Please comment in case you need it.
********************

package threadsleep;

public class Threadsleep {
    
    public static String  sleepthreadmilis(int timer){
        try{
            Thread.sleep(timer);
        }
        catch(InterruptedException ex)
        {
            Thread.currentThread().interrupt();
        }
    return "Success";
    }

public static void main(String args[]) {
    String a="Call the method for testing";
    
       a=sleepthreadmilis(2000);
   System.out.println(a)  ;
    
}
}

Step 2 : Import the JAR

Now i will be using it in my OSB project using java callout.

Copy and paste the JAR file in any of your project folder.



Step 3 : Refresh the Artifacts in Jdeveloper :





Step 4 : Add Java callout activity in the pipeline.






**Have upload new jar (earlier it was threadsleepjar now it is archive1 )




Step 5 : Choose the Jar File 






Step 6 - Choose the Method 





Step 7 - Set the Parameters : 

Arguments int : set the delay time in milliseconds - here we are using 2 mins -> 120000 ms








Oracle OIC Email Notification Template

 Oracle HTML template for email notification <html> <body style="margin: 0px; background-color: rgb(226, 229, 232);"> ...