Search in sources :

Example 1 with QueryOperator

use of org.camunda.bpm.engine.impl.QueryOperator in project camunda-bpm-platform by camunda.

the class JsonTaskQueryVariableValueConverter method toObject.

public TaskQueryVariableValue toObject(JSONObject json) {
    String name = json.getString("name");
    Object value = json.get("value");
    QueryOperator operator = QueryOperator.valueOf(json.getString("operator"));
    boolean isTaskVariable = json.getBoolean("taskVariable");
    boolean isProcessVariable = json.getBoolean("processVariable");
    return new TaskQueryVariableValue(name, value, operator, isTaskVariable, isProcessVariable);
}
Also used : TaskQueryVariableValue(org.camunda.bpm.engine.impl.TaskQueryVariableValue) JSONObject(org.camunda.bpm.engine.impl.util.json.JSONObject) QueryOperator(org.camunda.bpm.engine.impl.QueryOperator)

Example 2 with QueryOperator

use of org.camunda.bpm.engine.impl.QueryOperator in project camunda-bpm-platform by camunda.

the class JsonTaskQueryConverter method addVariables.

private void addVariables(TaskQueryImpl query, JSONArray variables, boolean isTaskVariable, boolean isProcessVariable) {
    for (int i = 0; i < variables.length(); i++) {
        JSONObject variable = variables.getJSONObject(i);
        String name = variable.getString(NAME);
        Object value = variable.get("value");
        QueryOperator operator = QueryOperator.valueOf(variable.getString("operator"));
        query.addVariable(name, value, operator, isTaskVariable, isProcessVariable);
    }
}
Also used : JSONObject(org.camunda.bpm.engine.impl.util.json.JSONObject) JSONObject(org.camunda.bpm.engine.impl.util.json.JSONObject) QueryOperator(org.camunda.bpm.engine.impl.QueryOperator)

Aggregations

QueryOperator (org.camunda.bpm.engine.impl.QueryOperator)2 JSONObject (org.camunda.bpm.engine.impl.util.json.JSONObject)2 TaskQueryVariableValue (org.camunda.bpm.engine.impl.TaskQueryVariableValue)1