Environment: OpenKM Community Edition
Hi,
I'm developing a workflow that processes emails with attachments. The workflow successfully extracts email content and detects attachments, but I'm struggling to implement clickable download/preview functionality within the workflow form.
What Works:
Email content extraction (from, subject, body, date)
Attachment detection and metadata (filename, size, UUID)
Basic workflow form display
What I'm Trying to Achieve:
Clickable "Download Attachment" button that directly downloads the file
Clickable "Preview Attachment" button that opens file preview
Similar functionality to the native OpenKM email properties interface
Current Implementation:
Is there any way to make workflow form buttons trigger direct file downloads?
Thank you in advance for any guidance!
Marius
Hi,
I'm developing a workflow that processes emails with attachments. The workflow successfully extracts email content and detects attachments, but I'm struggling to implement clickable download/preview functionality within the workflow form.
What Works:
Email content extraction (from, subject, body, date)
Attachment detection and metadata (filename, size, UUID)
Basic workflow form display
What I'm Trying to Achieve:
Clickable "Download Attachment" button that directly downloads the file
Clickable "Preview Attachment" button that opens file preview
Similar functionality to the native OpenKM email properties interface
Current Implementation:
Code: Select all
Question:<!-- forms.xml -->
<button name="downloadAttachment" label="Download Attachment" width="200px" style="download" transition="download"/>
<button name="previewAttachment" label="Preview Attachment" width="200px" style="view" transition="preview"/>
<!-- processdefinition.xml -->
<node name="download_attachment">
<script>
String attachmentUuid = (String) executionContext.getVariable("attachmentUuid");
String downloadUrl = "/OpenKM/frontend/Download?uuid=" + attachmentUuid;
// No way to trigger actual download from here
</script>
<transition to="afisare_formular"/>
</node>Is there any way to make workflow form buttons trigger direct file downloads?
Thank you in advance for any guidance!
Marius
