Saturday, August 4, 2012

Maximo Webservice Interaction

Currently, I am engaged in project of Astra Daihatsu Motors to implement Maximo. This company currently implement SAP for their Finance. This is quite interesting to deal with. You may know that SAP has PI (Process Integration), while Maximo got MEA/MIF for the integration framework. SAP is implemented by AGIT (it may stand for Astra Graphia IT, not sure). You know when the first, we had a meeting with SAP team. We asked them to use DB as the endpoint for our integration. Surprisingly, they said that SAP cannot be configured to have DB as the endpoint. Uhhmmm, well, I had a thought that "is the SAP which has a very dull Integration component or is it about their capability of SAP implementation?".Well, I think is not the problem of SAP as SAP is a huge complex enterprise application which is not supposed to incapable of having such integration.

Hahaha, after the discussion, we, Maximo team, had a discussion regarding the SAP team. and yes, it was as what I thought. With all those stupid people, how could it be possible for AGIT to not know the way.

Ok, let's continue with the topic of this blog. After having discussion, we both agree that we gonna use webservice and yes, we, Maximo Team, are the one who perform most of the configuration -.-" (while we had a talk before the meeting that we gonna asked them to do the work most, mission failed...hahaha). Ok, then in Maximo we had Interaction diagram which can be used to do the work. As we do not need to perform any code to use this. This feature is very handy in this situation. Just doing configuration and not coding. Very nice of Maximo Feature here (I should get credit for this). But the bad news is that this feature cannot deal with SOAP which require header in the request. You will get an error of axis (I forget the error message). But, it may be fulfilled if I do some coding in the mapping class in the Interaction (I havent tried this anyway but will try later).

Monday, July 23, 2012

Transfer Order

If you had an experience of dealing with Maximo 7.5, especially in the part of Transfer Order or Internal Purchase Order, you will notice that Maximo is so freakin slow. To transfer about 1500 assets, you gonna ends up with a hung machine. The figure may be too much for Maximo to transfer. In Maximo, there are 2 activities of Transfer, we call it Transfer Out and Transfer In. We can breakdown the activities of both, to be more detail, but i dont want to share it out here. What i want to share out is that, the slowness of Maximo. I implemented Maximo in AORA, and you know the number of assets to transfer daily can reach about 1500 even more. All the people really got screw up with the slowness. Some more the websphere was restarting by itself because of lacking memory. Digging into the source of Maximo, makes me understand that there is a  Maximo developer who fucks up with the code.

Knowing that, I just modified the Transfer Order process. Streamlining the process as to use excel to perform Transfer Order and let the background process deal with the file will help users' tasks on using Maximo. Besides, having API of Maximo is really helpful in designing your code or doing customization of Maximo. And now, there is no more people of AORA got screwed because of the new design of Transfer Order.

One of the mechanism of Transfer Order that I have changed is related to the way Maximo creates record of invuselinesplit, shipment, shipmentline and matrectrans. Most of you may know what all of these tables for when you perform Transfer Out(Most of these tables are introduced in latest Maximo 7.5), these tables are used most. Maximo 7.5 process the records on the last 3 tables in the same method, which is during status change. Imagine, that you are going to Transfer Out a thousands of records and with the current process, Maximo will populate a thousands and more record in memory. That's y, Transfer Out process takes too much resources and takes too much time for user to complete. I changed the way this Transfer Out process does. So, When user will Transfer Out a thousand of records, the process will populate in the memory for about 20 records, after that, it will save it to DB. In this way, there will no more Out of Memory problem in your Maximo application when you do Transfer Out.

table or view does not exist

Just to share out something about Oracle during implementation of Maximo in my client. I was doing some integration between Maximo and MQ. As there is no clear way of doing integration between Maximo and MQ, we decided to use DB as the endpoint of Maximo integration to MQ. The data is only one way, that is from MQ to Maximo.We use Oracle package which runs every 8 am and 5 pm every day.

The things came up when I created stored procedure from other schema. If we test the query in the schema (not in stored procedure), it was smoothly being executed, but if we apply it in the stored procedure. The stored procedure wont be able to be compiled with error of nonexistence of table. Granting privilege will solve the problem

Sunday, October 30, 2011

Update field automaticaly once another field get updated

Now, I just want to share out a bit of how to update the field automatically in Maximo. A lot of time, we have requirement on how to update the field once another field get updated. Yes, this is really to ease user for not updating another field manually while the information exists in another table. Well, this kind of behaviour is quite common in the UI of maximo. Let's say in the Purchase Order application. Once you update the field of quantity, you should get the total cost of the purchase. that is, one of the default behavior of the Maximo UI.


In order to perform the above behavior, you can do it in 2 ways.
  1. Coding in the level of Mbo
  2. Coding in the level of Bean
Both must be done by coding. :P Well, it's indeed this blog is meant to be.
Anyway, doing coding in level Mbo, you can do it in Fld classes. Thus, you need to perform some changes on metada of Maximo's database. But, one thing that you need to ensure is that you update the same Mbo as what the bean is actually display. Because, a lot of time, the mbo object is not the same as what the mbo object used in Bean. Thus, updating the data will take no effect on the mbo which current bean displays.

doing coding in the level of Bean, will definitely give you the right Mbo. Thus, there is no need to worry about different Mbo object problem as I describe above.

Saturday, October 22, 2011

Maximo does not publish the changes created by MIF

During my project in AORA, I have been configuring a lot about integration/MIF as it deals a lot with external application so called Satellite Application. The idea is the satellite application does not deal directly to Maximo database, but they are accessing Maximo database through iface table. Well, that is general idea of why Integration exists.

In the business process of our client, there is a process to transfer their assets from one storeroom to another storeroom. Well, the satellite application will expect to have a record of Transfer Order to perform Transfer Out-In process. The record is created in the iface table (this is the term representing a table used to exchange data between external application and maximo). Transfer out will be performed first, from Maximo. Once, the process of transfer out is finished. Transfer in will be processed. Transfer in will not be executed if the transfer out has not been done. The transfer asset process involves a hundred of assets to be transferred even thousand, thus, we cannot use a standard Maximo to do this.

To fulfill the above scenario, I make some customization to process the assets. I am using excel reader to read excel and then process it to MIF. Using MIF, I am able to create record. Well, upon creating the record I am expecting to get a record for transfer in. But in fact, it does not get created which is weird. I have created a publish channel to monitor the objects but still the transfer in object does not get created. Well, my hypothesis is that it has different behavior between integration and created directly from UI, which I think, it is not supposed to be so. Thus, the solution to deal with with the problem is to perform some changes on the object either using mbo changes or using escalation to monitor the existence of object and do some changes (adding description to object or any kind of changes to trigger MIF to publish the changes) on that.

Saturday, April 23, 2011

Maximo Authentication

When user login to maximo, Maximo has its own way on doing authentication process. Well, i think its bad. Why do i say so? maximo does have flag for toggling purpose between lookup to db or LDAP and akin. but, it seems that its no use.

Here is the way maximo doing some authentication.

Maximo doing lookup against the db first, if there is no result of looking up the db, then the process will lookup to the ldap. But, before doing lookup, it will see the flag of "useAppServerSecurity". If it is true, then its going to find the ldap for the entered user.

There is a few thing on my mind regarding this process.

1. the process is not efficient. Why? because maximo will lookup the db before lookup to the others. If it has a flag, then why dont use the flag for toggling purpose.
2. if user wants to migrate, then user should migrate all the user in maxuser to the repository of choice.

Friday, January 7, 2011

deploy weblogic using maven2

I tried to deploy my app into weblogic app server using maven2. Yes, there are a few ways. You can use cargo and weblogic maven plugin. I just tried to use the simple 1 which is the cargo plugin. It seems that this plugin has a problem on the repo. I got so many problem of redirection problem (as the maven2 has a problem on doing redirection once the repository is moved to another server). This gave me a problem of the metadata in my local repository. It seems to many things to do and I just gave up on dealing with this plugin.

Having such problem on the cargo plugin. I try to use weblogic plugin as in the following:
http://mojo.codehaus.org/weblogic-maven-plugin

The following are the steps that I go through to get my app deployed onto my weblogic.
1. Insert the following piece of xml code onto the settings.xml. Insert the following configuration:

weblogic
https://nexus.codehaus.org/content/repositories/releases



weblogic
https://nexus.codehaus.org/content/repositories/releases


2. Insert the following piece of xml code into


org.apache.maven.plugins
maven-war-plugin
2.0.2


org.codehaus.mojo
weblogic-maven-plugin
2.9.1


deploy

deploy
start




mpl-web
${wls.adminServerHostName}
${wls.adminServerPort}
t3
${wls.userId}
${wls.password}
true
true
false
false
${wls.targetname}
true



weblogic
wlfullclient
${weblogic.version}


weblogic
com.bea.core.descriptor.wl
1.1.0.0




3. As you might see on the above configuration that the plugin needs 2 weblogic's plugins. Those are wlfullclient and com.bea.core.descriptor.wl. I just need to install the manually. You can find artifact com.bea.core.descriptor.wl in the directory of /modules. While the other artifact is a merged of all the jar files which located in the /wlserver_10.3/server/lib. So that, you can get the files simply do the following steps:
a. go to the mentioned directory.
b. execute the following command to merge all jars:

java -jar ../../../modules/com.bea.core.jarbuilder_X.X.X.X.jar
java -jar wlfullclient.jar

4. Create the war package of your app by executing the following command: mvn package
I use maven-war-plugin version 2.0.2 to package my application as the default version seems to have a problem.

5. Deploy the app to a running weblogic (Ensure that the weblogic server is running). Take a note that I am using a remote deployment instead of local one even the app server is on my local.
Execute the following command the get it deployed.
mvn weblogic:deploy

Monday, June 28, 2010

An internal error occurred during: "Starting Oracle WebLogic Server 10gR3 at". java.lang.NoSuchMethodError: org.w3c.dom.Node.getTextContent()Ljava/la

An internal error occurred during: "Starting Oracle WebLogic Server 10gR3 at".

java.lang.NoSuchMethodError: org.w3c.dom.Node.getTextContent()Ljava/lang/String;

its been quite long, i have not been blogging as the work load in my new company is so freakin heavy. Well, just want to share up some small thing but its very annoying and noisy. Well, here is the story behind this error.

Previously, I had a problem on using BIRT on Maximo. and it seems that the problem is caused by some incompatible library. After googling around, I found out that a few people experiencing the same problem as me even not specifically for the use in BIRT and Maximo.

Then, I followed what the suggestion told me to. Yet, the result is not as what I had expected. It does not work at all. Seeing that this problem took too much of time and also the due date of the project is quite close, then I was moving forward to deal with another stuff. The day after, I got my PC restarted and then I got the problem as the above. After troubleshooting the problem, I found out that the problem relies on the endorsed method which I took to sort out the problem of maximo and BIRT.

Rolling back all the changes, will give back your eclipse to normal.

Sunday, February 7, 2010

The path does not contain a valid WebLogic Server install

Its been a while for not blogging. huehue... now im working in a different company and different business. Most of the time, I deal a lot with weblogic and etc. Alright, the first time dealing this application server with eclipse, I have a problem saying a non existence of home directory as in the title of this blog.

Upon googling around, I found out some discussion about this message. We need to point eclipse to some part of the directory of weblogic which is /weblogic81 or whatever version that maybe another user uses. Well, as most of the beginner, many people will not be aware of bea home and bea installation directory (I havent tried to differ between bea home and bea installation directory). Anyway, it is sorted out by pointing the explained-above directory.

Monday, January 11, 2010

Project properties of JIRA

Currently, I am doing plugin development of JIRA. A request of my friend in hongkong. The functionality of this plugin is to clone the existing project with all the issues and the configuration of the project. Thus, this project will be akin of template to create 'real' project.

One interesting part of developing this plugin is cloning the issue type scheme. As we know that JIRA has issue type scheme to differentiate the type of the issue. JIRA divides the issue type scheme to be global and not global. By default, the global issue type scheme is Default Issue Type Scheme. But, strange thing is happening when I try to fetch the entity of Default Issue Type Scheme. When I use the following line to get the entity:

FieldConfigScheme fieldConfigScheme = issueTypeSchemeManager.getConfigScheme(existingProject);


and the above result is checked against the isGlobal() method of object fieldConfigScheme. The result is false which I think, it is supposed to be true. However, what i did to solve the problem is to check the object against the default fieldConfigScheme and it works.

Saturday, November 28, 2009

Guice-ing your code

During my learning on shindig, i found out that shindig using guice a lot on its code. Of course, I try to find out what is this tool about. After a little bit searching, I found out that the it is a bit similar with Spring. However, the authors say that it is different. They say that guice is not container and it is too light to be container. Anyway, just cut the bullshit and try to find out what is this tool about.

The first impression on my side after trying this tool is simple. Well, yes... it is indeed very simple as a dependency injection framework. What you need to do is the annotation. It makes all the things very simple.

The things that you need to remember (well, at least on my simple try) on regard of guice-ing your codes is the injector. The injector will try to lookup what are the fields, methods or constructor which need to be injected with object. Then, guice will inject it for you.

Below is a little bit example on it:

public static void main(String[] args) {
// TODO Auto-generated method stub
Injector injector = Guice.createInjector();
Customer customer = injector.getInstance(Customer.class);
customer.changeItem("barangnya");
}

The method injector.getInstance(Customer.class) will give you a complete object of customer with the injected notifier object. Below is the class of Customer:

public class Customer {
@Inject
public Notifier notifier;
public void changeItem(String message)
{
notifier.sendNotification(message);
}
}


Notifier is an interface. Guice will lookup on this interface to find out what class implement Notifier interface. In order to know what class which implemet Notifier interface, the interface should define annotation to tell the guice. Below is the interface of Notifier.

@ImplementedBy(SendSms.class)
public interface Notifier {
public void sendNotification(String message);
}


Its easy, isnt it (well, at least for this try :P)?

Monday, November 16, 2009

Building and Running shindig source on eclipse

Well, running or debugging any java sources managed by maven inside eclipse is as easy as running any simple application in eclipse. The only thing that you need is maven integration plugin. This is a super power plugin when your application deal a lot with maven. I just started to fall in love with eclipse instead of his competitor, Intellije IDEA, which always falls on the error of classpath. I need to delete the current working space and then rebuild it again. Its very annoying.

Yeps, maybe better to tell you a bit story of using this IDEA, a very lame tool to develop your application. The slogan should not be "Develop with pleasure", but it should be "Develop with pressure" instead. Many people agree with this slogan. Perhaps, we really need to tell them this new slogan. I have been using this IDEA to develop and learn about Confluence and JIRA source. However, everyday, I restart my computer, it always fall on the classpath error. It says that it cannot find xxx class while yesterday i build it without any problem. Then, the only thing that I can do is to build it again. It takes a lot of time indeed. Thus, I recommend you for not using IDEA to develop your application. It will only give you pressure because you spend a lot of time to rebuild your source.

Anyway, back to eclipse. I am using this tool to build, running and debugging the source of shindig. Yeps, it is pretty much easy. You just need to install the plugin on this url:
http://m2eclipse.sonatype.org/update/

well, you should get the list of plugins need to be installed. Just pick the core and then installed and restart your eclipse after finishing the installation. After that, you can simply open debug configuration and then create a maven command to run your source. You can use any maven plugin, I have used jetty and tomcat for the tries.

Building and Running shindig source

I ve just tried to build the source of Shindig and running it on eclipse. Yes, as what most people expected, there will be problem face during this process.

First time I was experiencing the problem of not able to build the source of shindig. I saw the log of the process, it fails on the test code. Thus, I just skipped it and running the maven command mvn is success.

The problem is not stopped on this, if you try to run it on jetty using the following command (as what the doco said)

mvn clean install jetty:run -DrunType=full -Djetty.port=80

It will complain as in the following:

[INFO] The plugin 'org.apache.maven.plugins:maven-jetty-plugin' does not exist o r no valid version could be found
Thus, you need to run a complete maven command as in the following

mvn clean install org.mortbay.jetty:maven-jetty-plugin:6.0.1:run -DrunType=full -Djetty.port=8091

Even more, it will complain on the non-availability of the webapp directory as in the following:

[INFO] web.xml does not exist at location F:\software\shindig\src\main\webapp\WE B-INF\web.xml
Therefore, you need to run it on /java/server. Run the above complete maven command, you should get your jetty running the shindig. You can access the sample of shindig using the address:

http://localhost:8091/gadgets/ifr?url=http://www.labpixies.com/campaigns/todo/todo.xml

You should see the following image on your browser.

Saturday, November 14, 2009

SSO (Single Sign On) for JIRA and Confluence

I just developed an SSO application which is built on mule. This SSO can be plugged in the application which is using seraph as its security framework. The 2 greats Atlassian's product which are Confluence and JIRA uses seraph, as its security framework. Thus, this SSO can be applied to these products.

Basically, the idea of this SSO are:

  • to use a middleware to store a data on regard of user's authentication, The middleware that I use is mule as it is free and open source. So, people can use it.
  • to use the existing user framework which is used in seraph to perform authentication. Seraph, by default, uses osuser as its user management framework. However, as we can customize and plug any authenticator to seraph. This would make the authentication is more dynamic to perform. The authentication definitely needs user management framework to perform its task by comparing the credential in database against the input that use provides.
As of now, i still need to clean the code and doing some automation to ease the installation.

Saturday, October 31, 2009

Unable to resolve JRE

Have you experienced this message on your eclipse after building your application using maven 2? I experience this problem after building mule source and the following are the things that I did to fix the problem:
# Check your JAVA_HOME to point to jdk instead of jre
# Check your pom.xml to point to the right jre. The following is the figure of my pom.xml which procudes the message above on the pom.xml


This is after the change:

The change that I did is only changing the name of your jre as my jre directory is jre1.5.0_07 and it is located at C:\Java\jre1.5.0_07.

Thursday, October 29, 2009

How to change maven repository

Well, yes... I experience the problem of not enough space on my drive C.... I believe many people experience the same thing as me. One of the causes is my maven repository is getting bigger and bigger. Yes.. it is the problem when you need to build the source and downloading the dependencies.

To get it changed, what I was thinking is where the configuration of maven located. Then, I was thinking about the installation directory (my maven installation directory is in F:\software\apache-maven-2.0.9). I was suspecting there should be some sort of configuration about this. Just go to the installation directory of maven, and then I found settings.xml inside the conf directory on my maven directory. Open it up and then I found about local repository configuration. The following is a figure of it.

Tuesday, October 27, 2009

Soap document Validation on webmethods

Today, I am experiencing the problem of dealing with webmethods on consuming service generated by processing wsdl of JIRA's application. Well, I definitely experience an error message on dealing with this. Here it is:

com.wm.app.b2b.server.ServiceException: [ISS.0088.9139] Output parameters do not conform to targetOutputSignature:
errorCode=VV-004

The above is caused by validation that is done by webmethods after receiving the object during the soap service calling. All the fields on the object will be validated and if the fields' value does not match (even, the value is empty or null). It will complain. It is very annoying if you receive an object which does not have any value or we can say it as null. it keeps poping up an error message as mentioned above.

However, I found weakness of this validation. It seems that webmethods is not trying to match between the object's fields and the document as reference for validation. Thus, if the fields in the object being retrieved does not exist in the document, then there will be no validation being done.

Friday, October 23, 2009

ConfluenceJira integration

It has been so long for not blogging. Yeps, I come back to blog on my integration of Confluence and JIRA using webmethods as the tool. The initialization of the project has been uploaded to my github repository.
* http://github.com/ariemurdianto/ConfluenceJiraWM

In order to integrate between these products of Atlassian. I use webservice which is provided by both Confluence and JIRA. Also, I use email notification which is sent every time certain event is happening on both application. The email notification that I extract the information is email which is generated from add comment and add page. I extract the information from those type of event and integrate Confluence and JIRA.

Let's pick Confluence as an example to describe the way the system that I juscet developed works, You can configure Confluence so that it will notify you when there is someone adding some comment to certain page. When this event happen, then Confluence will send an email notification to the subscriber (Every user can subscribe on certain available space in Confluen). Every certain period of time, the flow service that I developed, will check on the mailbox and then grab the email with certain pattern. If the email notification is adding a page, then the subject of the email will show us that the email is an adding page email. We can see the pattern of the email subject to determine the event being generated in Confluence. After grabbing the email and extract the information, the service will call the webservice of JIRA to create an issue. This process also happens in JIRA wise. When certain event is fired then the email notification will be sent... so on and so forth....

In fetching email from my inbox, I need to create a custom java service as I can not find any service which deals with imap server in developer documentation (I may be missing out some documentation). This custom service does fetch data based on the predefined regular expression and then extract it to be title, space, bodyContent. For detail on the code, it has been uploaded to my guthub repository.

Sunday, October 11, 2009

integrate Confluence and JIRA using webmethods

I am planning to integrate Confluence and JIRA. The basic idea of this integration is every time one of those products get updated, then the update will be taking effect to the other product. The updating that I mean is creating an issue in JIRA, giving a comment in JIRA.

The current thought of this integration is:
1. if user creates an issue in JIRA then Confluence should be created a page with the page content is the same as the description of the issue.
2. if user creates a page in Confluence, JIRA should be created an issue as well.
3. if user add a comment to some page in Confluence, JIRA should be able to get the comment added to the relevant isssue.
4. if user add a comment to some issue in JIRA, Confluence should be able to the the comment added to the relevant page.

The integration tool that I use is webmethods and mule.
On regard of the progress. let's see later on the next post.

Tuesday, September 15, 2009

Migrate MySQL to postgres

I just googled around on how to do migration from MySQL to postgresql. I ended up with unavailable script of phyton. However, I found Use mysql-postgresql-wizard of component EnterpriseDB which can be used to . You can download the source from here:

http://downloads.enterprisedb.com/src/mysql_pg_wizard_src.zip

You need to download Apache Ant to build the source. I use Apache Ant 1.7.0. Use the following command on how to build the jar file:

ant dist

Executing the above command will produce a jar file which is MigrationWizard.jar. To get the wizard of migrating the mysql to postgres, you need to execute the jar file using the following command in the /dist directory:

java -jar MigrationWizard.jar

The following wizard should be poped up once you execute the above command.