Content Management and Capture

 View Only
  • 1.  Filenet P8 - Bulk actions - Integer properties

    Posted Mon May 03, 2021 08:46 AM
    Hi,

    I want to update document properties in an ACCE search result list with the Batch operations.

    The script to execute is :
    importClass(Packages.com.filenet.api.property.Properties);
    importClass(Packages.com.filenet.api.constants.RefreshMode);
    function OnCustomProcess(CEObject)
    {
    CEObject.refresh();
    CEObject.getProperties().putValue("TECHNICAL_OCRSTATUS", parseInt("0"));
    CEObject.save(RefreshMode.REFRESH);
    }

    The property to update is an integer. But no way to obtain an integer in the JScript. The rror message is always:
    "There was an error running the script. Message was: Wrapped com.filenet.api.exception.EngineRuntimeException: FNRCE0018E: E_DATATYPE_MISMATCH: The method invoked is inappropriate for the datatype of the property. The property TECHNICAL_OCRSTATUS expects the datatype to be java.lang.Integer, but the input value is java.lang.Double. failedBatchItem=0 errorStack={ at".

    Did you find a way to achieve this update ? I didn't find any documentation on this subject, except eForms scripts.

    Thanks


    ------------------------------
    Yannick Martin
    ------------------------------


  • 2.  RE: Filenet P8 - Bulk actions - Integer properties

    Posted Tue May 04, 2021 02:47 AM
    Hi Yannik,

    based on an example give for the CaseState property (which is integer as well), I'd suggest to use the following expression to set an integer value:

    CEObject.getProperties().putValue("TECHNICAL_OCRSTATUS", Integer.valueOf(0));

    See https://www.ibm.com/support/pages/node/6233408

    Please let us know whether it worked for you.

    Best regards,
    Michael

    ------------------------------
    Michael Kirchner
    Leading Technical Specialist - Digital Business Automation
    IBM Technology
    Germany
    ------------------------------



  • 3.  RE: Filenet P8 - Bulk actions - Integer properties

    Posted Tue May 04, 2021 03:11 AM
    Hi Michael,

    with the import of the Integer 'class', it works.

    I didn't find a description of this JScript language which appears to be a mix between javascript and FileNet API.
    I kept to find a javascript solution.

    Thanks for help

    ------------------------------
    Yannick Martin
    ------------------------------