cancel
Showing results for 
Search instead for 
Did you mean: 

Regression in Javascript Workflow related APIs ?

iblanco
Confirmed Champ
Confirmed Champ
I have an advanced workflow with some custom properties and a script that launches the workflow after setting the properties (in order to use it from a rule). I have also developed the required JSPs and the configuration in order to be able to launch the same workflow from the Advanced Workflow Wizard.

When I set and launch the properties using the Advanced Workflow Wizard it works well in both versions, Labs/Comunnity  3 Final and the actual Community 3.2 .

But when I try to launch it using the script it works like a charm in version 3 Final but fails in Community 3.2. This is the script I'm using in both versions to launch the workflow:


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);
}

The error seems related to the transition signaling mechanism, for two reasons, one is that the log says that it can't signal transition 'null' and the other is that if I delete the last 'for' the workflow is "created", but it is stopped in the start node until the user presses the corresponding button to actually exec the initial transition.

Do you think this is a regression I should report ?
1 REPLY 1

iblanco
Confirmed Champ
Confirmed Champ
Ok, I have reported it and it seems as it is due to be solved in 3.3