public void execute(String configuration, ExecutionEntity execution, CommandContext commandContext) {
JSONObject config = new JSONObject(configuration);
boolean activateProcessInstances = getIncludeProcessInstances(config);
SuspendProcessDefinitionCmd cmd = null;
String by = getBy(config);
if (by.equals(JOB_HANDLER_CFG_PROCESS_DEFINITION_ID)) {
String processDefinitionId = getProcessDefinitionId(config);
cmd = new SuspendProcessDefinitionCmd(processDefinitionId, null, activateProcessInstances, null);
} else
if (by.equals(JOB_HANDLER_CFG_PROCESS_DEFINITION_KEY)) {
String processDefinitionKey = getProcessDefinitionKey(config);
cmd = new SuspendProcessDefinitionCmd(null, processDefinitionKey, activateProcessInstances, null);
}
cmd.execute(commandContext);
}