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 !!

Tuesday, October 22, 2019

Oracle RMS Customer Order Fulfilment API


Creating Customer Order Fulfillment in Oracle Retail Merchandising Cloud (RMS)


Oracle has exposed SOAP Web Service to Create an order fulfillment in RMS :

URL : https://<<YOUR_SERVER_URL>>/FulfillOrderBean/FulfillOrderService?wsdl





Sample Payload Request :

    <v1:createFulfilOrdColDesc>
         <!--Optional:-->
         <FulfilOrdColDesc xsi:schemaLocation="http://www.oracle.com/retail/integration/base/bo/FulfilOrdColDesc/v1 http://www.oracle.com/retail/integration/base/bo/FulfilOrdColDesc/v1/FulfilOrdColDesc.xsd " xmlns="http://www.oracle.com/retail/integration/base/bo/FulfilOrdColDesc/v1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <collection_size>4</collection_size>
            <ns1:FulfilOrdDesc xmlns:ns1="http://www.oracle.com/retail/integration/base/bo/FulfilOrdDesc/v1">
               <ns1:consumer_delivery_date>2013-09-01T09:08:07</ns1:consumer_delivery_date>
               <ns1:customer_order_no>13</ns1:customer_order_no>
               <ns1:fulfill_order_no>13</ns1:fulfill_order_no>
               <ns1:source_loc_type>WH</ns1:source_loc_type>
               <ns1:source_loc_id>99990</ns1:source_loc_id>
               <ns1:fulfill_loc_type>S</ns1:fulfill_loc_type>
               <ns1:fulfill_loc_id>17</ns1:fulfill_loc_id>
               <ns1:partial_delivery_ind>N</ns1:partial_delivery_ind>
               <ns1:delivery_type>S</ns1:delivery_type>
               <ns1:delivery_charges>20.4</ns1:delivery_charges>
               <ns1:delivery_charges_curr>USD</ns1:delivery_charges_curr>
               <ns1:comments>Test</ns1:comments>
               <ns2:FulfilOrdCustDesc xmlns:ns2="http://www.oracle.com/retail/integration/base/bo/FulfilOrdCustDesc/v1">
                  <ns2:customer_no>55006</ns2:customer_no>
                  <ns2:deliver_first_name>Andrewq</ns2:deliver_first_name>
                  <ns2:deliver_last_name>Josephq</ns2:deliver_last_name>
                  <ns2:deliver_add1>High Street</ns2:deliver_add1>
                  <ns2:deliver_city>Ontario</ns2:deliver_city>
                  <ns2:deliver_state>LA</ns2:deliver_state>
                  <ns2:deliver_country_id>US</ns2:deliver_country_id>
                  <ns2:deliver_phone>23112</ns2:deliver_phone>
                  <ns2:bill_first_name>Andrew</ns2:bill_first_name>
                  <ns2:bill_last_name>Joseph</ns2:bill_last_name>
                  <ns2:bill_add1>High street</ns2:bill_add1>
                  <ns2:bill_city>Ontario</ns2:bill_city>
                  <ns2:bill_state>NY</ns2:bill_state>
                  <ns2:bill_country_id>US</ns2:bill_country_id>
               </ns2:FulfilOrdCustDesc>
               <ns8:FulfilOrdDtl xmlns:ns8="http://www.oracle.com/retail/integration/base/bo/FulfilOrdDtl/v1">
                  <ns8:item>18CHAMOMILE</ns8:item>
                  <ns8:ref_item/>
                  <ns8:order_qty_suom>20</ns8:order_qty_suom>
                  <ns8:standard_uom>EA</ns8:standard_uom>
                  <ns8:transaction_uom>EA</ns8:transaction_uom>
                  <ns8:substitute_ind>N</ns8:substitute_ind>
                  <ns8:unit_retail>20.4</ns8:unit_retail>
                  <ns8:retail_curr>CAD</ns8:retail_curr>
                  <ns8:comments>testing</ns8:comments>
               </ns8:FulfilOrdDtl>
            </ns1:FulfilOrdDesc>
         </FulfilOrdColDesc>
      </v1:createFulfilOrdColDesc>



Response :

  <ns1:createFulfilOrdColDescResponse xmlns:ns1="http://www.oracle.com/retail/rms/integration/services/FulfillOrderService/v1" xmlns:ns16="http://www.oracle.com/retail/integration/base/bo/FulfilOrdCfmCol/v1" xmlns:ns6="http://www.oracle.com/retail/integration/base/bo/FulfilOrdColDesc/v1" xmlns:ns2="http://www.oracle.com/retail/integration/base/bo/FulfilOrdColRef/v1" xmlns:ns5="http://www.oracle.com/retail/integration/base/bo/InvocationSuccess/v1" xmlns:ns17="http://www.oracle.com/retail/integration/base/bo/FulfilOrdCfmDesc/v1" xmlns:ns18="http://www.oracle.com/retail/integration/base/bo/FulfilOrdCfmDtl/v1" xmlns:ns7="http://www.oracle.com/retail/integration/base/bo/FulfilOrdDesc/v1" xmlns:ns8="http://www.oracle.com/retail/integration/base/bo/CustFlexAttriVo/v1" xmlns:ns9="http://www.oracle.com/retail/integration/base/bo/FulfilOrdCustDesc/v1" xmlns:ns10="http://www.oracle.com/retail/integration/base/bo/LocOfFulfilOrdCustDesc/v1" xmlns:ns11="http://www.oracle.com/retail/integration/localization/bo/BrFulfilOrdCustDesc/v1" xmlns:ns12="http://www.oracle.com/retail/integration/localization/bo/BrFulfilOrdPmtDesc/v1" xmlns:ns13="http://www.oracle.com/retail/integration/custom/bo/EOfBrFulfilOrdPmtDesc/v1" xmlns:ns14="http://www.oracle.com/retail/integration/custom/bo/EOfBrFulfilOrdCustDesc/v1" xmlns:ns15="http://www.oracle.com/retail/integration/base/bo/FulfilOrdDtl/v1" xmlns:ns3="http://www.oracle.com/retail/integration/base/bo/FulfilOrdRef/v1" xmlns:ns4="http://www.oracle.com/retail/integration/base/bo/FulfilOrdDtlRef/v1">
         <ns16:FulfilOrdCfmCol>
            <ns16:collection_size>1</ns16:collection_size>
            <ns17:FulfilOrdCfmDesc>
               <ns17:customer_order_no>13</ns17:customer_order_no>
               <ns17:fulfill_order_no>13</ns17:fulfill_order_no>
               <ns17:confirm_type>C</ns17:confirm_type>
               <ns17:confirm_no>100000015005</ns17:confirm_no>
               <ns18:FulfilOrdCfmDtl>
                  <ns18:item>18CHAMOMILE</ns18:item>
                  <ns18:confirm_qty>20</ns18:confirm_qty>
                  <ns18:confirm_qty_uom>EA</ns18:confirm_qty_uom>
               </ns18:FulfilOrdCfmDtl>
               <ns17:fulfill_loc_id>17</ns17:fulfill_loc_id>
               <ns17:system_cd>MRCH-COMP</ns17:system_cd>
            </ns17:FulfilOrdCfmDesc>
         </ns16:FulfilOrdCfmCol>
      </ns1:createFulfilOrdColDescResponse>


For Validation you can check in following tables :

Tables :

select * from tsfhead where tsf_no='100000015005'; 
select * from tsfdetail where tsf_no='100000015005';

select * from ORDCUST_DETAIL order by CREATE_DATETIME desc ;          






****************************************************************************

Friday, July 5, 2019

HP M1136 Printer Driver


Hi All,

I faced an  issue while installing M1136 HP MFP in Windows 10, while on executing the exe, there was nothing happening further .

Found a way around by extracting the exe file and running the setup directly.

Step 1:

Download the file from here :
https://mega.nz/#!xVJCmCYR!NYEe_9bx-swLF1AKSifezU_h6K1zgI3JHDEelyKr6kw


Step 2: Unzip the file (its in 7zip format, you can download 7zip from
https://www.7-zip.org/download.html)

Step 3:



Run the exe highlighted and follow the steps further in the installation.

Done !

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








Saturday, February 23, 2019

Deploying Angular app to Weblogic 12c server

Angular  apps can be deployed in Weblogic server as well .

My use case was to use weblogic server for hosting the angular app as pet the need of my organisation.

Prerequisite :


  • Weblogic Server
  • Angular application
  • WEB-INF Files

Step 1: Create an angular application (here i have named it as angularapp1)



After you create you will see these files on the path :




Step 2 : Build your angular application with production mode .





 After build you would see dist folder which contains the files for production !




Step 3 : Create a WEB-INF Folder and create two files in it .




web.xml :


<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
    <display-name>Portal</display-name>
    <welcome-file-list>
        <welcome-file>index.html</welcome-file>
    </welcome-file-list>
</web-app>

<!-- This should be your  file which you will be referred to index.html on angular application -->


weblogic.xml


<?xml version="1.0" encoding="UTF-8"?>
<weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/weblogic-web-app">
 <context-root>/</context-root>
</weblogic-web-app>


<!-- This contains the home / root path  -->



 


Step 4 : Once we are ready with the files , transfer the production folder to target server where you want to deploy, here i have started local weblogic server , hence i dont need to move the files.


Step 5 : Open weblogic console . -> Deployments -> Install -> Select the folder which contain the WEB-INF folder  and index.html which gets generated by angular application.







Step 6: Save the configuration as shown in the screen shot.






Step 7 : Now since it is deployed , we need to start serving app. go to -> Control-> Select your app -> Servicing all requests






Step 8 :

Go to Testing-> Default and try hitting the URL generated .


We are able to route to the angular application with the server URL now !!


In my example i am using (if no path specified route to the AppComponent), you can add paths and routes , which should work fine !




Code : https://github.com/sauvik8/sauvik-public/blob/master/angularapp1.zip

Let me know in case you need the files ! will upload in drive and share !

Accessing JMS Queue targeted in OSB Cluster from SOA Cluster (BPEL)


Accessing JMS Queue targeted in OSB Cluster from SOA Cluster (BPEL)


I had a use case where in weblogic server, JMS Queues were targeted to OSB cluster and we were not able to access the queues from SOA (BPEL) integration with the connection factory in between.

I found a way around which will help our BPEL service to subscribe a JMS Queue even if it is not targeted to SOA Cluster.


- > Just add the connection factory JNDi in JMS Adapter that it !

Oracle OIC Email Notification Template

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