A FILE object defined in the contract is always madatory? Bonita 7.0.2

Hello,
I am testing this process to upload and download files. I have set the mandatory property of upload widget to false.
When I throw the process, if I do not select a file in “Step Upload” and click “submit” the process does not continue to the next task and this message catalina log:

2015-08-12 14:11:24.490 +0200 org.restlet.Component.BonitaRestletApplication org.bonitasoft.web.rest.server.api.resource.CommonResource manageContractViolationException INFORMACIÓN: Error while validating expected inputs Explanations: Expected input [myDocumentContract] is missing

I need the file is optional. Could someone help me?
Thank you. Best regards,

Sadly it is not currently possible to have an optional file upload and I don’t have a workaround to propose.

File define in the contract input will actually accept null value but the operation “setDocument” will run anyway and will fail with a null value.

We currently looking at possible solutions to cover this important use case.

Hello,
I show my solution in case anyone is useful:
I have introduced on the BDM a boolean variable “documentRequired”.

Task 1: In the form widget I have put a checkbox widget for the user to select is want to upload a document.
I capture the value of the checkbox in the contract and modify the value of “documentRequired” with the value that the user have selected.

XOR gate: In the next step I have put an XOR gate that checks the value of “documentRequired” if “true” go to Task 2 (to upload the document) otherwise go to Task 3.

Task 2: The user uploads the document and go to Task 3.

Task 3: Continue the process …

Hi Antoine ,
Can this issue be treated as a bug ? Is there any existing bug report for this?