Document not found exception in subprocess

1
0
-1

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.
Regards,
Sanjeev

Comments

Submitted by Lionel Palacin on Mon, 02/27/2017 - 23:26

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?

Submitted by sanjeev.balasub... on Tue, 02/28/2017 - 10:08

Hi Lionel,

If i isolate the script , then there will be no way for me to pass the document from the parent process to the subprocess.The only way wont give me an error is to remove the document field itself. I have followed the documentation in 'documents and called process'. I have used a main and sub doc and mapped it the usual way in the call activity. I haven't used a contract.

Regards
Sanjeev

1 answer

1
0
-1

Hi,

There is actually an example on Git Hub: https://github.com/Bonitasoft-Community/parent-child-shared-document

Cheers

Comments

Submitted by sanjeev.balasub... on Fri, 03/03/2017 - 07:05

Lionel,
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.

Testing
Notifications