Tuesday, October 30, 2012

Monday, July 30, 2012

sample OSM 7.0.3 process and sub-process

here is the sample OSM 7.0.3 process and sub-process example




and sub-process example of above process select product.




send message to JMS Queue


Below is the class to send the message to the JMS Queue.

import java.util.Hashtable;
import javax.naming.*;
import javax.jms.*;

public class JMSSender {
   private static InitialContext ctx = null;
   private static QueueConnectionFactory qcf = null;
   private static QueueConnection qc = null;
   private static QueueSession qsess = null;
   private static Queue q = null;
   private static QueueSender qsndr = null;
   private static TextMessage message = null;
   // NOTE: The next two lines set the name of the Queue Connection Factory
   //       and the Queue that we want to use.
   private static final String QCF_NAME = "your connection factory";
   private static final String QUEUE_NAME = "your queue";
   public JMSSender() {
       super();
   }
   public static void sendMessage(String messageText) {
       // create InitialContext
       Hashtable properties = new Hashtable();
       properties.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
       // NOTE: The port number of the server is provided in the next line,
       //       followed by the userid and password on the next two lines.
       properties.put(Context.PROVIDER_URL, "t3://localhost:7001/");
       //properties.put(Context.SECURITY_PRINCIPAL, "weblogic");
       //properties.put(Context.SECURITY_CREDENTIALS, "weblogic password");
       try {
     
           ctx = new InitialContext(properties);
         
       } catch (NamingException ne) {
           ne.printStackTrace(System.err);
           System.exit(0);
       }
       System.out.println("Got InitialContext " + ctx.toString());
       // create QueueConnectionFactory
       try {
           qcf = (QueueConnectionFactory)ctx.lookup(QCF_NAME);
       }
       catch (NamingException ne) {
           ne.printStackTrace(System.err);
           System.exit(0);
       }
       System.out.println("Got QueueConnectionFactory " + qcf.toString());
       // create QueueConnection
       try {
           qc = qcf.createQueueConnection();
       }
       catch (JMSException jmse) {
           jmse.printStackTrace(System.err);
           System.exit(0);
       }
       System.out.println("Got QueueConnection " + qc.toString());
       // create QueueSession
       try {
           qsess = qc.createQueueSession(false, 0);
       }
       catch (JMSException jmse) {
           jmse.printStackTrace(System.err);
           System.exit(0);
       }
       System.out.println("Got QueueSession " + qsess.toString());
       // lookup Queue
       try {
           q = (Queue) ctx.lookup(QUEUE_NAME);
       }
       catch (NamingException ne) {
           ne.printStackTrace(System.err);
           System.exit(0);
       }
       System.out.println("Got Queue " + q.toString());
       // create QueueSender
       try {
           qsndr = qsess.createSender(q);
       }
       catch (JMSException jmse) {
           jmse.printStackTrace(System.err);
           System.exit(0);
       }
       System.out.println("Got QueueSender " + qsndr.toString());
       // create TextMessage
       try {
           message = qsess.createTextMessage("test");
       }
       catch (JMSException jmse) {
           jmse.printStackTrace(System.err);
           System.exit(0);
       }
       System.out.println("Got TextMessage " + message.toString());
       // set message text in TextMessage
       /*
       try {
           message.setText(messageText);
       }
       catch (JMSException jmse) {
           jmse.printStackTrace(System.err);
           System.exit(0);
       }
       */
       System.out.println("Set text in TextMessage " + message.toString());
       // send message
       try {
           qsndr.send(message);
       }
       catch (JMSException jmse) {
           jmse.printStackTrace(System.err);
           System.exit(0);
       }
       System.out.println("Sent message ");
       // clean up
       try {
           message = null;
           qsndr.close();
           qsndr = null;
           q = null;
           qsess.close();
           qsess = null;
           qc.close();
           qc = null;
           qcf = null;
           ctx = null;
       }
       catch (JMSException jmse) {
           jmse.printStackTrace(System.err);
       }
       System.out.println("Cleaned up and done.");
   }
   public static void main(String args[]) {
       sendMessage("your message");
   }
}


kosal01bhati@gmail.com

Monday, June 11, 2012

Oracle OSM Installation

What all things required for the setup of oracle OSM.

Operating system - Sun Solaris, HP Itanium, HP PA_RISC, IBM AIX, Windows XP 
OSM Administrato(software available)
Design Studio(API package)
Oracle Database
Weblogic Server

Dependecy of the above softwares


Component
Description
Software Dependency
Server Operating System
OSM supports multiple operating systems.
Sun Solaris, HP Itanium, HP PA_RISC, IBM AIX, Windows XP
OSM Administrator
A GUI-based application to define the processes and data used by OSM. One can also configure other aspects of the system, such as notifications and user workgroups. The Administrator also includes a Database Viewer to create SQL statements that can be used in a third-party reporting tool.
Windows, Oracle Client
Design Studio
A next generation, open source based, configuration tool for users to view, build, configure & deploy Fulfilment and Provisioning cartridges. Design Studio can be used with Oracle Activation and Inventory Management applications
Eclipse IDE for Java Development, Windows XP, Java
Web Client
A GUI-based application that enables users to create, view, edit, track, and report on orders in OSM using a web browser. The Web Client is accessible via the Internet or Intranet.
Internet Explorer, SVG Viewer
Oracle Database
The relational database management system used to store all data.
Oracle Database Standard Edition or Enterprise Edition, Net Client, OCI Client, Thin JDBC Driver from Oracle Windows Interface Component
OSM Server
Provides primary database services to the OSM application. The server implements guaranteed message delivery, processing, and response.
JDK, Saxon, JBoss, Oracle Weblogic server, Oracle RDBMS, Apache, Oracle XML Parser, Werken Jaxen, Jboss cache, Saxonica Saxon
OSM SDK
XML Import/Export Tool enables to import and export metadata (definitions for processes, tasks, states, statuses, rules, and orders). It also allows to add separate configurations into a single environment and update these entities.
Log4j_x.jar (Apache),


Configuration
Management Tool
Configuration Management Tool
Ant (for the scripts to run)
OSM ModelDoc
OSM ModelDoc tool generates HTML documentation of the OSM metadata. ModelDoc uses Graphviz to render SVG views of process definitions.
Graphviz
OSM Reporting Module
The OSM Reporting Interface component uses a query and reporting tool to provide a standard interface to OSM order and audit data.
OSM application, Ant, Java and Oracle Client