public void execute(DelegateExecution ctx) throws Exception {
String filepath=(String)ctx.getVariable("filepath");
- logger.debug("task execution started :"+filepath);
- scriptExecutionService.executeScript(filepath);
+ String fileparams=(String)ctx.getVariable("fileparams");
+ logger.debug("task execution started {} :",filepath);
+
+
+ int lastindex=filepath.lastIndexOf("/");
+ String srcdir=filepath.substring(0,lastindex);
+ String filename=filepath.substring(lastindex+1,filepath.length());
+ String task= filename+" "+(fileparams!=null?fileparams.replaceAll(",", " "):" ");
+
+ logger.debug("task execution started command: {} , src dir :{}",task,srcdir);
+
+ scriptExecutionService.executeCDBashScript(srcdir,task);
}
}
private ProcessInstance executeBuildService(Build build) {
- String filepath=build.getFilepath()+" "+(build.getFileparams()!=null?build.getFileparams().replaceAll(",", " "):" ");
return camunda.getRuntimeService().startProcessInstanceByKey("build",
- Variables.putValue("filepath", filepath).putValue("targetfolder", build.getTargetfolder()));
+ Variables.putValue("filepath", build.getFilepath()).putValue("fileparams", build.getFileparams()).putValue("targetfolder", build.getTargetfolder()));
}
@Async