10-15-2009 06:08 AM
var propiedades = new Object();
propiedades["bpm:workflowDescription"] = "Solicitud de pago de factura " + document.name;
propiedades["bpm:assignee"] = person;
propiedades["bnvwf:departmentChief"] = people.getPerson('usuario1');
propiedades["bnvwf:mainChief"] = people.getPerson('usuario2');
propiedades["bnvwf:archiveFolder"] = companyhome.childByNamePath("Facturacion/Pendientes Pago");
propiedades["bnvwf:removeFolder"] = companyhome.childByNamePath("Facturacion/No aceptadas");
var workflowFactura = workflow.getDefinitionByName('jbpm$bnvwf:departamentalInvoicePayment');
var paquete = workflow.createPackage();
paquete.addNode(document);
var workflowNodoInicial = workflowFactura.startWorkflow(paquete, propiedades);
/**
* Auto finalizar las tareas de inicio del workflow.
**/
var tareas = workflowNodoInicial.getTasks();
for (tarea in tareas) {
tareas[tarea].endTask(null);
}
10-19-2009 12:26 PM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.