Accessing Doument Contract in bonita Script
I want to access document contract which i have created on step named "Step Upload" in example version 7.1.5-1.0.1 at link http://community.bonitasoft.com/project/file-upload-and-download-process... but its not working i am only trying to access contract using following code:
import org.bonitasoft.engine.bpm.contract.FileInputValue
import org.bonitasoft.engine.bpm.document.Document
import org.bonitasoft.engine.bpm.document.DocumentValue
// If we receive a new document value we use it
if(myDocumentContract != null) {
return myDocumentContract
}
When i am trying to submit form its not working by giving error "Error submitting form". Sorry if i have asked something stupid, but i am new to bonita.
import java.util.logging.Logger;
void debug(Logger logger,String Texto)
{
debug( logger,Texto, true);
}
void debug(Logger logger,String Texto, boolean isdebug)
{
if (isdebug)
logger.warning("Interfaz Lote Pago Interno: "+Texto);
}
Logger logger = Logger.getLogger("com.digicel.PP");
debug(logger, "Archivo " + archivoLote.getContentFileName());
byte[] contenido
String sId;
sId=archivoLote.url.substring(archivoLote.url.indexOf("contentStorageId=") + 17);
debug(logger, "contentStorageId=" + sId);
contenido=apiAccessor.processAPI.getDocumentContent(sId);
debug(logger, "Despues de asignar contenido. Tamaño: " + contenido.size().toString());
String lineasArc = new String(contenido);
debug(logger, "lineasArchivo: " + lineasArc);
java.util.List lineas;
String[] detallePago;
lineas = lineasArc.split("\\r?\\n");
debug(logger, "despues del split ");
for (lineaPago in lineas) {
detallePago = lineaPago.tokenize("|");
debug(logger, "BAN: " + detallePago[0] + " Nombre Cliente: " + detallePago[1] + " Monto: " + detallePago[2]);
}
return lineas