cancel
Showing results for 
Search instead for 
Did you mean: 

Integrating Bonitasoft with Alfresco

werneckjp
Champ in-the-making
Champ in-the-making

I'm trying to upload a file generated in Bonitasoft to Alfresco Share, but I'm only getting this error:

 Work ExecuteConnectorOfActivity: flowNodeInstanceId = 20004, connectorDefinitionName = upDoc failed. The element will be marked as failed. Exception is: org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException: Not Found
  wrapped by org.bonitasoft.engine.commons.exceptions.SBonitaRuntimeException: org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException: Not Found
 exception was generated here:  at PROCESS__6318056163642277761//org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.convertStatusCode(AbstractAtomPubService.java:499)
  at PROCESS__6318056163642277761//org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.read(AbstractAtomPubService.java:701)
  at PROCESS__6318056163642277761//org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.getRepositoriesInternal(AbstractAtomPubService.java:873)
 
I'm using atompub as binding with this url: http://localhost:8080/alfresco/api/-default-/public/cmis/versions/1.1/atom/

Here is the code that generates the file:
import org.bonitasoft.engine.bpm.document.DocumentValue
 
import org.slf4j.Logger
 
import org.slf4j.LoggerFactory
 
import java.time.LocalDateTime
 
Logger logger = LoggerFactory.getLogger("org.bonitasoft.groovy.script.ARCHIVETEST");
 
def document = null
 
try{
 
def name_file = "documentCMIS.txt"
 
def content = "União Flasco Smiley Happy"
 
document = new DocumentValue(content.getBytes(), "text/plain", name_file)
 
//logger.warn("ARQUIVO txt: ${document}")
 
}catch(Exception e){
 
//logger.warn("CATCH")
 
//logger.warn("${e}")
 
def currentTime = LocalDateTime.now()
 
def processInstance = apiAccessor.getProcessAPI().getProcessInstance(processInstanceId)
 
def errorMessage = "Erro na criação do arquivo <br/> HORA DA OCORRENCIA: ${currentTime} <br/> ERROR: ${e}"
 
apiAccessor.getProcessAPI().updateProcessDataInstance("error", processInstance.getId(), errorMessage.toString())
 
}
 
//document
 
//logger.warn("${document}")
 
return document
0 REPLIES 0