Esempio n. 1
0
 private static InternalTask createTask(Job userJob, ScriptTask task) throws JobCreationException {
   InternalTask scriptTask;
   if (isForkingTask()) {
     scriptTask = new InternalForkedScriptTask(new ScriptExecutableContainer(task.getScript()));
     configureRunAsMe(task);
   } else {
     scriptTask = new InternalScriptTask(new ScriptExecutableContainer(task.getScript()));
   }
   // set task common properties
   try {
     setTaskCommonProperties(userJob, task, scriptTask);
   } catch (Exception e) {
     throw new JobCreationException(e);
   }
   return scriptTask;
 }
Esempio n. 2
0
 private Element createScriptExecutableElement(Document doc, ScriptTask t) {
   Element scriptExecE =
       doc.createElementNS(
           Schemas.SCHEMA_LATEST.namespace, XMLTags.SCRIPT_EXECUTABLE.getXMLName());
   Element scriptE = createScriptElement(doc, t.getScript());
   scriptExecE.appendChild(scriptE);
   return scriptExecE;
 }