Download File

NonPlayerCharacter
edited March 12 in Flows

What can I use to download a file attached to a case entity?

Comments

  • Nathan_Decisions
    edited March 13

    There are two methods to download a file from your case entities. The simplest method is to navigate to the Case View of the desired entity and utilize the DOWNLOAD FILE button under Case Activity for the aforementioned file. See the picture below:


    The next method is to utilize Download File step. First, you will need to fetch the case entities utilizing the Get All [TypeName] step under User Defined Types > Case Entity > [Type Name] > Get All [Type Name]. The resulting output will be a list of case entities. The Get FileReferences In Folder step will be used to retrieve the file(s) attached to the specific case entity. In my example, the input, Folder Id selects for the first Entity Id of the fetched case entities. (See picture below)


    The final step will be Download File step under Integration > Internal Services > FileReferenceService. Notice, the Get FileReferences In Folder step will retrieve all the files associate with the aforementioned case entities. Here, you will further parse through the case entity using the functionality of the step's inputs, filename and id, to retrieve the specific file. In my case, I chose the first filename and id in the list. (See Below)



    The location of the file once it has been downloaded can be found using the debug feature located at the top of the Flow Designer window and viewing the output of the Download File step. (See Below)



    Local Directory:


    I have attached a sample project containing an example case entities data type and three flows: one flow to create an entity, one to attach a file, and one to download the file.

    *Please Note: The examples attached were developed to be instructional, and were not developed as officially supported components. For more information or to engage our service team to develop fully supported, production quality solutions, please contact: services@decisions.com

Sign In or Register to comment.