Ayuda con AttachmentInstance

1
0
-1

Hola!

No puedo identificar problema con AttachmentInstance, cuando miramos un processo donde se adjunto uno archivo, en la pantalla se mira como doble. 2x el mismo archivo adjuntado. Qué puede estar malo?

Sigue abajo:

log = Logger.getLogger(chamadoUUID.toString()+" - "+processInstance.getUUID().toString()+" - "+activityInstance.getActivityName()); log.info("Inicinado conector carrega arquivos"); mapaDadosChamado = apiAccessor.getQueryRuntimeAPI().getProcessInstanceVariables(new ProcessInstanceUUID(chamadoUUID)); String nomeArquivo=""; if (destinoEsclarecimento.equals("Empresa")){ log.info("Destino do esclarecimento == Empresa"); nomeArquivo="arquivosEsclarecimentoEmpresa"; log.info("Valor da variavel nomeArquivo: "+nomeArquivo); } else{ log.info("Destino do esclarecimento == Entidade"); nomeArquivo="arquivosEsclarecimento"; log.info("Valor da variavel nomeArquivo: "+nomeArquivo); }

ProcessInstanceUUID processoDoChamado = new ProcessInstanceUUID(chamadoUUID); QueryRuntimeAPI qrtapi = apiAccessor.getQueryRuntimeAPI(); variaveisProcesso = qrtapi.getProcessInstanceVariables(processoDoChamado); // Fazer busca por arquivos e transformar em link. // attachmentDownload?instance=the_parent_ProcessPnstanceUUID&attachment=the_parent_process_attachment_name String uuid = chamadoUUID; String link = ""; String fileName = ""; String anexo = "arquivosEsclarecimento"; log.log(Level.INFO, "Anexo sendo analisado: "+anexo); if(variaveisProcesso.get(anexo)!=null){ log.log(Level.INFO, "A variável "+anexo+" possui "+variaveisProcesso.get(anexo).size()+" arquivo(s)."); link = ""; for(String arquivo:variaveisProcesso.get(anexo)){ if(arquivo!=null){ log.log(Level.INFO, "Arquivo: "+arquivo); AttachmentInstance instanciaAnexo = qrtapi.getLastAttachment(processoDoChamado, arquivo); if(instanciaAnexo!=null){ DocumentUUID uuidDocumento = instanciaAnexo.getUUID(); if(uuidDocumento!=null){ Document documento = qrtapi.getDocument(uuidDocumento); fileName = documento.getContentFileName(); link = link+""+fileName+"\n
\n"; //log.log(Level.INFO, "Author: "+documento.getAuthor()); //log.log(Level.INFO, "ContentFileName: "+documento.getContentFileName()); //log.log(Level.INFO, "ContentMimeType: "+documento.getContentMimeType()); //log.log(Level.INFO, "ContentSize: "+documento.getContentSize().toString()); //log.log(Level.INFO, "CreationDate: "+documento.getCreationDate().toString()); //log.log(Level.INFO, "LastModificationDate: "+documento.getLastModificationDate().toString()); //log.log(Level.INFO, "LastModifiedBy: "+documento.getLastModifiedBy()); //log.log(Level.INFO, "Name: "+documento.getName()); //log.log(Level.INFO, "ProcessDefinitionUUID: "+documento.getProcessDefinitionUUID().toString()); //log.log(Level.INFO, "ProcessInstanceUUID: "+documento.getProcessInstanceUUID().toString()); //log.log(Level.INFO, "UUID: "+documento.getUUID().toString()); //log.log(Level.INFO, "VersionLabel: "+documento.getVersionLabel()); //log.log(Level.INFO, "VersionSeriesId: "+documento.getVersionSeriesId()); log.log(Level.INFO, link); arquivosEsclarecimento = arquivosEsclarecimento+link; link = ""; }else{ log.log(Level.INFO,"uuidDocumento is null"); } }else{ log.log(Level.INFO, "instanciaAnexo is null"); } } } } arquivosAux = link;

1 answer

1
0
-1

Vanessa,

No entiendo exactamente el problema, que es lo que tienes doble?

Un saludo

Notifications