BPM, Workflow, and Case

 View Only

Unable to Upload Excel Files in BPM/BAW? SOLVED!

  • 1.  Unable to Upload Excel Files in BPM/BAW? SOLVED!

    Posted yesterday
    Edited by Peter Victor 2 hours ago

    Hi IBM community,

    Today, I'll be discussing an issue I encountered while attempting to upload Excel files in BAW/Workflow Authoring, which is part of Cloud Pak for Business Automation (CP4BA) v24.0.1.

    Problem Definition

    Document Attachment document mime-type application/vnd.openxmlformats-officedocument.spreadsheetml.sheet and extension xlsx is not accepted for upload to the server. The following error can be seen in the "icp4adeploy-bastudio-deployment-0" pod.

    "SRVE0293E: [Servlet Error]-[CREATE_FILE_FAILED]: java.lang.SecurityException: Document Attachment document mime-type application\/vnd.openxmlformats-officedocument.spreadsheetml.sheet and extension xlsx is not accepted for upload to the server\n\tat com.lombardisoftware.portal.servlet.ECMDocumentServlet.createDocument(ECMDocumentServlet.java:1138)\n\tat com.lombardisoftware.portal.servlet.ECMDocumentServlet.createDocument(ECMDocumentServlet.java:1108)\n\tat com.lombardisoftware.portal.servlet.ECMDocumentServlet.access$1200(ECMDocumentServlet.java:90)\n\tat 

    I followed the guidance provided in IBM documentation and technotes (referenced below) to resolve this issue by creating a 100Custom.xml file and passing it to the CR using a secret, hardcoded inside the CR in two different ways (see reference #1). Unfortunately, neither method worked as expected.

    The solution I found was to access the terminal of the Business Automation Studio pod (icp4adeploy-bastudio-deployment-0) and edit the 100Custom.xml file. This file is created during server installation and is located at /opt/ibm/wlp/usr/servers/defaultServer/config/100Custom.xml.

    Once there, I added the following parameters: <document-attachment-accepted-mime-types> along with the first three mime types, as shown below. After making these changes, the upload worked successfully.

    <properties>
    	<server merge="mergeChildren">
    		<!--  mime type allowed list which specifies mime types accepted for  -->
    		<!--  specifies whether to allow a null mime type for upload  -->
    		<allow-null-mime-type>false</allow-null-mime-type>
    		<document-attachment-accepted-mime-types>
    			<mime-type>application/vnd.ms-excel</mime-type>
    			<mime-type>application/vnd.ms-excel.sheet.macroEnabled.12</mime-type>
    			<mime-type>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</mime-type>
    			<mime-type>application/vnd.openxmlformats-officedocument.wordprocessingml.document</mime-type>
    			<mime-type>application/vnd.openxmlformats-officedocument.presentationml.presentation</mime-type>
    			<mime-type>application/msword</mime-type>
    			<mime-type>application/vnd.ms-powerpoint</mime-type>
    			<mime-type>application/pdf</mime-type>
    			<mime-type>application/rtf</mime-type>
    			<mime-type>application/xml</mime-type>
    			<mime-type>application/zip</mime-type>
    			<mime-type>text/plain</mime-type>
    			<mime-type>text/csv</mime-type>
    			<mime-type>text/html</mime-type>
    			<mime-type>image/bmp</mime-type>
    			<mime-type>image/gif</mime-type>
    			<mime-type>image/jpeg</mime-type>
    			<mime-type>image/tiff</mime-type>
    			<mime-type>image/png</mime-type>
    		</document-attachment-accepted-mime-types>
    	</properties>

    This solution resolved the issue, and I hope it helps others facing similar challenges. Feel free to reach out if you have any questions!

    Note: In Cloud Pak for Business Automation (CP4BA) v24.0.1, the BAStudio pod includes Workflow Authoring, whereas in v21.0.3, it was in a separate pod.

    [1] https://www.ibm.com/docs/en/cloud-paks/cp-biz-automation/24.0.1?topic=studio-optional-customizing-business-automation-properties

    [2] https://www.ibm.com/docs/en/cloud-paks/cp-biz-automation/21.0.3?topic=bawarws-optional-customizing-business-automation-workflow-properties

    [3] https://www.ibm.com/support/pages/make-changes-100customxml-file-modify-business-automation-workflow-configuration-cloud-pak-business-automation
    [4] https://www.ibm.com/mysupport/s/defect/aCI3p000000bm2TGAQ/dt195853?language=en_US

    [5] https://community.ibm.com/community/user/automation/discussion/mime-type-extension-conflict-when-uploading-to-bpm-document-store-v21



    ------------------------------
    Peter Victor
    ------------------------------