03-09-2011 05:53 AM
private String startWorkflow(Reference refUponWF) throws RepositoryFault, NumberFormatException, RemoteException, WebServiceException, Throwable {
log.info("startWorkflow, entrato");
String toReturn = "";
try {
String nomeScriptWF = "prova.js";
// return the reference to the script
List<Reference> scriptSearchResults = RepositoryUtils.searchLucene("/Data Dictionaty", nomeScriptWF);
if (scriptSearchResults.isEmpty()) {
throw new Exception("Non posso eseguiro lo script perchè NON ho trovato nessuno script con nome [" + nomeScriptWF + "]");
}
Reference script = scriptSearchResults.get(0);
toReturn = ActionUtils.executeScript(refUponWF, script);
log.info("startWorkflow, risultato " + toReturn);
} catch (Throwable t) {
log.error("startWorkflow, errore generico.", t);
throw new Throwable("Errore generico. Class: " + t.getClass().getName() + " Message: " + t.getMessage());
}
log.info("startWorkflow, uscito");
return toReturn;
}
var param = args["paramName"];
03-10-2011 04:41 AM
03-10-2011 11:27 AM
Map<String, String> parameters = new HashMap<String, String>(1);
parameters.put("script-ref", Utils.getNodeRef(script));
parameters.put("prova", "Passato da WS");
ActionUtils.executeAction(refUponWF, "script", parameters);
function main() {
try {
var nodeRef = args.prova;
logger.log("Parametro —- " + nodeRef);
var nodeRef1 = args["prova"];
logger.log("Parametro —- " + nodeRef1);
return "OK";
} catch (e) {
logger.log("Error durante l'esecuzione dello script " + e);
return e;
}
}
main();
Error durante l'esecuzione dello script ReferenceError: "args" is not defined.
03-11-2011 04:01 AM
logger.log("Parametro —- " + prova);
03-23-2011 11:07 AM
01-18-2013 08:13 AM
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.