-
1. Re: upload file in ftl ?
tsurdilovic Aug 9, 2011 11:46 AM (in response to tomcheng76)From your other posts it sounds like you are using Guvnor and the web Designer. In this case please see http://blog.athico.com/2011/07/develop-complex-jbpm-processes-all-in.html and the video there, which may answer your question
Hope this helps.
-
2. Re: upload file in ftl ?
tomcheng76 Aug 9, 2011 11:11 PM (in response to tsurdilovic)Thanks for your uploaded video.
I still don't know how to map the upload file with a variable, what class should i use?
I know i can easily submit string/integer from the form
The auto form generator / validator is really great.
Previously I can use org.apache.commons.fileupload.DiskFileUpload to get the file if i just use a simple servlet.
But i cannot do this in jbpm, how to map the submitted file from the form to the variable inside the process ?
Please help as i think this is really a "simple" human task, but i am unable to do this.
-
3. Re: upload file in ftl ?
tob1as Aug 10, 2011 1:19 AM (in response to tomcheng76)Did you follow all those rules?:
- Task forms that should be associated with a specific process definition should have the name "{processDefinitionId}.ftl"
- Task forms for a specific human task should have the name "{taskName}.ftl"
- All artefacts should be deployed to the "defaultPackage" on Guvnor (as that is where the jbpm-console will be looking)
- A process should define "defaultPackage" as the package name (otherwise you won't be able to build your package on Guvnor)
- The process diagram for a specific process should have the name "{processDefinitionId}-image.png"
http://blog.athico.com/2011/01/process-repository-using-guvnor.html
http://docs.jboss.org/jbpm/v5.1/userguide/ch.Human_Tasks.html
Do you have a guvnor repository linked to your eclipse, so you can commit the ftl files to your guvnor designer?
If your ftl file is successfully uploaded, you should be able to find it under documentation and assets.
-
4. Re: upload file in ftl ?
tomcheng76 Aug 10, 2011 2:09 AM (in response to tob1as)Tobias Wittur wrote:
Did you follow all those rules?:
- Task forms that should be associated with a specific process definition should have the name "{processDefinitionId}.ftl"
- Task forms for a specific human task should have the name "{taskName}.ftl"
- All artefacts should be deployed to the "defaultPackage" on Guvnor (as that is where the jbpm-console will be looking)
- A process should define "defaultPackage" as the package name (otherwise you won't be able to build your package on Guvnor)
- The process diagram for a specific process should have the name "{processDefinitionId}-image.png"
http://blog.athico.com/2011/01/process-repository-using-guvnor.html
http://docs.jboss.org/jbpm/v5.1/userguide/ch.Human_Tasks.html
Do you have a guvnor repository linked to your eclipse, so you can commit the ftl files to your guvnor designer?
If your ftl file is successfully uploaded, you should be able to find it under documentation and assets.
I followed the rules already.
Created a human task, created ftl, -image.png and uploaded to guvnor from eclipse. This is what i have done already.
My process is working. The question is...
The form only allow user to type something, such as your name, your reason etc
But i cannot figure out how to allow user to upload something in the human task form.
How to map the upload file to a variable in the process instance...
-
5. Re: upload file in ftl ?
tob1as Aug 10, 2011 2:59 AM (in response to tomcheng76)So your form looks somehow like this?:
<form action="targetUrl" enctype="multipart/form-data" method="post">
<input type="file" name="dataFile" size="40">
<input type="submit" value="Send">
</form>I guess the file name should be saved in dataFile.
-
6. Re: upload file in ftl ?
tomcheng76 Aug 10, 2011 3:10 AM (in response to tob1as)Tobias Wittur wrote:
So your form looks somehow like this?:
<form action="targetUrl" enctype="multipart/form-data" method="post">
<input type="file" name="dataFile" size="40">
<input type="submit" value="Send">
</form>I guess the file name should be saved in dataFile.
Yes, my form looks like this one.
If i define the variable dataFile, what is the type of it?
I guess it should be a Object, but i don't know what should i fill in for the ClassName ...
-
7. Re: upload file in ftl ?
puchef Nov 30, 2011 11:43 AM (in response to tomcheng76)Could you find the solution? I try to do the same... I need your help...