Category Archives: ECM

New Official ICN Plug-ins open source repository

I’m really excited to announce a new area for ICN!

Ok, maybe I’m overreacting but this is really, I hope, the beginning of something great.

My colleague Kerry Langford and I, have been working for months internally on the idea of building a global, centralized, IBM managed, open source repository for ICN Plug-ins and get me approved to commit code there. The idea is a public repository of Plug-ins, a bit like Jenkins does, where people can choose what they need and just download production-ready releases, but also give feedback, open issues, enhancement requests or even contribute.

I really wanted to thank Kerry in this post because he has been doing an amazing job internally to push open source and build a better FileNet/ICN community, which is IMHO one of the weak spot of FileNet and ICN, but probably because I’m used to open source, community driven projects 🙂 Nothing would have been possible without him so Thank you Kerry for making this possible!

So, after a lot of discussion with the ICN Team (they own the GitHub repository), we finally did it. It’s live here. Hosted by IBM, one unique repository to rule them all!

Continue reading

Stuck out of ICN, Update admins via Database updates

There are situations where you can get stuck out of the ICN Admin desktop. For instance because you change the uid mapping for the LDAP and the ID you used is not valid anymore, you should now use the email address or another field. If you forgot to add the new ID before you made the change, you’ll have to rollback and restart ICN which is not always possible. There is one way to add/remove admins without restarting.
You can update directly the database, and wait 10 minutes (the default refresh time) to get your changes pick up. The entry we are interested in is settings.navigator.default in the table NEXUS.CONFIGURATION.

This field contains a json object with plenty of information. You can check it by doing:

select ATTRIBUTES from NEXUS.CONFIGURATION where ID='settings.navigator.default'

Then when you are ready, you can add a new admin by using the following command:

UPDATE NEXUS.CONFIGURATION SET ATTRIBUTES = REPLACE(ATTRIBUTES, 'adminUsers=', 'adminUsers=NewAdmin,') WHERE ID='settings.navigator.default'

Wait for at top 10 minutes and you should be able to log in again. Then you should clean up old admins which are not needed anymore.

Install FileNet P8 without CPIT

I’ve been focusing a lot lately on how to install P8 with CPIT. Mostly because this is easier, faster, and usually more convenient, but it has inconveniences as well. Installing all components separatly has a few benefits and I thought it was time to write how to do that:

  • Install different versions of the components
  • Install Fix Packs during install
  • Use different technologies
  • Split components on different servers
  • Use pre-installed components (LDAP, DB, …)
  • Optimize install size by deleting binaries after each install
  • And for curious people, understand better what’s going on 🙂

This will be a long post, but I’ll try to split this step by step and explain precisely what is going on. At the end of this post, I will give the full script you can run to install a full platform. Unlike the CPIT installer, I’ve tried to keep everything in one script to ease distribution, installation and customization. That’s why you will see a lot of HERE-doc commands to create files on-the-go. At this moment I’m using only one dependency, which is a file from the CPIT installer: cpt-actions.jar. This is the java tool allowing us to create the default domain and object store. This is quite basic to implement using the Java API so I hope to write soon how to rewrite this tool so we can get rid of all dependency on CPIT.

Continue reading

Upgrade P8 FileNet Platform to 5.2.1 FP5

Here is how to upgrade P8 FileNet Platform 5.2.1 to 5.2.1 FP5 silently. This upgrades both the server and the client.

You need FileNet 5.2.1 to upgrade to 5.2.1 FP 5. Here is a way to install FileNet 5.2.1.

You can execute this in the same directory you copied 5.2.1.5-P8CPE-LINUX-FP005.tar.gz and 5.2.1.5-P8CPE-CLIENT-LINUX-FP005.tar.gz.

Continue reading

Upgrade to ICN 2.0.3 FP8

Here is a way to silently upgrade from IBM Content Navigator 2.0.3.x to 2.0.3 FP8. You can use this right after using the CPIT installer to be up-to-date with your ICN version. You need at least ICN 2.0.3.0 to upgrade to ICN 2.0.3 FP8.

In the same folder you copied 2.0.3-ICN-FP008-LINUX.tar, execute these commands:
Continue reading

Display a new icon for each row

This post we’ll go through how to add a new custom icon, next to the lock, compound, … icons.

This is not something that can be done with configuration in ICN. It needs some customization which is near hacking but that will give us what we want.

First step, if you are intending to display an icon based on a custom property, you will have to, either add the property as an icon so it gets fetched, or customize ICN to fetch it, this is explain here.

When this is done, you can proceed to the customization of the client to use the property and display the icon. This is a 2 step process.

  • Aspect the factory of IconValue which is the multiStateIcon method of the class ecm.widget.listview.decorators.common to add your icon when toString is called on the returned object
  • Aspect the createResultSet method of the class ecm.model.ContentItem to increase the size of the first column of the Content list view

First will result in this customization, here I’m using an existing class (ecmRecordIcon) since we are not using it, but you can add some css code in the css of your plugin and use your own icon of course:

// No need to use .prototype on common since it's already a Singleton, no instance are create with new
aspect.after(common, "multiStateIcon", function (result) {
    aspect.after(result, "toString", function (resToString) {
        if (this.item && this.item.attributes.MultiFiledIn) {
            resToString += '<img class="ecmStatusIcon ecmRecordIcon" alt="Multi Filed In Document" title="Multi Filed In Document" src="' + this._blankGif + '" />';
            resToString += '<div class="dijitHidden">Multi Filed In Document</div>';
        }
        return resToString;
    });
    return result;
});

The second will look like this:

// ContentItem.createResultSet is a static method from ContentItem, no need to aspect the prototype
aspect.after(ContentItem, "createResultSet", function (result) {
    if (result && result.structure && result.structure.cells && result.structure.cells.length > 0) {
        var s = result.structure.cells[0][0];
        s.width = "71px"; // 71 is good for one new icon, add 16 per icon
        s.widthWebKit = "71px"; // You can also reuse te value and just add 16px to make it more flexible and cleaner
    }
    return result;
});

And this is it. This way the IconValue will add your icon when its toString is called, and the resultSet will add some extra space to make sure it is still displayed on one line.

Use a custom property in Action.isVisible or isEnabled

Sometimes, we want to use a custom property to decide if an action should be displayed, enabled or hidden. The items provided by ICN as parameters of these functions are items as they are shown in the view, as rows. They don’t have all properties fetched, only the system ones and the ones you configured to be shown as extra columns (since they have to be fetched in order to be displayed).

As you may have noticed when overriding the isVisible and isEnabled functions, they are synchronous and they expect an immediate return. That means fetching the attributes using the item.retrieveAttributes function won’t work since it’s an asynchronous function (there is one round trip made to the ICN server to fetch them).

In this post, we’ve seen how to fetch custom attributes for all rows without showing them in a column. We will now see another way to do this, by making the ContextMenu actually asynchronous. Since the isVisible and isEnabled functions are synchronous, we will actually retrieve the attributes before showing the Context Menu for the item.
Continue reading

Fetch a custom property for all objects or rows

This post explains how to fetch a custom property you’ve added on a class for all documents retrieved by ICN, before all attributes are actually retrieved using the ContentItem.retrieveAttributes function. That means all items when displayed as row in the Content List view will have this property (also named attribute in ICN) already fetched. There are use cases for this, two of them being:

  • Using a custom attribute in the isVisible or isEnable function of an action, to decide if the action should be displayed based on business logic. I wrote about this here
  • Using a custom property to display a new icon along with the lock/compound/readon-only/… icons. I wrote about this here

After spending some time investigating how ICN works to know what custom properties to fetch when retrieving the content of a folder (openFolder action), I came to the conclusion it goes through two steps:
Continue reading

Create your custom attribute editor (part 6)

Last part of this tutorial will be about enhancing our editor to make it a bit nicer. The idea is to create a property editor to select a file within the repository. We will use the DocumentSelector dialog we wrote here.

We are actually really close of achieving this, we will just hook up the click event of the input field to start the DocumentSelector dialog, and we will also add a Browse button on the right of the input to make it more user-friendly.
Continue reading