public void execute(String configuration, ExecutionEntity execution, CommandContext commandContext) {
JSONObject config = new JSONObject(configuration);
boolean activateJobs = getIncludeJobs(config);
ActivateJobDefinitionCmd cmd = null;
String by = getBy(config);
if (by.equals(JOB_HANDLER_CFG_JOB_DEFINITION_ID)) {
String jobDefinitionId = getJobDefinitionId(config);
cmd = new ActivateJobDefinitionCmd(jobDefinitionId, null, null, activateJobs, null);
} else
if (by.equals(JOB_HANDLER_CFG_PROCESS_DEFINITION_ID)) {
String processDefinitionId = getProcessDefinitionId(config);
cmd = new ActivateJobDefinitionCmd(null, processDefinitionId, null, activateJobs, null);
} else
if (by.equals(JOB_HANDLER_CFG_PROCESS_DEFINITION_KEY)) {
String processDefinitionKey = getProcessDefinitionKey(config);
cmd = new ActivateJobDefinitionCmd(null, null, processDefinitionKey, activateJobs, null);
}
cmd.execute(commandContext);
}