Showing posts with label filenet bulk update. Show all posts
Showing posts with label filenet bulk update. Show all posts

Monday, January 16, 2012

Updating the mime type property of the doucments in Filenet

When we need to update the properties of the large number of documents  in Content Engine, Filenet provides the script execution option for bulk updates. The scripts are executed using Filenet Enterprise Manager. This option is provided in the search functionality so that we can search the documents based on conditions and update only those articles. This makes developer or support engineer job is easy. Custom property updates generally doesn't require the checkout and checkin of the documents. We can directly update the properties using the script. We can use the below code to update the property.

CEObject.Properties("DocumentType").Value="Confidential"
CEObject.Save

When I tried the above code to update the mime type property it is not working and I found out that it is a read only property and to update the read only properties like mime type we need to checkout the document and before checkin the document we need to update the property. So I have updated the above scrip as mentioned below.

CEObject.Checkout
CEObject.Reservation.Properties("mimetype").Value= "text/html"
CEObject.Reservation.Save
CEObject.Reservation.Checkin

After executing the above script I have observed that the mime type property updated as expected and document version also upgraded but the content of the document is missing. While checkin the document we need to pass the content otherwise it will save the empty document. So I have written a script to get the document content and saved to the local folder and while check-in the document i have added the content. 


CEObject.CopyContent "file:///localfoldername/filename"  
CEObject.Checkout      
CEobject.Reservation.Properties("MimeType")= "text/html"   
CEObject.Reservation.Checkin "foldername\filename"




The above code is used to checkout the content and saved to the local folder and update the mime type property and checkin the content from local folder.

 












Tuesday, December 13, 2011

Bulk updates in FileNet

Bulk Updates in FileNet using FEM

Bulk updates are used in FileNet when there is a requirement to update a property of a large number of documents with the similar data. Suppose there is a requirement to update Document Type property of a particular document class as the document type values are revisited and updated, in this case, we can use the bulk update to update the document type property of the documents to a specified value.

Bulk update functionality is performed using FEM(FileNet Enterprise Manager) and either VBScript or JScript is used as a scripting language. In the FEM search window using the script tab we can execute this bulk update. In the script, tab check the Execute Script check box to enable the script area

to perform the property update use the below VBScript code

CEObject.properties.item("DocumentType").vlaue = "NewDocuemntType"
CEObject.save

The above code is good at updating the single value properties but to update the multi-value properties we need to modify the code as below


CEObject.properties.item("multivaluePropertyName").value.add("newPropertyValue")
CEObject.properties.item("multivaluePropertyName").value.remove("oldPropertyValue")
CEObject.save




How to find the WAS Console Port number

In WAS Server go to the below path <WebSphere Installation Path>/Profiles/<Dmgr profile name>/logs Check for " AboutTh...