This JavaScript example fetches the document properties and prints the information. This information is logged in an application log file.
SELECT TOP 5 This FROM Document
importClass(java.lang.System);
importClass(Packages.com.filenet.api.property.Properties);
function OnCustomProcess (CEObject)
{
System.out.println("Executing Fetch Properties script");
CEObject.refresh();
var props = CEObject.getProperties();
System.out.println("ClassName................... " + CEObject.getClassName());
System.out.println("Has DocumentTitle property.. " + props.isPropertyPresent("DocumentTitle"));
System.out.println("Propertites size............ " + props.size());
}