Showing posts with label MetaSolv. Show all posts
Showing posts with label MetaSolv. Show all posts

Sunday, August 16, 2020

Determine Metasolv Rules and Behaviors executed on a Metasolv Order

PROBLEM


In Oracle MetaSolv (M6) Rules and Behaviors function is one of the 'out of the box' way to control and manage business rules for a client. However, sometimes its really required to understand which Rules and Behaviors are associated with a specific order at certain process points like while assigning a Provisioning Plan. During one of the testing for one of our key projects, we encountered a problem where a Rule was deleting a task on a new order for a customer and when the scenario for a change order flowed from upstream M6 encountered with Oracle Metasolv API errors.


Caused by: com.metasolv.common.MSLVXMLApiException: Exception Thrown Supplementing Order 19368***.
Message: null
........98 more
Caused by: java.lang.NullPointerException
at com.mslv.core.api.external.WM.processData.PopulateGatewayEvent.insertGWEvent(PopulateGatewayEvent.java:466)
at com.mslv.core.api.external.WM.processData.PopulateGatewayEvent.insertInfo(PopulateGatewayEvent.java:420)
at com.mslv.core.api.external.WM.processData.SaveTaskLogic.saveTasksExisting(SaveTaskLogic.java:253)
at com.mslv.core.api.external.WM.processData.TaskMaintainLogic.runRules(TaskMaintainLogic.java:118)
at com.metasolv.impl.logic.order.OrderBusObj.runRules(OrderBusObj.java:678)
at com.metasolv.impl.logic.order.OrderBusObj.processSupp(OrderBusObj.java:286)
at com.metasolv.impl.logic.order.OrderBusObj.processSupp(OrderBusObj.java:234)
at com.metasolv.impl.logic.order.OrderBusObj.processSupp(OrderBusObj.java:177)
at com.metasolv.ejb.order.PSROrderManagerEJB.processSuppOrder(PSROrderManagerEJB.java:334)



CAUSE


During troubleshooting, we figured it was rules and behaviors that were causing this problem. 
The Metasolv supplement API is reading the GATEWAY_EVENT_PLAN_TASK table for PLAN_ID and was trying to insert the gateway events for a certain task 'XYZ' which was deleted while assigning provisioning plan due to a new rule and behavior that we added. 

This is a bug in M6.2.1b1226 and needs Oracle Patch.

In such scenarios to find out the right rules and behaviors is a critical step in order to fix the issue.

The ASAP.SP_RULES procedure is leveraged to identify the Rules and Behaviors at the time of Provisioning Plans assignment to M6 order.

SOLUTION


1. Connect to Metasolv DB using any DB software tool and be ready with Metasolv Order Number

2. Based on the document Number find out the provisioning plan id.


select PLAN_ID from svcreq_provplan where document_number=”M6 Order Number”

3.  Use the M6 Order Number from step 1 as DOC_NUM and PLAN_ID from step 2 as PROV_PLAN_ID in the following PLSQL block. For PROCESS_POINT use 1 for the ‘Task Generation’ process and execute the block.


declare
  doc_num number;
  prov_plan_id number;
  process_point number;
  event_output varchar2(200);
  result number;
  error_text varchar2(200);

begin

  doc_num := “m6 order number”;
  prov_plan_id := “plan_id”;
  process_point := 1;
  asap.sp_rules ( doc_num, prov_plan_id, process_point, event_output, result, error_text );
  dbms_output.put_line( event_output);
  commit;
end;

4. The e_process_point_type table contains the definitions for the various process points MetaSolv supports. 
Process point 1 will be triggered as noted in the table at "Task Generation" and for "Initial provisioning plan assignment to a service request" and process point 121 Process Supplement and 122 Proc Supp and Task Generation.

5.  In the DBMS OUTPUT, you may notice the string as below. Below one is a sample of how the output would look like.


      214^*232^*360^*370^*404^*428^*440^*4540



6.  Use all the event Ids (214,232,360,370,404,428,440,454) from output of step 4 in event table to query about rules.


select  asap.event.event_name as "Rule",
asap.event.event_description as "Description",
asap.event.rule_active_ind
from    asap.event
where   asap.event.rule_active_ind='Y'
and     asap.event.event_id in (?)
order by asap.event.event_name;

Hope this article helps you find out the rules triggered for the M6 order and helps in further debugging. Please leave your feedback or query.

Sunday, May 15, 2016

Metasolv Service Requests PSR, LSR, ASR, ISR explained

Service Requests in Metasolv


Before proceeding with Service Requests quickly understand LATA, LEC and IXC.


LATA(Local Access Transport Area)


A Local Access Transport Area (LATA) is a geographic area served by particular operating companies.
An IntraLATA call is a call made within a LATA.
An InterLATA call is a call made from one LATA to another


LECS AND IXCS

The local phone companies or Local Exchange Carriers (LECs) provide IntraLATA services.
The long distance phone companies or Interexchange Carriers (IXCs) provide InterLATA services.
Refer diagram above.

Now coming back to Service Requests.
Service Requests are the orders that a company receives for products or services. If a company needs a circuit, the company must use a service request to order it. If a company needs a piece of equipment, again it must submit a service request to order it.

Metasolv has following 4 types of service requests

  1. Product Service Request (PSR)
  2. Local Service Request (LSR)
  3. Access Service Request (ASR)
  4. Internal Service Request (ISR)

     Lets have a look at each one of them.

PRODUCT SERVICE REQUEST (PSR)


A product service request (PSR) supports requests for products from end users.
Some examples of products ordered include:

Basic residential service
Dedicated lines
ISDN Basic Rate Interface (BRI)

End users place orders with their providers.


In the above example, 'Customer A' needs a private line to the 'Customer C'. Since both companies use the same local service provider, this scenario requires only one order.
CLEC receives the PSR for a dedicated line between 'Customer A' and 'Customer C'.


LOCAL SERVICE REQUEST(LSR)



A local service request (LSR) handles requests from local service providers for unbundled elements or resale services from the ILECs(Incumbent Local Exchange Carriers).
LSRs and Access Service Request (ASRs) are the two types of orders that are regulated. A regulated
order has to pass standards set by the Ordering and Billing Forum (OBF), which was created to
standardize orders so that all companies utilize the same elements when they submit a service request.


In this example, CLEC Telecom, a new local service provider, wants to provide local service to the XYZ area, which is currently being served by ABC-ILEC.
Before providing service to its end user customers, CLEC Telecom must purchase access to local loops and network interface devices.
The CLEC will attain all the unbundled elements. To accomplish this, it must send an LSR to the ILEC for the purchase of the unbundled elements in the XYZ area.

PURPOSE OF AN LSR


You can use a local service request to order any of the following:
Local loop
Network Interface Device (NID)
Signaling and call-related database
Local and tandem switch access
Operator and directory assistance



ACCESS SERVICE REQUEST(ASR)


An access service request (ASR) is an order for terminating an access connection to a telephony network.

There are two main types of ASRs:
Special Access ASR—For dedicated line telephone network entities (end user to ACTL or CO).
Switched Access ASR—For trunks between network locations, ACTLs, Tandems, and COs.


SWITCHED ACCESS ASR

In the following example, a new LSP (CLEC Telecom) will begin serving customers in the area currently being served by ABC-ILEC.

Before providing local service, CLEC Telecom must complete the ASR for trunks connecting the switching equipment between the two LECs.


In the above example of a Switched Access ASR, an IXC called New IXC wants to sell long distance services to customers being served by CLEC Telecom.
First, New IXC must complete a switched access ASR for trunks between New IXC and CLEC Telecom.

SPECIAL ACCESS ASR

Parent/Child Relationship

A special access ASR is an order for dedicated line telephone network entities such as end user to
ACTLs or COs.


In this example, CustomerA orders a dedicated 56K line to the CustomerB in location B.
Since the two locations are not in the same LATA, the PSR for the private line generates two child
orders:

  • One ASR to CLEC A for special access from CustomerA location to CLEC A ACTL(CO) in location A.
  • Another ASR for special access to CLEC B from CustomerB's location to the CLEC B ACTL(CO).




INTERNAL SERVICE REQUEST


An internal service request (ISR) is simply that, an internal (within your own company) service
request. An ISR is the fastest and easiest order that you can place in the MetaSolv Solution.


Because ISRs are not validated against OBF guidelines, the MetaSolv Solution order-entry process for ISRs is very flexible. ISRs are often submitted as child orders to parent ASRs or PSRs.
Companies create ISRs to document inventory and to provision their own circuits. They use ISRs to
communicate to field personnel which equipment to assign to a circuit.
Also, some companies use ISRs as a standard to build all facility circuits.
Here are the types of circuits associated with an ISR:
Facility circuits
Trunks
Special (for non-ordered circuits that are not facility circuits)
Broadband (for ATM or frame relay, each of which require a facility circuit)

I hope I was able to explain the Metasolv Service Requests, please leave your feedback or query.

Monday, November 2, 2015

Applications showing warning due to MessageBufferBean and MessageBufferTopicBean while migrating projects from WebLogic 8.1 to 10.3

PROBLEM

While deploying WebLogic applications to cluster, the following warning messages are displayed in server logs.

<Jun 9, 2015 3:37:43 PM EDT> <Error> <Deployer> <BEA-149202> <Encountered an exception while attempting to commit the 1 task for the application 'cluster-nur'.>
<Jun 9, 2015 3:43:42 PM EDT> <Warning> <EJB> <BEA-010061> <The Message-Driven EJB: MessageBufferTopicBean is unable to connect to the JMS destination: weblogic.test1.WlwRuntimeAppScopedJMS#MSG_B
UFFER_TOPIC. The Error was:
Can not get distribute destination information. The destination JNDI name is weblogic.test1.WlwRuntimeAppScopedJMS#MSG_BUFFER_TOPIC, the provider URL is null>
<Jun 9, 2015 3:43:42 PM EDT> <Warning> <EJB> <BEA-010061> <The Message-Driven EJB: MessageBufferBean is unable to connect to the JMS destination: weblogic.test1.WlwRuntimeAppScopedJMS#MSG_BUFFER
_QUEUE. The Error was:
Can not get distribute destination information. The destination JNDI name is weblogic.test1.WlwRuntimeAppScopedJMS#MSG_BUFFER_QUEUE, the provider URL is null>

Also the applications display Warning in console, to confirm the reason for warning go to click on application and go to monitoring tab as below.




CAUSE 

weblogic-application.xml  in the WebLogic applications has a reference to the library weblogic-controls-10.0. Because of which we get a additional MDBs from a jar file in this library (weblogic-
messagebuffer-mdb) that listen on a specific application-scoped queue and topic and as our application does not define these queues, the WebLogic will report a warning that these MDBs could not connect to their destination.

Below is weblogic-application.xml(inside TestEar.ear\META-INF\) of a sample test application which is using weblogic-controls-10.0. See highlighted.

<?xml version="1.0" encoding="UTF-8"?>
<wls:weblogic-application xmlns:wls="http://www.bea.com/ns/weblogic/weblogic-application" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/javaee_5.xsd http://www.bea.com/ns/weblogic/weblogic-application http://www.bea.com/ns/weblogic/weblogic-application/1.0/weblogic-application.xsd">
    <!-- server-version: 10.3 -->
    <wls:ejb>
        <wls:start-mdbs-with-application>false</wls:start-mdbs-with-application>
    </wls:ejb>
    <wls:application-param>
        <wls:param-name>webapp.encoding.default</wls:param-name>
        <wls:param-value>UTF-8</wls:param-value>
    </wls:application-param>
    <wls:classloader-structure>
        <wls:classloader-structure>
            <wls:module-ref>
                <wls:module-uri>TestWeb.war</wls:module-uri>
            </wls:module-ref>
            <wls:classloader-structure>
                <wls:module-ref>
                    <wls:module-uri>TestWeb_WLI_ProjectBeans</wls:module-uri>
                </wls:module-ref>
            </wls:classloader-structure>
            <wls:classloader-structure>
                <wls:module-ref>
                    <wls:module-uri>TestWeb_WLI_ComponentBeans</wls:module-uri>
                </wls:module-ref>
            </wls:classloader-structure>
        </wls:classloader-structure>
    </wls:classloader-structure>
    <wls:listener>
        <wls:listener-class>com.bea.wli.management.WLIAppListener</wls:listener-class>
    </wls:listener>
    <wls:library-ref>
        <wls:library-name>beehive-controls-1.0.1-10.0</wls:library-name>
        <wls:specification-version>1.0</wls:specification-version>
        <wls:exact-match>true</wls:exact-match>
    </wls:library-ref>
    <wls:library-ref>
        <wls:library-name>sb-transport-control-10.0</wls:library-name>
        <wls:specification-version>10.0</wls:specification-version>
        <wls:exact-match>true</wls:exact-match>
    </wls:library-ref>
    <wls:library-ref>
        <wls:library-name>weblogic-controls-10.0</wls:library-name>
        <wls:specification-version>10.0</wls:specification-version>
        <wls:exact-match>true</wls:exact-match>
    </wls:library-ref>
    <wls:library-ref>
        <wls:library-name>wls-commonslogging-bridge</wls:library-name>
        <wls:specification-version>1.0</wls:specification-version>
        <wls:exact-match>true</wls:exact-match>
    </wls:library-ref>
</wls:weblogic-application>


These JMS destinations are created by the application when the MessageBuffer annotation is used and our applications are not using com.bea.control.annotations.MessageBuffer annotation which is why above error is thrown.  These created JMS elements are used in the following library:

-{BEA_HOME}\workshop_10.3\common\deployable-libraries\weblogic-controls-10.2.ear
-in APP-INF/lib/weblogic-controls.jar
-in weblogic-messagebuffer-mdb.jar, in META-INF, weblogic-ejb-jar.xml


where the following are noted:
WlwRuntimeAppScopedJMS#MSG_BUFFER_QUEUE
WlwRuntimeAppScopedJMS#MSG_BUFFER_TOPIC

Below is  weblogic-ejb-jar.xml of weblogic-controls-10.2.ear.See highlighted.

<?xml version="1.0" encoding="UTF-8"?>

<weblogic-ejb-jar xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.bea.com/ns/weblogic/90
    http://www.bea.com/ns/weblogic/90/weblogic-ejb-jar.xsd"
    xmlns="http://www.bea.com/ns/weblogic/90"
    xmlns:j2ee="http://java.sun.com/xml/ns/j2ee">

  <weblogic-enterprise-bean>
    <ejb-name>MessageBufferBean</ejb-name>

    <message-driven-descriptor>
      <pool>
        <initial-beans-in-free-pool>1</initial-beans-in-free-pool>
      </pool>
    </message-driven-descriptor>

    <transaction-descriptor>
        <trans-timeout-seconds>300</trans-timeout-seconds>
    </transaction-descriptor>

    <dispatch-policy>controls_buffering_mdb_execute_queue</dispatch-policy>
  </weblogic-enterprise-bean>  

  <weblogic-enterprise-bean>
    <ejb-name>MessageBufferTopicBean</ejb-name>

    <message-driven-descriptor>
      <pool>
        <initial-beans-in-free-pool>1</initial-beans-in-free-pool>
      </pool>
      <generate-unique-jms-client-id>true</generate-unique-jms-client-id>
      <durable-subscription-deletion>true</durable-subscription-deletion>
    </message-driven-descriptor>

    <transaction-descriptor>
        <trans-timeout-seconds>300</trans-timeout-seconds>
    </transaction-descriptor>

    <dispatch-policy>controls_buffering_mdb_execute_topic</dispatch-policy>
  </weblogic-enterprise-bean>  
  
  <message-destination-descriptor>
    <message-destination-name>MessageBufferInvokeQueue</message-destination-name>
    <destination-resource-link>WlwRuntimeAppScopedJMS#MSG_BUFFER_QUEUE</destination-resource-link>
  </message-destination-descriptor>
  <message-destination-descriptor>
    <message-destination-name>MessageBufferInvokeTopic</message-destination-name>
    <destination-resource-link>WlwRuntimeAppScopedJMS#MSG_BUFFER_TOPIC</destination-resource-link>
  </message-destination-descriptor>
</weblogic-ejb-jar>


Above is a known Oracle bug.


SOLUTION


Controls Message Buffering in a cluster requires submodule targeting.

If your application enables message buffering on controls use the annotation
'com.bea.control.annotations.MessageBuffer', you may have the following error when you try to deploy it on a cluster:"While attempting to create destination MSG_BUFFER_QUEUE in module
<name_of_your_ear>!WlwRuntimeAppScopedJMS the JMSServer of name <name_of_your_cluster> could not be found".


Workaround: 

In this case, you must target the MSG_BUFFER_QUEUE to a specific JMS Server with the following submoduletargets option to your weblogic.Deployer command:

-submoduletargets cgJMSServer@WlwRuntimeAppScopedJMS@WseeJmsServer_auto_1

Hope above helps in understanding the WebLogic behavior behind these warnings, please leave your feedback or query.

Sunday, October 25, 2015

Send messages to IBM WebSphere MQ from Unix server using Shell script and JAVA

A standalone shell script to send messages to MQ on an IBM WebSphere MQ server using JAVA program.

The application mostly helps in testing connectivity from Metasolv M6 server to IBM WebSphere connectivity in MQ event generators in WLI.

In order to build this utility please follow below steps.

STEP 1. 


Create a alok_tmp(choose any name) in any directory on your unix box and create src and bin folder and below files.

Folders created inside directory i.e. /opt/app/script are as below

1. alok_tmp
2. alok_tmp/src
3. alok_tmp/bin

Files created inside directory src and bin

1. alok_tmp/sendMQ.sh
2. alok_tmp/src/MQSendUtility.java
3. alok_tmp/bin/requestMessage.xml
4. alok_tmp/bin/mq.properties

Below should be directory structure.


Class file will automatically be created after each time sh file is run.

STEP 2. 


Copy below to Java file to send the messages to MQ on IBM WebSphere server. Code below is self explanatory.

File: MQSendUtility.java

/** 
* This class provides access to the MQSeries queue facilities.  Once 
*
* instantiated, the main application program need only call the 'send'
*
* method to put message on request queue. The send method returns an MQMessage. 
*
* reply queue is still kept in class as earlier it was also used to receive the reply.
*
* but now it is now utilised to send a MQ message only. 
*
* @author Alok Mishra
*
* @version 1.0
*/

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Properties;
import com.ibm.mq.MQC;
import com.ibm.mq.MQEnvironment;
import com.ibm.mq.MQException;
import com.ibm.mq.MQMessage;
import com.ibm.mq.MQPutMessageOptions;
import com.ibm.mq.MQQueue;
import com.ibm.mq.MQQueueManager; // Include the MQ package

public class MQSendUtility {
private static Properties props = new Properties();
private MQQueueManager qMgr;
private MQQueue requestQueue;
private MQQueue replyQueue;
public String replyQueueName;
private int openOptions;
private MQMessage storedMessage;

@SuppressWarnings("unchecked")
public MQSendUtility(String hostname, String channel, String qManager,
String aRequestQueue, String aReplyQueue) throws MQException {

try {
MQEnvironment.hostname = hostname;
MQEnvironment.channel = channel;
MQEnvironment.port = Integer.valueOf(props
.getProperty("mq.listen.port"));
MQEnvironment.userID = props
.getProperty("mq.server.security.principal");
MQEnvironment.password = props
.getProperty("mq.server.security.credentials");
MQEnvironment.properties.put(MQC.TRANSPORT_PROPERTY,
MQC.TRANSPORT_MQSERIES);
try {
qMgr = new MQQueueManager(qManager);
} catch (MQException e) {
print("An MQException occurred trying to connect to the QManager.");
Object o = e.exceptionSource;
print("MQException originated from object '" + o.toString());
print("Completion code = " + e.completionCode);
System.exit(1);
}
print("Connected to QManager " + qManager);

replyQueueName = aReplyQueue;

if (aRequestQueue.equals(aReplyQueue)) {
print("Open Options from IF");
openOptions = MQC.MQOO_INPUT_AS_Q_DEF | MQC.MQOO_OUTPUT;
} else {
print("Open Options from ELSE");
openOptions = MQC.MQOO_OUTPUT;
}
print("Open Options"+openOptions);
requestQueue = qMgr.accessQueue(aRequestQueue, openOptions, 
null, // default queue manager
null, // no dynamic q name
null); // no alternate user id

print("Got access to request queue "+requestQueue);

} catch (MQException ex) {
print("MQCommunicator.constructor - MQException occurred : Completion code "
+ ex.completionCode
+ "\n>MQStatus: Reason code "
+ ex.reasonCode + " mesage" + ex.getClass());
System.exit(1);
}

catch (Exception e) {
print("MQCommunicator.constructor - Exception occurred - "
+ e.toString());
System.exit(1);
}
}

public MQMessage send(String buffer) {

try {
MQMessage sendMessage = null;

try {
// Create new MQMessage object
sendMessage = new MQMessage();
} catch (NullPointerException e) {
print("Unable to create new MQMessage");
return null;
}
print("MQMessage created");

sendMessage.format = MQC.MQFMT_STRING;
sendMessage.messageType = MQC.MQMT_REQUEST;
sendMessage.replyToQueueName = replyQueueName;
sendMessage.writeString(buffer);
MQPutMessageOptions pmo = new MQPutMessageOptions();
try {
requestQueue.put(sendMessage, pmo);
} catch (NullPointerException e) {
print("Request Q is null - cannot put message");
return null;
}
print("Message placed on queue");
storedMessage = new MQMessage();
storedMessage.correlationId = sendMessage.messageId;
print("Message ID for sent message = "
+ sendMessage.messageId.toString());
print("Correlation ID stored = "
+ storedMessage.correlationId.toString());

return storedMessage;

} catch (MQException ex) {
print("MQCommunicator.send - MQException occurred : Completion code "
+ ex.completionCode + " Reason code " + ex.reasonCode);
return null;
} catch (java.io.IOException ex) {
print("MQCommunicator.send - IOException occurred: " + ex);
return null;
} catch (Exception ex) {
print("MQCommunicator.send - General Exception occurred: " + ex);
return null;
}
}

public void finalise() {
try {
// Closing the queues
requestQueue.close();

if (requestQueue != replyQueue)
replyQueue.close();

// Disconnect from the queue manager
qMgr.disconnect();

} catch (MQException ex) {
print("MQCommunicator.finalise - MQException occurred : Completion code "
+ ex.completionCode
+ ">MQStatus: Reason code "
+ ex.reasonCode);
}
}

public static void print(String msg) {
PrintWriter message = new PrintWriter(System.out, true);
message.println(">MQStatus: " + msg);
}

private static String getFileContent(String fileName) throws Exception {
File file = new File(fileName);
StringBuffer strBuffer = new StringBuffer();
try {
FileInputStream fileIn = new FileInputStream(file);
int lengthOfFile = (int) file.length();
byte[] outputByte = new byte[lengthOfFile];
// copy binary content to output stream
while (fileIn.read(outputByte) != -1) {
strBuffer.append(new String(outputByte));
}
fileIn.close();
} catch (Exception e) {
print("Exception FileInputStream" + e.getMessage());
e.printStackTrace();
throw e;
}
return strBuffer.toString();
}

public static void main(String args[]) throws Exception {


InputStream file = null;
String propertyFile = "mq.properties";
print("Load property File");
try {
file = MQSendUtility.class.getClassLoader().getResourceAsStream(
propertyFile);
props.load(file);
print("Loaded property File");
String filePath="requestMessage.xml";
String message = MQSendUtility.getFileContent(filePath);
String reqQueueName = props.getProperty("mq.request.queue");
String repQueueName = props.getProperty("mq.reply.queue");
String queueManager = props.getProperty("mq.queue.manager");
String channel = props.getProperty("mq.channel.name");
String qManagerUrl = props.getProperty("mq.provider.url");
print("Calling Constructor");
MQSendUtility util = new MQSendUtility(qManagerUrl, channel,
queueManager, reqQueueName, repQueueName);
MQMessage replyMsg = util.send(message);


} catch (IOException io) {
if (file == null)
print("No input file specified");
} catch (Exception e) {
print("Exception occured in main " + e.getMessage());
} finally {
if (file != null) {
try {
file.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}

}

}

STEP 3. 


Copy below to shell script.

File: sendMQ.sh

#!/bin/ksh

#Execute Domain variables
. /opt/app/domains/my_domain/bin/setDomainEnv.sh

# Assuming domain variables don't include com.ibm.mq.jar so include it
CLASSPATH=$CLASSPATH:/opt/app/domains/my_domain/mq-jars/com.ibm.mq.jar
export CLASSPATH

cd /opt/app/script/alok_tmp
javac -d bin -sourcepath src src/MQSendUtility.java

cd /opt/app/script/alok_tmp/bin
java -Dbea.home=$BEA_HOME  MQSendUtility


STEP 4. 


Below is property file & request message file(XML).

File: mq.properties 

mq.provider.url=#IP Address of the IBM WebSphere MQ server i.e. 172.0.0.1
mq.channel.name=#Channel Name.This must be a valid channel on the IBM WebSphere MQ server.
mq.request.queue=# MQ Name where msg need to be put.This should be a valid queue for the specified queue manager.
mq.reply.queue=# reply queue name.This should be a valid queue for the specified queue manager.
mq.queue.manager=# This should be a valid queue manager on the IBM WebSphere MQ server i.e. qmgr123.
mq.listen.port=# Specifies the port of the IBM WebSphere MQ server.
mq.server.security.principal=#Specifies the username who has permission to use this channel.
mq.server.security.credentials=# Specifies the password for the given user.


File: requestMessage.xml

Hello, this is a test message being sent to MQ on IBM websphere server.

STEP 5. 


Now run sendMQ.sh and see output as below.




Hope above helps in testing Metasolv to WebSphere MQ connectivity by checking if M6 application server is able to send a message to MQ , please leave your feedback or query.


Monday, September 21, 2015

Set Up Metasolv Gateway Events

PURPOSE


To set up gateway events in Metasolv.

SOLUTION


The gateway events are configured to integrate Metasolv to third party application. Please follow below steps to set the gateway events up.

STEP 1. 


Go to find links in M6 GUI and click gateway event, right click on left pane and click New-> Gateway, create a new gateway 'Test' as below.


STEP 2.


 Right Click on newly created gateway Test and click New-> Gateway Event 'Test Gateway Event' as below.



STEP 3.


Now in the provisioning plan associate the gateway event with the task by selecting the task and adding the gateway events to the task.

1. Select the task in the gateway tab.
2. Now select the gateway event from right pane and add it to the left pane by selecting the arrow button.




STEP 4.


Modify the following files located at “<MSLV_HOME>/<SERVER_NAME>/appserver/gateway”

1. In gateway.ini


For setting up gateway events Integration Server (integration.xml gateway events) and / or the Event Server (CORBA gateway events/gateway binding configured) should be up and running.

In order to do that uncomment the highlighted line by removing semicolon and restart the application server.

[ThreadProcs]
INTEGRATIONSERVER=com.mslv.integration.integrationServer.S3Startup
;EVENTPROC=MetaSolv.eventServer.S3Startup
;EVENT2PROC=MetaSolv.event2Server.Event2ServerStartup
;SYSTEMTASKSERVERPROC=com.mslv.core.api.internal.WM.systemTaskServer.SystemTaskServer
;SIGNALSERVERPROC=com.metasolv.system.StartServer
;INTERNET_SIGNAL_SERVER=MetaSolv.CORBA.WDIINTERNETSERVICES.WDIRoot,MetaSolv.SignalServer.WDIInternetSignalServerRootImpl

2. In integration.xml


Get your gateway event id by running the following query

SELECT gateway_event_id, gateway_event_nm
  FROM asap.gateway_event ge
 WHERE gateway_event_nm = 'Test Gateway Event'


Add the following lines in the handlers section of integration.xml

<handler enabled="true">
<event-id>your gateway event id from above query</event-id>
<class>com.mslv.integration.handlers.DefaultEventHandler</class>
<destination>api</destination>
</handler>

STEP 5.

The message from the Gateway Event first reaches mss.internal.event.queue.

In the WLICONSOLE window opened by
http://MetasolvApplicationServer:AdminServerPort/wliconsole create the event generator to capture the event from mss.internal.event.queue to mss.external.event.queue as below.



Note: While executing the Gateway Events through the Integration server, the messages will flow from from mss.internal.event.queue to mss.external.event.queue through the InternalOutBoundGenerator event generator.

See below number of messages have been read out by above event generator.


Now create another jms event generator to get the event from mss.external.event.queue to the channel of your JPD which is created in the schema folder of your JPD.
In default Rule Channel select the channel of your JPD.

Hope above helps in setting up gateway events for your Metasolv application, please leave your feedback or query

Monday, September 14, 2015

Configure Metasolv Background Processor Server

PURPOSE


To configure Background Processor Server for Metasolv application.

SOLUTION


Please follow below steps to configure Background Processor Server.

STEP 1.


It is recommended that you create a separate user in M6 for configuring background processor.Lets say BPADMIN is the user.

Multiple Backgound Processors can be created seeing the business requirement.



STEP 2.


Update the jmaster.ini file in the Metasolv client directory.

[DBMS_Profiles]
[Application Servers]
J2EEProfiles= 'TEST'

[J2EEProfile TEST]
url=http://M6_Application_Server_IP:Port
database=MetasolvDB SID

[PROFILE PURGEUTIL]
DBMS=O84
Database=Oracle
UserId=
DatabasePassword=
LogPassword=
ServerName=ServerName-->to be given
LogId=
Lock=
Prompt=1
DbParm=DisableBind=0
DelimitIdentifier='No'
CommitOnDisconnect='No?
AutoCommit=0

Note:Background Processor connects to application server IP as mentioned above in jmaster.ini. Background Processor uses JDBC connection using mslvNoneTxDataSource. While creating multiple background processors keep Maximum Capacity and Initial Capacity of the DataSource in consideration. Its recommended to have sufficient Initial Capacity of the DataSource.


STEP 3. 


Go to M6 client directory and run jmanager.exe.

Login with ASAP user to launch jmanager console.




STEP 4. 

In job manager console click on Servers, then go to File--> New

Give in the details for the Background Processor Server.


Server Logical Name= Any name for your background processor
i.e. M6_BACKGROUND_PROCESSOR  etc.

Host Name= Host Name of machine where the background processor to be set up.
i.e. Alok Laptop etc.

Job Worker Exe Path = Path of M6 client directory.
i.e. c:/mss etc.

similarly provide other details.

STEP 5. 


Go to M6 client directory and in order to run Background Processor launch jmaster.exe.

Login with BPADMIN user created above. Here you go with running Background Processor server.


Note: Only one jmaster.exe will be running on one host.

STEP 6. 


In order to avoid STEPS 3-4 use below SQL( Not recommended).

Login to M6 database with ASAP user and RUN below SQL.

Insert into JOB.JOB_SERVER
 (SERVER_LOGICAL_NM, HOST_NM, SERVER_DESC, SERVER_STATUS_IND, MAX_WORKERS_ALLOWED, JOB_MASTER_REFRESH_RATE, REROUTE_JOB_MIN, LAST_MODIFIED_DATE, LAST_MODIFIED_USERID, WORKER_EXE_PATHS, ACTIVE_IND)
 Values
 ('M6_BACKGROUND_PROCESSOR', 'Alok Laptop', 'BackGround Processor', 'R', 60, 60, 15, SYSDATE, 'ASAP', 'c:/mss', 'Y');
COMMIT;


Hope above helps in configuring Background Processor for your Metasolv application, please leave your feedback or query. 

Tuesday, September 8, 2015

Install WebLogic Patch to MetaSolv Solution WebLogic Servers

search for a patch using the Patch Number

  1. Log onto My Oracle Support.
  2. Click on the "Patches & Updates" tab.
  3. Click on "Patch Name or Number".
  4. For the "Patch Name or Number" type in the patch number (for example: 1748XXXX).
  5. Choose the "Platform" and Hit Search.
  6. Click on the Patch Name to bring up the download page.



search for a patch using the Smart Update Patch ID

  1. Log onto My Oracle Support.
  2. Click on the "Patches & Updates" tab.
  3. Click on "Product or Family" (Advanced Search)
  4. For the "Product is" choose Oracle WebLogic Server.
  5. For the "Release is" choose WLS 10.3.
  6. For "Description contains" type in your Smart Update Patch ID (like XXXX).
  7. Hit Search.
  8. Click on the Patch Name to bring up the download page.



Install WebLogic Patch to MetaSolv Solution WebLogic Servers



  1. Extract the contents from the patch zip file downloaded into the ($BEA_HOME/utils/bsu/cache_dir) directory, you will have a jar file and patchcatalog_XXXX.xml.                                                                                                                          
                                                                                                                                                                                                                                           
  2. Copy the files (for example, XXXR.jar) and the patchcatalog_xxx.xml from the zip file to the target machine. You do not need the readme file. 
  3. Run below command for unzip or unzip through other unzip utilities like(winzip, 7zip etc)

./p964XXXX_103100_Generic.zip -d $BEA_HOME/utils/bsu/cache_dir

replace $BEA_HOME/utils/bsu/cache_dir/patch-catalog_XXXX.xml? [y]es, [n]o, [A]ll, [N]one, [r]ename: y
  inflating: $BEA_HOME/utils/bsu/cache_dir/patch-catalog_XXXX.xml
replace $BEA_HOME/utils/bsu/cache_dir/README.txt? [y]es, [n]o, [A]ll, [N]one, [r]ename: y
  inflating: $BEA_HOME/utils/bsu/cache_dir/README.txt
  inflating: $BEA_HOME/utils/bsu/cache_dir/XXXX.jar

Note: Always copy the patchcatalog_xxx.xml file from the downloaded patch to the cache_dir along with the patch itself. Do NOT rename this file. Run the Smart Update with user use to
run WebLogic Server

Now install the patch using Smart Update either in GUI mode following step '1' or Command Line mode following step '2'.

1. Smart Update in graphical (GUI) mode



  1. Run the <BEA_HOME>/utils/bsu/bsu script (bsu.sh for UNIX, bsu.cmd for Windows). This will start the Smart Update GUI.
  2. Look for the patches you copied in the "Downloaded Patches" section at the bottom.
  3. Select the "Apply" button for each patch you want to apply. This will validate the patch and apply it to the whole installation.




2. Smart Update in Command Line mode



  1. Go to directory as below.

    cd $BEA_HOME/utils/bsu

  2. Run below command.

    ./bsu.sh -prod_dir=<weblogic-home> -patch_download_dir=$BEA_HOME/utils/bsu/cache_dir -patchlist=XXXX  -verbose -install

  3. Install multiple patches.

    ./bsu.sh -prod_dir=<weblogic-home> -patch_download_dir=$BEA_HOME/utils/bsu/cache_dir -patchlist=XXXX, XXXX  -verbose -install

  4. In case you want to remove a patch run below command.

    ./bsu.sh -prod_dir=<weblogic-home> -patchlist=XXXX  -verbose -remove
Note: Here XXXX is the name of the jar file in the patch.

Hope above helps you in installing Metasolv patches on your environment, please leave your feedback or query.