Bug 1001563 - Feature request: File attachment functionality
Summary: Feature request: File attachment functionality
Keywords:
Status: CLOSED EOL
Alias: None
Product: JBoss BPMS Platform 6
Classification: Retired
Component: Form Modeler
Version: unspecified
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ER4
: 6.1.0
Assignee: Pere Fernàndez
QA Contact: Andy Taylor
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-27 09:58 UTC by Pedro Zapata
Modified: 2020-03-27 19:33 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Feature: See BZ comment. Reason: Result (if any):
Clone Of:
Environment:
Last Closed: 2020-03-27 19:33:46 UTC
Type: Enhancement


Attachments (Terms of Use)

Description Pedro Zapata 2013-08-27 09:58:29 UTC
One functionality that is missing and it's of vital importance is the ability to upload and manage files while executing tasks. User will expect the ability to add / view attached files via forms, and persisted / managed automatically by the platform.

It would involve the following tasks.

- Add support for storing / retrieving files from a secondary storage (keeping a reference to it in the process context). This storage could be a data base, the VFS repository itself or just a file. This should be provided through a CDI based component and configured at project or global level.

- Create the right bindings/introspection for this type of properties. Probably it would be enough to use String bindings, to store the UUID or path to file.

- Persist this types of properties in process / task engine, by delegating it to some sort of pluggable service to save/retrieve file content.

- Add the field type for forms to manage this (this already exists but it's disabled due to the lack of support of this feature). This is upload/delete/modify/download content.

Comment 2 Pedro Zapata 2013-09-27 16:02:22 UTC
This is a feature for 6.1.

Comment 3 Prakash Aradhya 2013-10-17 17:32:35 UTC
Pedro,
This is highly critical feature for case management. I understand the implementation is quite expanded.  Thanks for bringing this up.  Any short term solution we can offer to user however dirty it is helpful.

Comment 4 Pere Fernàndez 2013-10-18 10:12:48 UTC
We are not going to develope a solution for this issue now but it can be solved using the CustomFieldTypes we definded to fix the BZ-1013519 (https://bugzilla.redhat.com/show_bug.cgi?id=1013519).

We created a sample of File input using CustomFieldType.
This sample allows the upload files inside a form and save them in a folder on de FileSystem. This implementation will store the file path of the file inside the form field value, so it must be used on String properties.
You can see the source here: https://github.com/droolsjbpm/jbpm-form-modeler/tree/master/jbpm-form-modeler-sample-custom-types/jbpm-form-modeler-custom-file-type

This is just a example of how it CustomFieldTypes work and how you can upload files on a form, it shouldn't be interpreted as a real-world solution.

Comment 5 Marek Baluch 2013-12-10 17:32:19 UTC
This issue should not be set on ON_QA because all ACKs are set to '-'. Also based on comments no work has been done on it.

Setting back to assigned so we can track this feature request for the next release.

Comment 6 Pere Fernàndez 2014-06-11 15:17:28 UTC
This feature has been added on the 6.1 version.

You can create process variables of type "org.jbpm.document.Document" and the forms generated will be showing a File Input to select files from the client computer.

To manage the Document storage the user should defina a MarshallingStrategy like explained here http://planet.jboss.org/post/jbpm_6_store_your_process_variables_anywhere

You can configurate your project to use the marshalling strategy by editing the kie-deployment-descriptor.xml file (located on /src/main/resources/META-INF folder) like this:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<deployment-descriptor xsi:schemaLocation="http://www.jboss.org/jbpm deployment-descriptor.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <persistence-unit>org.jbpm.domain</persistence-unit>
    <audit-persistence-unit>org.jbpm.domain</audit-persistence-unit>
    <audit-mode>JPA</audit-mode>
    <persistence-mode>JPA</persistence-mode>
    <runtime-strategy>SINGLETON</runtime-strategy>
    <marshalling-strategies>
        <marshalling-strategy>
            <resolver>reflection</resolver>
            <identifier>org.jbpm.document.marshalling.DocumentMarshallingStrategy</identifier>
        </marshalling-strategy>
    </marshalling-strategies>
    <event-listeners/>
    <task-event-listeners/>
    <globals/>
    <work-item-handlers/>
    <environment-entries/>
    <configurations/>
    <required-roles/>
</deployment-descriptor>

As an example the jbpm-document module includes the org.jbpm.document.marshalling.DocumentMarshallingStrategy that can be used as a reference or on test purposes.

Comment 7 Pavel Kralik 2015-02-06 18:44:49 UTC
BPMS 6.1.0.ER4


Note You need to log in before you can comment on or make changes to this bug.