Category Archives: FileNet P8

Factory.Document.fetchInstance can also take the ID as a String

Today, when I was doing unit testing, I discovered a weird behavior in P8. I just discovered that the fetchInstance method of the Factory.Document, this one:

public static Document fetchInstance(ObjectStore os, String path, PropertyFilter filter)

can also take the Id as a string and not only a path. I wasn’t as nice as P8 in my unit test since I was expecting an ID type when mocking the static method, and of course my test failed :). I still think this isn’t a good practice so I changed my code to convert the String to an Id, but I thought it was worth noticing so here is a post about it. The best way in my opinion is to write

Factory.Document.fetchInstance(os, new Id(id), pf);

instead of

Factory.Document.fetchInstance(os, id, pf);

which actually works. I had to debug to convince myself because I found really strange that it worked :).

That’s it folks. Another good to know, but not good to do!

The importance of the JAAS Stanza name

One upon a time, I was wondering what the stanza name is for when connecting to P8,  using most of the time a null value. Today I remembered this lost time and I thought I would write about it.

Why does it work with null

It works with a null stanza name when you don’t have the thin client jar in your classpath. Indeed this jar contains some properties files which makes the connection impossible without stanza name. If you are using WSI connection (CEWS), you don’t need this jar. But if you are sometimes using the EJB connection and have this jar in your classpath, then the WSI connectionwon’t work with a null stanza name, and you will have to do things properly, i.e. use the appropriate stanza for the WSI: FileNetP8WSI.

What stanza name to use

Well to do things properly, always use FileNetP8WSI when connecting via WSI, and always use FileNetP8 when connecting via EJB, even if you don’t have the thin client jar in your classpath. At least if you add it later because you want to use an EJB connection, your code won’t break on every WSI connection.
Continue reading

How to connect via EJB to P8 5.2 and WebSphere V8.5

Since it can sometimes be tricky, I thought I would write about how to establish an EJB connection to a P8 platform. I try a lot of things to actually see it was quite easy.

First, forget about a non SSL connection with WebSphere 8. I tried a lot of things, including modifying the RMI/IIOP configuration in the WebSphere console to allow non SSL connection but nothing worked. But using SSL for EJB does’t mean you have to have your CE exposed via https, this is something different and doesn’t require any settings so why not use this.
Continue reading

The UpdatingBatch performance effect

It is always nice to have benchmarks to see if what we use does really impact performance. That’s why I thought I would do this Updating Batch performance assessment. To see how much using a UpdatingBatch can improve performance. The idea was also to see if we are creating/updating/deleting a lot of objects, what is the best chunk size, meaning the number of objects you will include in one batch, then create a new one. Of course you can add all your updates to the same batch, but then you could get a Transaction Error from your DB because the transaction would become to big to handle.

As usual I did three tests, on Local, over LAN and over Internet. Although the actual time of execution is not really relevant since we don’t have the same machines, or the same internet connection, what really matters here is the evolution of the execution time depending of the chunk size, where two environments have for bottle neck the network, and the first one the machine resources.

Creation of 1000 sub-folders

Continue reading

Select all results in the ACCE search

Today I had a really stupid problem. I usually use the FEM or the Java API to do batch operations. But today I thought I would try the ACCE search, since it has a query builder like the FEM.

I built my search and launched it and it worked perfectly, which is great, and then I felt really stupid, looking at my browser and thinking, how the hell am I supposed to select all results to launch my batch operation. I didn’t see any checkbox in the header, nor a “select all” option. Of course ctrl+A doesn’t work, so how?!!

It drove me crazy for a while and I finally gave up and thought I still need something. Well this is the workaround I came up with. I have to stay it seems really weird having to do that, so if I missed something and this is actually doable from the UI please tell me!!!

To use the workaround, you need to scroll the list until the bottom to load all lines and these results won’t be selected, then open your developer tool on your browser (usually F12) and copy/paste this in the javascript console, then run it. It should check all checkboxes for you. I didn’t bother, it just clicks all checkboxes from the ACCE so after you did that and run your batch operation, you should refresh the ACCE so the other checked checkboxes do not mess with your settings or anything.

dojo.query(".dijitCheckBox").forEach(function(node, index, arr){node.click();});

Again, if there is another solution please tell me and I will be more than happy to delete this post for good!

What to do after a P8 CPIT installation

After a CPIT installation, you will have a few more steps to do before your platform is fully operational. If you don’t, you will mainly have two errors:

  • A user authenticated as anonymous has attempted to access a session owned by user... in the WebSphere logs, resulting to be always disconnected in TDS console, and a really unstable platform (a lot of errors in the ACCE)
  • Failed to get configuration file WcmApiConfig.properties when trying to configure the Workflow system (along with a login window you shouldn’t get)

Here are the steps to follow. Since the new CPIT installer now has two WAS profiles (one for FileNet and the other for ICN, I will add for each step if they should be executed on server A (FileNet), B (Icn), or both (AB). In the IBM WebSphere administration console:
Continue reading

Install FileNet P8 (with Composite Platform Installation Tools)

Update: This post is now super-seeded by the last version, installing FileNet P8. I will still be answering any question you might have though.

IBM came up with something that sounds really nice: The Composite Platform Installation Tools or also called CPIT. And it is true, being able to have a running platform (for test and development only) in less than one hour sounds like a dream, especially when you know how installing P8 is a nightmare. Except it never works…

And from the one hour expected, we fall back to a few days like before. It is actually impressive how many errors this thing can produce. That’s why I write this post, trying to summarize all errors that can occur.

Continue reading

Understand the Page Size parameter

Until now I thought that Page Size was really useful for queries only. As often, I was wrong… Of course it matters a lot for queries, but it actually matters when working on one object too. I discovered this when I was writing my other post on the Property Filter and did some benchmarks.

I noticed that every 500 items I had a small pause in my execution, even with using properly the Property Filters. So my dream of one light call, hoping to get my all 5000 subfolders in one light call and then iterate super fast on it wasn’t completely true.

Continue reading

Understand the FileNet property filters

Since I started to work with FileNet, I had the chance to see my share of code using the Java API, most of the time written by someone else. And something I noticed is how often people use null or 0 in the recursion argument of the FilterElement. There are positive and negative effects of using these values, but I am not sure people who writes this always knows what it does, so I thought I would explain, even if the P8 Knowledge Center documentation on this topic is quite good I have to say. But it might give you another point of view.
Continue reading

FileNet Enterprise Manager (FEM) – HTTPS is required

Most of the time when I deploying a sandbox platform, I don’t bother with configuring HTTPS. I had this problem for the fist tine not long ago, because as you know, with p8 5.2, the FEM became almost useless. But I needed it anyway and had this problem:

http://hostname:9080/wsi/FNCEWS40MTOM' HTTPS is required

After some research, it actually comes from WCF which requires a secured connection to work. You actually just have to install WSE, which is the ancestor of WCF and does have this requirement. This is for test platform only obviously because of the security issue, but for sandbox without security issue, it can be nice to not have to set up SSL.

You can download WSE here, install it and just try to connect again with FEM, no need to reboot or anything