Hi! I am working with 7.1.2 Community Version.
Is it possible to configure optional upload of files? In the example I followed to configure the upload of files the user must upload a file in order to submit the form. And the fact is that the user may not need to upload a file, that is why I need to change the configuration buy I don’t find how to do it.
Thanks very much for your help!
Best regards,
Julia.-
Thanks Sean!
In my case I have to submit not only a file (which is optional) but other variables. I tried following that example but it does not work.
I wonder, where I have to enter the following script?
import org.bonitasoft.engine.bpm.contract.FileInputValue
import org.bonitasoft.engine.bpm.document.Document
import org.bonitasoft.engine.bpm.document.DocumentValue
if(myDocumentContract != null) {
return myDocumentContract
} else {
Document currentDocument = apiAccessor.processAPI.getLastDocument(processInstanceId, “myDocument”)
FileInputValue fileInputValue = new FileInputValue(currentDocument.contentFileName, apiAccessor.processAPI.getDocumentContent(currentDocument.contentStorageId))
return fileInputValue
}
I entered it, following the example, in “operations”, but have not positive results.
Thanks very much!
Best regards,
Julia.-