Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1150521

Summary: Provide download URL for document attachments in Process Instance Details
Product: [Retired] JBoss BPMS Platform 6 Reporter: Jan Hrcek <jhrcek>
Component: Business CentralAssignee: Pere Fernàndez <pere.fernandez>
Status: CLOSED EOL QA Contact: Lukáš Petrovický <lpetrovi>
Severity: high Docs Contact:
Priority: medium    
Version: unspecifiedCC: kverlaen, mbaluch
Target Milestone: ER3   
Target Release: 6.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-27 20:01:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Example of good link in form modeler form
none
Example of bad thing in Process Instance Details none

Description Jan Hrcek 2014-10-08 11:49:29 UTC
Created attachment 944972 [details]
Example of good link in form modeler form

Description of problem:
Currently the document attachment download button in Process Instance Details (Documents tab) does not contain URL for the document.
Also it is rendered with a button with clock image and title 'Process Variable history', which is misleading.

I would like to kindly ask for change in implementation for the sake of testability. I attach 2 screenshot illustrating the issue.
Basically for this feature to be testable automatically on different browsers / platforms I need the page to contain the URL of the attachment. 

It is desirable to have URL in href attribute of a html anchor (see good.png) 
In that can URL can be easily extracted by selenium and used to download the attachment and verify its contents.

However the approach taken in  Process Instance details > Documents panel (see bad.png) uses a button, which doesn't have URL present in the DOM and the download can only be started by clicking a button, which brings up native browser file download dialog. This is basically impossible to automate across different platforms / browsers.

So could you please change the implementation in the console, so that the URL of the attachment is present in the DOM?


Version-Release number of selected component (if applicable):
kie-wb 6.2.0 SNAPSHOT

How reproducible:
Always

Steps to Reproduce:
1. Create a process with a variable of type Document and a process start form / human task form with Document field as described in community documentation (see section 13.4. Document attachments)
2. Compare how the document link is rendered in TaskList's forms for human task completion & in Process Instance Details > Documents tab

Actual results:
In form modeler forms there is a link to download the document of the form <a href="DOCUMENT_URL" ...

In the Process instance perspective there is only image which runs some javascript to start document downlaod

Expected results:
Process instance perspective has link to download attachment which contains document URL.

Additional info:
See https://issues.jboss.org/browse/BPMSPL-37

Comment 1 Jan Hrcek 2014-10-08 11:51:11 UTC
Created attachment 944973 [details]
Example of bad thing in Process Instance Details

Comment 2 Pere Fernàndez 2014-12-02 15:52:07 UTC
Changed the action button to use a link. Also fixed the document size column to show the correct value.

Commit (master): https://github.com/droolsjbpm/jbpm-console-ng/commit/7c7c579f2bf9095288523ae67b5894c1b02f5f90

Commit (6.2.x): https://github.com/droolsjbpm/jbpm-console-ng/commit/4519fca638236aed9a8ac6609e5896e1d9cbb0bb

Comment 3 Pere Fernàndez 2014-12-02 15:52:07 UTC
Changed the action button to use a link. Also fixed the document size column to show the correct value.

Commit (master): https://github.com/droolsjbpm/jbpm-console-ng/commit/7c7c579f2bf9095288523ae67b5894c1b02f5f90

Commit (6.2.x): https://github.com/droolsjbpm/jbpm-console-ng/commit/4519fca638236aed9a8ac6609e5896e1d9cbb0bb

Comment 4 Jan Hrcek 2014-12-18 10:18:55 UTC
Now that the download link is available, automated tests have been developed and everything works as expected. Verified with BPM Suite 6.1 ER3. Thank you!