BPM, Workflow, and Case

 View Only
  • 1.  Working with files in Business Automation Workflow

    Posted Fri September 16, 2022 10:50 AM
    I am trying to upload a document to the process instance. using BPM file uploader. After uploading I'm getting the document ID and setting it to ECMID but I'm now failing to save the file on to the filesystem. How best can I upload the document to the filesystem and return the path of the document.

    ------------------------------
    jaison chipuka
    ------------------------------


  • 2.  RE: Working with files in Business Automation Workflow

    Posted Fri September 16, 2022 12:01 PM
    Hi Jaison,
    can you please explain a bit more what you want to achieve?
    The BPM file uploader coach view is intended to store a document into the BPM document store where it is associated to the process instance for which you added this document. Later on you can use for example the BPM document list coach view to access this document (in context of the process it was uploaded to).
    Why do you want to save to document to a filesystem and return the path to the file? Do you want to perform further actions on the document?

    Best regards,

    Michael

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



  • 3.  RE: Working with files in Business Automation Workflow

    Posted Thu September 22, 2022 08:59 AM
    Hi Michael,
    I want to save the document to a specific folder after i have uploaded it.
    Like writing to a separate filesystem

    Regards

    ------------------------------
    jaison chipuka
    ------------------------------



  • 4.  RE: Working with files in Business Automation Workflow

    Posted Fri September 23, 2022 02:47 AM
    Edited by Michael Kirchner Fri September 23, 2022 02:47 AM
    Hi Jaison,

    when you upload the file to a workflow, the file gets stored and managed in the underlying Content Services Component and you can access it from there in Workflows using the UI elements (coach views) and service flows which the Content Management toolkit provides.
    The default option for storing process instance related content is using the "internal" object store (also often called BPM document store). When designing your BAW solution, you can define at the level of the process application whether you also will allow the creation of (virtual) folder structures to manage process instance related documents.
    Alternatively you could define a separate object store at the level of the content management component (FileNet Content Manager) which would allow you to persist files beyond the active lifecycle of the process instance. Again, you could create folder structures in this content repository if it is needed to manage the documents and you could even provide access to these documents using the Content Navigator client if users are supposed to access the documents outside the context of a process instance.

    That said, it's best practise to avoid storing process instance related files into separate locations, e.g. a file system. However, if you need to do so, you can for example use the file systems related service flows available in BAW which allow you to write data to a filesystem (for a traditional installation) or a persistent volume (for container based deployments). However, this requires the filesystem/PV to be accessible to the BAW server. If this ootb component does not fit your need, you could write your own code and package it up in toolkit in order to e.g. write data to some filesystem on a remote server.

    I hope this answers your question. If not, please feel free to explain your use case in more detail.

    Best regards,
    Michael

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



  • 5.  RE: Working with files in Business Automation Workflow

    IBM Champion
    Posted Fri September 23, 2022 08:24 AM
    Hi Jaison,
    If your main requirement is to save the uploaded file to the file system, you might consider this approach:
    • Create a simple file upload servlet, packaged in a WebSphere Enterprise Application. Install it to the application cluster that runs BAW (for example).
    • On your UI, you can just use a basic HTML form with a file upload input where the form action point to your servlet  
    • Make the upload servlet save uploaded files to a network share - otherwise the location of your files will be uncertain in a clustered environment
    Otherwise, if you really need the lifecycle of your document to follow the lifecycle of your process instance, I would recommend just using the BPM File Uploader control - which will upload to the built-in content store for BAW. But if you do this, the file won't be in a usable file system location since it will be behind the content store.

    ------------------------------
    Eric Ducos
    ------------------------------