Page 1 of 1

How to Integrate Openkm with oracle EBS ??

PostPosted:Wed May 23, 2018 10:44 am
by saleem55
Dears

I have a requirement of integrating OpenKm with oracle EBS 12.2 .
we need a way to upload files directly from ORACLE EBS forms or web to OpwnKM


thanks
Saleem

Re: How to Integrate Openkm with oracle EBS ??

PostPosted:Thu May 24, 2018 7:33 am
by jllort
I ignore the possibilities of integration what offers EBS

The best option for integrating with any application is from their API ( if they have exposed ). With a quick Google search I found it what might help you https://blogs.oracle.com/stevenchan/a-p ... t-services ( seems you can create your own REST services, I ignore if you have existing ones ? ). Seems also exist SOAP webservice.

The idea will be from OpenKM make calls to EBS webservices or reverse. Might be another integration mechanism, like the file system where to store CSV + files what might be daily processed in both sides, etc.

Re: How to Integrate Openkm with oracle EBS ??

PostPosted:Wed Aug 15, 2018 9:22 pm
by saleem55
I just finished, integration between okm and EBS by
Using fnd_webattch.add_attachment .
The challenge is we need to setup the the customized application to all oracle forum which requires attachment
Thanks
Saleem

Re: How to Integrate Openkm with oracle EBS ??

PostPosted:Thu Aug 16, 2018 11:50 am
by jllort
Hi Saleem

Seems fnd_webattch.add_attachment is an Oracle function? correct me if I'm wrong.

If you have more detailed information about it, we can share with other community users for future adventures on it. Also if you consider is interesting some sample or similar might be added in our github.com/openkm repository.

Re: How to Integrate Openkm with oracle EBS ??

PostPosted:Thu Aug 16, 2018 4:04 pm
by saleem55
Hi jllort ,
I divided the integration into 3 parts to make it fast integration.
the first part i design a custom applet (uploadtookm.jar) which contain a web start (.jlnp) ,this applet can be called from the we server.
uploadtookm.jar will contain jtree and JFileChooser,the jtree can be connected to the okm to select the uploading destination by using ftp or web drive (webdav) i userd (web drive)
the JFileChooser will select the needed document from the local disk which will be uploaded to openkm by using OKMWebservices class.
Image

OKMWebservices ws = OKMWebservicesFactory.newInstance(host, username, password);

InputStream is;
CallableStatement callableStatement = null;
Connection conn = null;
try {
is = new FileInputStream(getuploadtxt.getText());
outputpath=lblup.getText();

com.openkm.sdk4j.bean.Document doc = new Document();

System.out.println("Uploading to openkm........");
System.out.println(outputpath);
doc.setPath(outputpath );
ws.createDocument(doc, is);

IOUtils.closeQuietly(is);
System.out.println("success out from okm");
System.out.println( (outputpath));
System.out.println( ws.getNodeUuid(outputpath));
URL="http://localhost:8080/OpenKM/index.jsp? ... utputpath);

The second part from the oracle forum i used the penalization to setup the passed arguments which will be used in the applet as input:

http://localhost:8080/uploadtookm/dist/ ... ser_id=xxx
Image
The third part i called oracle stored stored procedure from the applet to input UUID of the okm document


DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
conn = DriverManager.getConnection("jdbc:oracle:thin:@192.xxx.xxx.xxx:1521:EBSdatabase "apps", "xxxxxx");
conn.setAutoCommit(false);
String sql = "{call XXDPC_UPLOADTOOKM("+v_category_id+",'"+URL+"',"+pk1+",'"+entity+"',"+v_user_id+")}"; //passed value from part 2
System.out.print(sql);
callableStatement = conn.prepareCall(sql);
System.out.println("Uploaded to ERP success out ");

XXDPC_UPLOADTOOKM is a stored procedure which will call fnd_webattch.add_attachment


this is in very short explanation

thanks

Saleem

Re: How to Integrate Openkm with oracle EBS ??

PostPosted:Fri Aug 17, 2018 2:53 pm
by jllort
If you want to call the Oracle procedure each time a document is uploaded a suggest link it with Automation -> https://docs.openkm.com/kcenter/view/ok ... ction.html ( This documentation section will be updated in the new release because we have introduced plugin architecture in the Automation for making more easy the implementation -> if you take a look in the current code https://github.com/openkm/document-mana ... yword.java you will see a new tag named @PluginImplementation for it ).

About applets as you know this is a deprecated architecture, in the community version we have removed it an still not replaced by JAVA Web Starter ( .jlnp ) and Websockets technology what is the right combination to replace old applets. Is not an easy integration, that's why we only have done in the professional version and we still have pending move to the community. If you decide to go for it, consider only it works from Tomcat 7.0.61, with older version you will waste a lot of time until discover that is not supported.