throw new ExecutionException("Parameters missing: [" + keyString + "]");
}
TaskManager manager;
Publication publication = getTaskParameters().getPublication();
WorkflowInvoker workflowInvoker = new WorkflowInvoker(getParameters(), this.manager);
workflowInvoker.setup(publication, getWrapperParameters().getWebappUrl());
Task task;
try {
manager = new TaskManager(publication.getDirectory().getAbsolutePath(), this.manager);
task = manager.getTask(taskId);
Properties properties = new Properties();
properties.putAll(getTaskParameters().getMap());
Parameters _parameters = Parameters.fromProperties(properties);
task.parameterize(_parameters);
} catch (final ConfigurationException e) {
throw new ExecutionException(e);
} catch (final ParameterException e) {
throw new ExecutionException(e);
} catch (final SAXException e) {
throw new ExecutionException(e);
} catch (final IOException e) {
throw new ExecutionException(e);
} catch (ExecutionException e) {
throw e;
}
log.debug("-----------------------------------");
log.debug(" Triggering workflow");
log.debug("-----------------------------------");
// FIXME The new workflow is set before the end of the transition because the document id
// and so the document are sometimes changing during the transition (ex archiving , ...)
workflowInvoker.invokeTransition();
log.debug("-----------------------------------");
log.debug(" Triggering task");
log.debug("-----------------------------------");
task.execute(publication.getServletContext().getAbsolutePath());
log.debug("-----------------------------------");
log.debug(" Triggering notification");
log.debug("-----------------------------------");
Notifier notifier = new Notifier(manager, getParameters());