import org.ow2.bonita.facade.RuntimeAPI;
import org.apache.commons.io.FileUtils;
RuntimeAPI runtimeAPI = apiAccessor.getRuntimeAPI();
File file = new File("archivo.pdf");
long length = file.length();
byte[] bytes = new byte[(int) length];
bytes = FileUtils.readFileToByteArray(file);
runtimeAPI.createDocument("PoderRatificacion", processInstance.getProcessInstanceUUID(), "Poder Ratificacion.pdf", "application/pdf", bytes);
No hay comentarios:
Publicar un comentario