Showing posts with label weblogic integration. Show all posts
Showing posts with label weblogic integration. Show all posts

Saturday, March 26, 2016

Weblogic Integration MQ Event Generators not polling and retrieving messages from MQ in a Weblogic clustered environment

PROBLEM



A WLI Event Generator appears not to be consuming messages from an MQ queue.

When there is just one managed server running in a cluster, the Event Generator is retrieving the
messages from MQ.
But as soon as the second managed server is started in the cluster, the Event Generator gets redeployed (suspended for the time the second server is in process of starting and becomes running once the second server is running) and after that it stops picking the messages until the Event Generator is suspended/resumed again at which point it will perform a one time retrieval of message from the queue.

Essentially in a clustered environment, as soon as a new managed server is added (beyond the very first one) into the cluster Event Generator seems to start having problems and it stops polling messages from queue.


CAUSE


This is due to the fact that Server Affinity was disabled in the Connection Factory thus preventing the cluster from knowing which server would process the messages.

Changing the Server Affinity to "true" resolved this issue.

SOLUTION


1. Enable the server affinity for this connection factory or create a new connection factory with this
enabled
2. Create a new MQ Event Generator that uses this new connection factory
3. Restart admin and managed servers
4. Test the scenario again and make sure messages get processed.

Hope above helps in fixing above mentioned issue related to Event Generators in WLI, please leave your feedback or query.

Monday, August 24, 2015

Deployment Of Application Fails on Weblogic With 'Failed to deploy process XXX.jpd. There are running instances with incompatible serialization shape'

PROBLEM


Deployment of any custom application or Metasolv core application(e.g. mss_integration.ear) fails with below exception.


<Mar 3, 2015 5:24:49 AM EST> <Error> <Deployer> <BEA-149231> <Unable to set the activation state to true for the application 'mss_integration'. java.lang.RuntimeException: Failed to deploy process

/API/com/metasolv/api/workflow/customer/GetCustomerAccountSync.jpd. There are running instances with incompatible serialization shape.

        at com.bea.wli.management.WLIAppListener.checkProject(WLIAppListener.java:172)
        at com.bea.wli.management.WLIAppListener.postStart(WLIAppListener.java:418)
        at weblogic.application.internal.flow.BaseLifecycleFlow$PostStartAction.run(BaseLifecycleFlow.java:292)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
        at weblogic.security.service.SecurityManager.runAs(Unknown Source)
        Truncated. see log file for complete stacktrace



CAUSE



The problem is caused by aborted/running processes data in the APP_INT.WLI_PROCESS_INSTANCE_INFO table. There could be 2 reasons for the error.

1. It occurs when there are running / aborted instances of a JPD and an attempt is made to deploy a newer version of incompatible JPD (code changed) or same ear file with no in the old one's place
and as WLI keeps state of previous JPD's therefore old instances in running or aborted state does not allow new ear to be deployed.

2. If the ear file(no change at all) is exactly the same as before server restart/application deployment and the issue occurs if there are any running or aborted instances.

Here we will only discuss about the 2nd scenario.

The query below identifies running/aborted transaction processes:


SELECT * FROM APP_INT.WLI_PROCESS_INSTANCE_INFO WHERE PROCESS_TYPE  LIKE '%jpd_name' AND PROCESS_STATUS IN (0,1);



Description of various PROCESS_STATUS that can be found:
0=RUNNING
1=ABORTED
2=SUSPENDED
3=COMPLETED
4=FROZEN
5=TERMINATED
If the process tracking is set to NONE we can also see a status=7.

Note: In case you have multiple domains in M6 application and each domain may use different WLI user for same DB instance.
e.g. I have two diff domains where I may have installed M6 and their names are 'ENTERPRISE' and  'WHOLESALE'. I may create different WLI users 'ENTERPRISE_INT' and 'WHOLESALE_INT' respectively. In such cases login with such users instead of APP_INT.



SOLUTION




If the server is restarted and the application is deployed with 'Failed' status after server is started. Do as below


1. Go to database(with APP_INT) delete all the running/aborted instances for the particular jpd/process


DELETE FROM APP_INT.WLI_PROCESS_INSTANCE_INFO WHERE PROCESS_TYPE  LIKE '%jpd_name' AND PROCESS_STATUS IN (0,1);
COMMIT;

2. Also delete all the child records for PROCESS_TYPE in tables like WLI_PROCESS_EVENT to have clean and consistent data.


3. Redeploy the application ear.

OR

Shutdown WebLogic(where the ear is deployed) Server & truncate WLI_PROCESS_INSTANCE_INFO. Start the WebLogic server.

Hope above helps in fixing the deployment issues with applications having running instances in WLI schema, please leave your feedback or query.

Sunday, May 31, 2015

MetaSolv Integration with other systems via Weblogic Integration(WLI)

Weblogic Integration(WLI) Introduction:


WLI was a product from BEA Systems and was recommended by MetaSolv for integration with other systems. Later Oracle has acquired BEA Systems and MetaSolv both.
It provides a development and run-time framework that unifies all the components of business integration.

Role in E2E system:

Weblogic Integration (WLI) plays following roles in an end to end system.



1. Interface b/w WBI/DataPower and M6

Receives WBI/DataPower request, process the request, send to M6.
Get response from M6, process the response, send to WBI/DataPower.

2. Major role in M6 front-end and custom applications

Order(ASR,LSR,PSR),Customer,Inventory creation/Update in M6.

3. Interaction with WBI/DataPower

Sends the order response/order status updates from M6 to WBI/DataPower.


MetaSolv Integration using Websphere MQs


In case DataPower or the other ESB is used to integrate with MetaSolv via WLI, MQ clustering is done on websphere MQ the flow will be as below.


Webspere MQ:

MQ facilitates the assured, secure and reliable exchange of information between applications, systems, services and file by sending and receiving message data via messaging queues, thereby simplifying the creation and maintenance of business applications.

MQ Clustering:

Typically a cluster contains queue managers that are logically related in some way and need to share some data or application

Once a cluster has been set up, the queue managers within it can communicate with each other without the need for any channel definitions or remote-queue definitions.

You need not make any alterations to your applications if you are going to set up a simple MQSeries cluster. The application names the target queue on the MQOPEN call as usual and need not be concerned about the location of the queue manager.



MetaSolv Integration using Weblogic JMS Queues


In the cases where DataPower or other ESB is used to integrate with MetaSolv via WLI using JMS Queue, the flow will be as below.


JMS Queues:

A JMS queue represents the point-to-point (PTP) messaging model, which enables one application to send a message to another.
 PTP messaging applications send and receive messages using named queues.
A queue sender (producer) sends a message to a specific queue. A queue receiver (consumer) receives messages from a specific queue.


Event Generators

Event generators publish messages to Message Broker channels in response to system events (for example, files arriving in a directory, or messages arriving in an email account or JMS queue or webshpere MQ).

Types:
JMS event generator
File event generator
Email event generator
RDBMS event generator
MQ series event generator


JMS Event Generator:

MQ Series Event Generator:


Message Broker Channels:


Messages are published to the channels and subscribed from the channels.
Channels are defined in the “channel file”.
You can specify the channels to which a process publishes and subscribes. Publishers can broadcast messages on the channels and consumers such as processes and other back end resources can
subscribe to them. In this way, the message broker facilitates a loosely coupled interface. You can add new publishers and new subscribers at run time.
Message brokers support event generators that can publish events from external sources to the message broker channels.


WLI workflows:


Graphical representation of the business process that meets the business requirements for your project.
Graph of component nodes in the business process and its interactions with clients and resources, such as databases, JMS queues, file systems, and other components.


WLI Controls:

Controls make it easy to access enterprise resources, such as databases, file systems, Enterprise Java Beans, and so on, from within your application.
The control handles the work of connecting to the enterprise resource for you, so that you can focus on your business process’ business logic.
Examples:
Database Control
Email Control
File Control
Custom Java Control

WLI integration with M6:


Metasolv APIs are exposed to WLI only.

APIs’ jar files are deployed on WLS and the respective APIs are used in WLI workflows, based on the business objective.

Some of the Metasolv APIs commonly used:
Metasolv Order Management API
Metasolv Customer Management API
Metasolv Inventory  Management API

Weblogic Server:

Below are the two weblogic consoles, also listed the regular tasks performed using them.

Weblogic server console:


  1. Monitor the server performance
  2. Configuration of JMS queues
  3. Configuration of JDBC datastores, connection pools, etc..
  4. Deploying the application


Weblogic Integration Admin console:


  1. Allows you to manage and monitor the entities and resources required for your WebLogic Integration applications
  2. Configuration of MB channels, Event Generators,etc..




Hope above helps in understanding the MetaSolv integration with other systems via WLI. Please leave your feedback or query.