Send file for call activity

1
0
-1

Hi,

I'm trying send a document through a call activity.
To get the document id, i'm following the documentation ( http://documentation.bonitasoft.com/documents ); and when i use the code:
apiAccessor.getProcessAPI().getLastDocument(processInstanceId, "mainDoc").getId(); i have the exception "org.bonitasoft.engine.commons.exceptions.SObjectNotFoundException: Document not found: "

Has anyone ever experienced this? What can I be doing wrong?

In time: I created the document in the main process and i use the widget file for save file in variable "mainDoc".

2 answers

1
0
-1

Hi Sean McP,

Sorry, I don't understand...

The document is called "mainDoc" (i don't have much imagination for names ;) )...

So, What is the difference enters my statement and yours?

I can't use "mainDoc" like a name for document?

Thank you for answer Sean!

1
0
-1

Don't use this statement

apiAccessor.getProcessAPI().getLastDocument(processInstanceId, "mainDoc").getId();

use this statement:

apiAccessor.getProcessAPI().getLastDocument(processInstanceId, "cHANGE_tHIS_tO_mY_dOCUMENT_nAME").getId();

Then it will work.

I use this all the time...

Notifications