3

I am trying to update the Creator property in a FileNetP8 implementation. I tried to update it using the grant of "Modify Certain System Properties" however it seems that this grant does not apply to "Creator" and rather applies to other properties such as "LastModifiedBy" and so on.

I have also tried to alter the property template itself on my class through the "propertyTemplate" property to "Read-Write", however an error is being returned when I try to save it, stating that

"The operation violates a constraint of the implementation. Inherited Settability constraint on property Creator of class"

Any help is appreciated.

4 Answers 4

2

It seems like IBM Support has already been asked this question and they provided "Some How" and answer to this here:

https://www.ibm.com/support/pages/setting-selected-system-properties-ibm-filenet-p8-document-versions

IBM's take on this as they highlighted in the summary section of the shared link is that

The code needed to set Creator, DateCreated, LastModifier and DateLastModified are not complex, but they are somewhat different to the code normally used for more common properties. The above steps should allow a developer to set these values when called for.

To summarize the approach they followed:

  1. Create a new Document, setting the Creator property to the desired value
  2. Checkout the current document with the Reservation Properties parameter set to the new Document properties object using Document.getProperties() Method.
  3. Set the content for the checked out document to a new file, in my case I used the code below to copy the content from the Document to the Reservation object.

    ContentElementList docContentList = oldVersion.get_ContentElements();
    ContentTransfer contentTransfer = (ContentTransfer) docContentList.get(0);
    
    ContentElementList docContentList = oldVersion.get_ContentElements();
    ContentTransfer contentTransfer = (ContentTransfer) docContentList.get(0);
    
    ContentTransfer updatedContentTransfer = Factory.ContentTransfer.createInstance();
    updatedContentTransfer.setCaptureSource(contentTransfer.accessContentStream());
    
    ContentElementList contentElementList = Factory.ContentElement.createList();
    contentElementList.add(updatedContentTransfer);
    reservation.set_ContentElements(contentElementList);
    
  4. Checkin the document and the Creator is now updated

I am not entirely convinced with the solution, however it is what IBM provided and it worked (except for adding an extra version) well for me

1

Quote from Knowledge Center:

Settability of this property is read-only for most users. For users who have been granted privileged write access (AccessRight.PRIVILEGED_WRITE), this property is settable only on create. After initial object creation, this property is read-only for all users.

link https://www.ibm.com/support/knowledgecenter/en/SSNW2F_5.2.1/com.ibm.p8.ce.dev.prop.doc/_index_by_property.htm#Creator

So, it is not possible to do through API (wsi/java/.net it does not matter). But you can try to change it through the database direct update. You can find the database schema here (https://www.ibm.com/support/knowledgecenter/en/SSNW2F_5.2.1/com.ibm.p8.ce.dev.ce.doc/database_table_schemas.htm)

3
  • 1
    Thanks for the links, changing the DB however voids the warranty is is prohibited by IBM
    – WiredCoder
    Commented Sep 27, 2019 at 11:56
  • Don't tell them about it :)) You just need to know that Creator property linked with ACL records, and in properly way you need to change both sides. If you need to make it once, you can use FileNet Deployment Manager to change it, I'm not sure but suppose it possible.
    – swepss
    Commented Oct 16, 2019 at 17:07
  • You are correct. This can be done also through the FDM, it requires the grant of "Modify Certain System Properties" to be modified on the object store.
    – WiredCoder
    Commented Oct 18, 2019 at 11:13
0

creator is a system property and is managed by FileNet and populates the value while persisting the object. As I know, there are no API's to override this. Updating DB, is not a good idea as IBM can void support. However there is one way you can achieve this i.e. by using Change Preprocessors. These are server side, user-implemented actions, which allows you to change the creator just before object is persisted. Hope this helps.

-2

First, I would recommend review both Document.set_Creator and Document.set_Owner methods from IBM Filenet documentation, in order to confirm which matches the requirement.

Not the answer you're looking for? Browse other questions tagged or ask your own question.