Hi everyone, I ran into the following problem: I have a job model that downloads files from an S3 bucket and stores the downloaded documents on a constant in document format. I would like to know if by clicking on the image given by the a!documentimage function from an interface, it is possible to start the process that downloads the file to me and then actually see the download of the file. What I do now is use 2 buttons, one to start the process model to store the document in the constant and another one to download the file from the updated constant into the a!documentimage, but I would like to combine the two and use just one click. Thanks in advance.
Discussion posts and replies are publicly visible
Not possible AFAIK.
I think your best bet is to link directly to S3 which is hopefully accessible via the same SSO mechanism as your Appian instance. Otherwise, you'll have to pre-download the files somehow.
Sure. The trick is to enable chaining in the started process. Then you can fetch the ID of the downloaded document in the onSuccess parameter.
Hi sir, i've tried a solution like this, but it doesn't work because the link must be a scalar and not a list of variant, any suggestions?
Local!message it's initially defined as cons!GEC_TEST_PROCESS_MODEL and everytime it's uploaded with the run of the process model
a!imageField( label: "", labelPosition: "ABOVE", images: { a!documentImage( document: cons!IMAGE_TO_DISPLAY, caption: "test" link: { a!startProcessLink( processModel: cons!GEC_TEST_PROCESS_MODEL, bannerMessage: a!save(local!message,cons!GEC_TEST_DOCUMENT) ) ,a!documentDownloadLink( label: "DOCUMENT TO DOWNLOAD" document: local!message
)} ) }, size:"ICON" ), align: "CENTER", width: "AUTO" ),
Hi sir, unfortunately the direct link from the bucket it's not possible. I've tried to use the getpresignedurlfors3() function from the amazon s3 plug-in, but it doesn't generate the url. Instead the download/upload s3 plug-in works well on process models
First, please clarify what you mean with "start the process that downloads the file to me and then actually see the download of the file".
Then, you cannot add multiple links to the link parameter.
Why do you use a constant to reference the downloaded file? Is there only a single user using this app?
This is a bit of a confusing situation. Please clarify. I do not want to spend my time on trying to guess what you want to do.
i want to use a a!documentimage component in an interface but instead of having a download link like this:
a!documentDownloadLink( label: document( documentId:tointeger(cons!GEC_testttt), property: "dateCreated" ), document: local!message
)
that take a preexisting document inside appian, i want to pass a document that it's downloaded with a process model, INSIDE this a!documentDownloadLink. So the user of the interface click on this link, the process model starts, it upload the constant with the correct document and it download this file, as a normal a!documentImage works. Now i achieve this with 2 button, one with a!start process model link and one separate with this documnt download link, but it's bad for my user experience. I want to achieve this with one click
I still do not get the point with the constant, but anyway ...
Sorry, I have to support Mathieu's answer. There is no reliable and good way of doing this. I thought you just want to display that document on screen. But streaming a document from another source through Appian directly to the user is a different thing.
The constant it's updated with the correct value every time the process model it's triggered. My problem it's that i can't use the appian folder because they refresh after a certain amount of time, so the document won't be avaiable to be displayed on the interface and it will cause an error. So this is why i have to download these files from an external sources