In the main process I’ve mapped the target data in called process object_doc_sub and assigned to parent data object_doc. (Both variables are Java Objects → java.util.List)
In the subprocess I’ve got an out connector setObject_doc, with the following cde:
import org.bonitasoft.engine.bpm.document.Document; import org.bonitasoft.engine.bpm.document.DocumentValue;
long id = apiAccessor.getProcessAPI().getLastDocument(processInstanceId, “doc_sol”).getId();
Document doc=apiAccessor.getProcessAPI().getDocument(id); DocumentValue docValue=new DocumentValue(apiAccessor.getProcessAPI().getDocumentContent(doc.getContentStorageId()), doc.getContentMimeType(), doc.getContentFileName());
return docValue;
//doc_sol is the Data Document in the subprocess
In the main process I made an operation that sets doc_sol_main (set document) with the following script:
return (org.bonitasoft.engine.bpm.document.DocumentValue)object_doc.get(0);
//it casts the object to a Document
I’ve also printed out the properties of doc_sol_main in the Engine Logger an know that the document is OK
My question is the following: Why doesn’t doc_sol_main appear in the overview when the process ends?