AnsweredAssumed Answered

Failed to signal transition

Question asked by mmaissan on Mar 4, 2013
Latest reply on Mar 6, 2013 by mmaissan
Hi,

I have the following javascript for signalling a task to the next step:
<javascript>
logger.log("Starting…");
var zaakId = args["zaakId"];
logger.log("Argument zaakId = " + zaakId);
var defs = workflow.getLatestDefinitions();
for (var a in defs){
  var b = defs[a];
  var instances = b.getActiveInstances();
  logger.log("Description:" + b.getDescription() + " Name:" + b.getName() + " Title:" + b.getTitle());
  for each(w in instances){
    logger.log("instance found:" + w.getDescription());
    var paths = w.getPaths();
    for (j = 0; j < paths.length; j++){
     var path = paths[j];
      var node = path.getNode();
      var tasks = path.getTasks();
      for (i = 0; i < tasks.length; i++){
        var task = tasks;
        var desc = task.getDescription();
        logger.log("Task.description:" + desc + " Task.name:" + task.getName() + " Task.title:" + task.getTitle());
        var taskProps = task.getProperties();
       if (taskProps["{http://www.alfresco.org/model/bpm/1.0}description"].search(zaakId)!= -1){
          logger.log("Taak gevonden");
          var trans = task.getTransitions();
          for (var k in trans){
            logger.log("Key is:" + k + ", value is:" + trans[k]);
            try
            {
              path.signal(k);
            }
            catch(exception){
              logger.log(exception.message);
            }
         break;
          }
        }
      }
    }
  }
}
</javascript>

when I execute this script, I receive the following error message:

org.alfresco.service.cmr.workflow.WorkflowException: 02041325 Failed to signal transition volgende from workflow path jbpm$1574306-@..
This doesn't occur on every workflow
Have you any suggestion how to solve this, what might be causing the problem.

In the browser I see the following message:
org.alfresco.error.AlfrescoRuntimeException: 02041326 Error during command servlet processing: The transaction has already been marked for rollback
caused by:
javax.transaction.RollbackException: The transaction has already been marked for rollback



Thanks in advance,

Maurice

Outcomes