Sometimes to meet the users requirements, we have to perform bulk operations such as; FileNet P8 bulk search and update existing document class(es) property value(s). Users want to add a new property to particular document class and want to update the existing records to populate this into new property.
There are three mechanisms to achieve this requirements;
- FileNet Bulk Search and Update using FileNet vbscript.
- Sweep jobs in FileNet or FileNet custom sweep job.
- Set document property using JavaScript.
Here we are illustrating FileNet Bulk Search and Update using FileNet vbscript. You can configure as followed to add the new property template to the existing class and documents:
- Add a new property template via FileNet Enterprise Manager (FEM) or FileNet ACCE.
- Go to your document class – Property Definition tab and add the new property template to it then refresh the object store.
- The new property template will be added to the existing document but contains no value.
- To update the property value of several objects at the same time for the existing documents, you can use the Content Engine Enterprise Manager’s Search feature. First, using the Enterprise Manager, you will need to determine the Symbolic Name of the property that you want to modify. To do this, select the property under the “Property Templates” node and look for the value for the “Symbolic Name” property on the Properties tab.
- Perform the new search and define the criteria for the new search.
Once search completed with results, do the following step by step.
Select all the results values and perform multiselect operations option as mentioned above.
Bulk Operations window will be prompted, go the the script tab and paste the following script in the FileNet vbscript window (Please change the symbolic name of the property value according to yours):
Public Sub OnCustomProcess (CEObject)
CEObject.DHA_Br_Ingestion = "BC"
CEObject.Save
End Sub
To confirm the FileNet bulk search and update results, try to search again you will see new property value is updated accordingly.
Query:
For further confirmation, you can also query from filenet docversion table. Here is the query:
select COUNT(docversion.u0398_dha_br_ingestion) AS TOTAL, classdefinition.symbolic_name
from docversion, classdefinition
where docversion.u0398_dha_br_ingestion IN ('BC','Tfr')
and docversion.object_class_id = classdefinition.object_id
group by classdefinition.symbolic_name
UNION ALL
SELECT SUM(TOTAL), 'SUM of All' from (
select COUNT(docversion.u0398_dha_br_ingestion) AS TOTAL, classdefinition.symbolic_name
from docversion, classdefinition
where docversion.u0398_dha_br_ingestion IN ('BC','Tfr')
and docversion.object_class_id = classdefinition.object_id
group by classdefinition.symbolic_name
)
a
In next post, I’ll share other two options; custom sweep job and set document property using JavaScript. For information about FileNet bulk search and update please refer to following Tech notes:
- https://developer.ibm.com/answers/questions/358041/filenet-content-engine-51-best-way-to-update-new-p/
- https://www.ibm.com/support/pages/javascript-example-changing-property-value-document-objects-using-custom-sweep-ibm-filenet-content-manager
- https://www.ibm.com/support/knowledgecenter/en/SSNW2F_5.2.1/com.ibm.p8.ce.admin.tasks.doc/p8pcc443.htm
- https://www.ibm.com/support/pages/javascript-examples-handling-bulk-processing-content-platform-engine