Document not found exception in subprocess
I have a main process and a subprocess. I have a document field in the main process where the user uploads his document. Mapping is done between the two processes .So the processflow is, file gets uploaded in mainprocess and then goes to the subprocess where it can be used .Important point to be noted- The document field is not mandatory.
The issue which i am facing is this. When the subprocess is reached, i get an error saying "document not found".
In some cases the user may not upload any document. When this happens, this is the error i get.
Groovy script throws an exception of type class org.bonitasoft.engine.bpm.document.DocumentNotFoundException with message = org.bonitasoft.engine.commons.exceptions.SObjectNotFoundException: Document not found:
How can i resolve this?
It seems weird because the way this works is that it forces the end user to always upload a file. Is this way the mapping of documents work in Bonita version 7.1?
Any help would be appreciated.
Any way you can isolate the Groovy script that throws this error? How do you map the document from the parent process to the sub-process? Using the contract?
If i use a contract as mentioned in the example, wont it still fail because the contract input will always be mandatory.? In my case, the field is optional. So sometimes the user would not upload any document.