use of org.camunda.bpm.engine.impl.util.json.JSONObject in project camunda-bpm-platform by camunda.
the class SetJobRetriesBatchConfigurationJsonConverter method readJobIds.
protected List<String> readJobIds(JSONObject jsonObject) {
List<Object> objects = JsonUtil.jsonArrayAsList(jsonObject.getJSONArray(JOB_IDS));
List<String> jobIds = new ArrayList<String>();
for (Object object : objects) {
jobIds.add(object.toString());
}
return jobIds;
}
use of org.camunda.bpm.engine.impl.util.json.JSONObject in project camunda-bpm-platform by camunda.
the class RestartProcessInstancesBatchConfigurationJsonConverter method readProcessInstanceIds.
protected List<String> readProcessInstanceIds(JSONObject jsonObject) {
List<Object> objects = JsonUtil.jsonArrayAsList(jsonObject.getJSONArray(PROCESS_INSTANCE_IDS));
List<String> processInstanceIds = new ArrayList<String>();
for (Object object : objects) {
processInstanceIds.add((String) object);
}
return processInstanceIds;
}
use of org.camunda.bpm.engine.impl.util.json.JSONObject in project camunda-bpm-platform by camunda.
the class RestartProcessInstancesBatchConfigurationJsonConverter method toJsonObject.
@Override
public JSONObject toJsonObject(RestartProcessInstancesBatchConfiguration configuration) {
JSONObject json = new JSONObject();
JsonUtil.addListField(json, PROCESS_INSTANCE_IDS, configuration.getIds());
JsonUtil.addField(json, PROCESS_DEFINITION_ID, configuration.getProcessDefinitionId());
JsonUtil.addListField(json, INSTRUCTIONS, ModificationCmdJsonConverter.INSTANCE, configuration.getInstructions());
JsonUtil.addField(json, INITIAL_VARIABLES, configuration.isInitialVariables());
JsonUtil.addField(json, SKIP_CUSTOM_LISTENERS, configuration.isSkipCustomListeners());
JsonUtil.addField(json, SKIP_IO_MAPPINGS, configuration.isSkipIoMappings());
JsonUtil.addField(json, WITHOUT_BUSINESS_KEY, configuration.isWithoutBusinessKey());
return json;
}
use of org.camunda.bpm.engine.impl.util.json.JSONObject in project camunda-bpm-platform by camunda.
the class DeleteHistoricProcessInstanceBatchConfigurationJsonConverter method toJsonObject.
public JSONObject toJsonObject(BatchConfiguration configuration) {
JSONObject json = new JSONObject();
JsonUtil.addListField(json, HISTORIC_PROCESS_INSTANCE_IDS, configuration.getIds());
return json;
}
use of org.camunda.bpm.engine.impl.util.json.JSONObject in project camunda-bpm-platform by camunda.
the class DeleteProcessInstanceBatchConfigurationJsonConverter method readProcessInstanceIds.
protected List<String> readProcessInstanceIds(JSONObject jsonObject) {
List<Object> objects = JsonUtil.jsonArrayAsList(jsonObject.getJSONArray(PROCESS_INSTANCE_IDS));
List<String> processInstanceIds = new ArrayList<String>();
for (Object object : objects) {
processInstanceIds.add((String) object);
}
return processInstanceIds;
}
Aggregations